Home » RDBMS Server » Server Utilities » pre-create tables (AIX, Oracle 10.2.0.3.0)
pre-create tables [message #504565] Tue, 26 April 2011 11:03 Go to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I need to export a schema and import in to another schema in the same database using original export/import method. The user has requested to precreate some of the tables before I do the import. He wants me to take the script of the tables from source schema and create newly the tables in the destination schema. Does it makes sense? Should I separately create those tables in the destination schema and then do the import or when I do export/import, automatically those tables will get transferred correctly? Basically he wants those tables to be pre-created in the destination schema because those tables contain LOB's so that the storage tablespace setting will be correct. Please advice.
Re: pre-create tables [message #504566 is a reply to message #504565] Tue, 26 April 2011 11:05 Go to previous messageGo to next message
BlackSwan
Messages: 22417
Registered: January 2009
Senior Member
CREATE TABLE NEW_TABLE AS SELECT * FROM OLD_TABLE;
Re: pre-create tables [message #504567 is a reply to message #504566] Tue, 26 April 2011 11:10 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
If I take the create table script from source schema and change the name of the tablename alone and paste it in the destination schema, will it work?
Re: pre-create tables [message #504570 is a reply to message #504567] Tue, 26 April 2011 11:23 Go to previous messageGo to next message
BlackSwan
Messages: 22417
Registered: January 2009
Senior Member
>If I take the create table script from source schema and change the name of the tablename alone and paste it in the destination schema, will it work?
some/many/most folks actually TEST DDL before applying to Production rather than depend upon unknown & unaccountable strangers.
Re: pre-create tables [message #504575 is a reply to message #504570] Tue, 26 April 2011 12:01 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I do have oracle installed in my personal machine. I do not want to test in office servers. If i mess up with something, I will be in to trouble. If someone could test this and let me know it would be helpful for me.
Re: pre-create tables [message #504579 is a reply to message #504575] Tue, 26 April 2011 12:08 Go to previous messageGo to next message
BlackSwan
Messages: 22417
Registered: January 2009
Senior Member
>I do have oracle installed in my personal machine.
So test on it YOURSELF!
Re: pre-create tables [message #504582 is a reply to message #504579] Tue, 26 April 2011 12:10 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I meant to say I do not have oracle installed in my machine.
Re: pre-create tables [message #504584 is a reply to message #504582] Tue, 26 April 2011 12:12 Go to previous messageGo to next message
BlackSwan
Messages: 22417
Registered: January 2009
Senior Member
>I meant to say I do not have oracle installed in my machine.
Install Oracle so you have a sandbox system to experiment with.
Re: pre-create tables [message #504586 is a reply to message #504582] Tue, 26 April 2011 12:15 Go to previous message
Michel Cadot
Messages: 58327
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So install it.

Regards
Michel
Previous Topic: Automatically generate E-R diagram
Next Topic: export stopped
Goto Forum:
  


Current Time: Fri Jul 11 02:06:24 CDT 2014

Total time taken to generate the page: 0.09136 seconds