table refresh [message #527109] |
Sat, 15 October 2011 02:47 |
|
hanner
Messages: 90 Registered: August 2011 Location: at HOME
|
Member |
|
|
Let say i need to refresh 1 table from production to uat. Do you think dropping that table in UAT or truncate that table in UAT will be better?
Truncate will preserve the indexes/comments/grants/sequences/packages/procedures/functions/trigger/database links/materialized views/synonym
but NOT DROP.
Using truncate, you have to FIRST, disable the indexes/ sequences,in- order for the IMP to be successful.
BUT what happen if there are 'things/changes on that table in production you might not know? Lets say, difference tablespace name or something like that, Thus somehow the prod table is difference in uat.
In that case i don't think one can use the truncate method.
Dropping method, you have to spool out the privileges, and got to find out all the objects on the table ( indexes/ packages/ so on and so forth) ? of course doing the necessary back of that table in UAT before actually drop/ truncate the table and then import in the table from production.
Spooling the file is somehow like a backup or to do comparision if something goes wrong?
[Updated on: Sat, 15 October 2011 03:13] Report message to a moderator
|
|
|
Re: table refresh [message #527130 is a reply to message #527109] |
Sat, 15 October 2011 09:30 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:Using truncate, you have to FIRST, disable the indexes/ sequences,in- order for the IMP to be successful.
Wrong! You have to only disable primary/unique keys, but just for the truncate statement, you can (and should) reenable them for the import.
Quote:BUT what happen if there are 'things/changes on that table in production you might not know? Lets say, difference tablespace name or something like that, Thus somehow the prod table is difference in uat.
The solution depends on your version, you didn't care to post us.
Quote:In that case i don't think one can use the truncate method.
Yes, you can, in any case but if the logical definition of the table (columns, datatypes) are not the same ones.
Regards
Michel
|
|
|
|
|
|
|
|
|
|
|
Re: table refresh [message #527205 is a reply to message #527204] |
Sun, 16 October 2011 23:17 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Michel Cadot wrote on Sat, 15 October 2011 19:07Quote:The solution depends on your version, you didn't care to post us.
Regards
Michel
|
|
|