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
  • 2042 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

1-Visitor
October 5, 2010
This is doable with SQL but the administrative domain also has to be dealt with along with subfolder object identifiers.

It moved, but onetime I did this, one part stayed behind in old container, didn't investigate it.

If I had to choose, I would do this with java.


Sent from my Verizon Wireless BlackBerry
avillanueva
23-Emerald I
October 5, 2010
Agreed, use the API or UI to do moves. How many parts do you have to
move?


dtkach11-VisitorAuthor
1-Visitor
October 5, 2010
The Administrative domain has to deal with it because of the ACLs are
defined against it or because of some other reason?

thanks,
Dmitry
dtkach11-VisitorAuthor
1-Visitor
October 5, 2010
I would say that we are investigating SQL option of moving parts . Even
if write a java code we still need to identify how we can test solution
that Windchill will be not broken.

D
1-Visitor
October 5, 2010
Even though it may be possible to use SQL, I recommend using the API,
Recently we have moved lots of items (Documents) from couple of Contexts
(Libraries) to multiple contexts using the API. The whole thing went
smooth except for the items that are checked out.



My only complaint is about the moving items in bulk (using collections).
If you use them, you could gain lot of efficiencies but even if one
fails, it rolls back all of the items that are being moved in the
collection.



Raju Pulavarthi

St. Jude Medical
avillanueva
23-Emerald I
October 5, 2010
If you have access to the codebase locally, you can write a Java client
that will do the work of the move. You can feed it a list of numbers
(that you can get from SQL) and have it churn away. Not posting code to
the server and rebooting. Using the API should not break Windchill. I
use them a lot for renames or set states where I have a list of parts.


dtkach11-VisitorAuthor
1-Visitor
October 5, 2010
What about the Change Objects that were created against the library
context? What will be the procedure to move Change Objects
(PRs/CRs/CNs/CAs) to another Library Context?
1-Visitor
October 5, 2010
The move API should be able to handle the Change Objects as well.



Raju Pulavarthi

St. Jude Medical
dtkach11-VisitorAuthor
1-Visitor
October 5, 2010
I mean using SQL not a java API. I think I just lazy to turn on logging
debug info to trace SQL that is executed during Move action from PDMLink
interface.
Just want to check if anybody used SQL for it (the use of QuerySpec
should be the same as SQL)
1-Visitor
October 5, 2010

Eventually it all goes to some kind of SQL, just not sure why you would want to use it, even with the verbosities enabled. When I used SQL, I left out the fact that I used info from same folder and same object type in the destination container.

I did this for the sake of time and it was a development server, so the data didn't matter.

I would use Java on a production server.

David
Sent from my Verizon Wireless BlackBerry