Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
One of our legacy systems has crashed that was running Windchill 9.1 M050 software but the SQL system is still functioning. It appears that there was no backup. What I’m trying to do is export the CAD data from the SQL database. It appears that the database was never setup right as all the files are stared in BLOB in the database.
I’ve been able to write the query below that relates the columns from the tables in the database.
What I’m unsure of is how to get a usable file out of the BLOB data and write it to a file?
What I’ve read is that it must be converted to something varbianary>bianary>hex or something?
--query binding tables--
select
ad.fileName --table column with file name--
, sd.lobLoc --table column with file data this needs to be contents of file--
, e.nameB2folderingInfo --table column with folder name I’d be happy if everything was in a single folder this would just be nice to separate it to sub folders--
from
--everything below relates the above three table columns--
wcadmin.EPMDocument e
, wcadmin.EPMDocumentMaster m
, wcadmin.HolderToContent h
, wcadmin.ApplicationData ad
, wcadmin.StreamData sd
where e.latestiterationInfo='1'
and e.idA2A2=h.idA3A5
and h.idA3B5=ad.idA2A2
and e.idA3masterReference=m.idA2A2
and ad.idA3A5 = sd.idA2A2
I’m not an expert in SQL I’m just a design engineer that is trying to recover the old data.
Thanks for any and all help!
-Greg