Skip to main content
1-Visitor
October 5, 2010
Question

Have you tried to use SQL scripts to move WTParts from one Library Context to another one?

  • October 5, 2010
  • 14 replies
  • 2045 views
Just interesting to check out if anyobody tried to use SQL scripts to move WTParts from one Library Context to another one and after the moving is done to delete the old Library Context.

D

14 replies

12-Amethyst
October 5, 2010
If using a given SQL recipe works today it may well not work tomorrow
-- it's a fragile approach in which it is easy to miss something (e.g.
when the case you traced does not contain all the different data cases
for starters) and really mess up your data.

Going behind the API and modifying data directly with SQL is not
supported for just such reasons. The supported approach is to use the API.

--
Jess Holle

dtkach11-VisitorAuthor
1-Visitor
October 5, 2010

So Windchill API are supported. Does it mean that if we have issues
after running these APIs PTC tech support will help us to fix it ?


dtkach11-VisitorAuthor
1-Visitor
October 5, 2010
With verbosity enabled we can see the final SQL that was generated from
Persistence API. So we can see the relationships/dependencies between
the tables. Again there is no documentation that explain how Tables are
linked together and if you updating one table what other tables have to
update as well. At least this is my understanding. Of course I can be
wrong.

Thanks,
Dmitry
1-Visitor
October 5, 2010
Yes if the API says "supported API true" in javadocs.

Otherwise, no.

And yes, SQL or Java, you have to test your logic first.

Besides I think move is in EnterpriseHelper or something like it. (Not at my computer right now) Building your collection of parts is the logic you would have to write.


Sent from my Verizon Wireless BlackBerry