- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to schema import in other user schema
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2007 11:07 PM
тАО06-05-2007 11:07 PM
I have 10g I want to export full schema into other user what is best pratices
1.exp userid=a/a file=a.dump log=a.log compress=n
2.drop all table from user b
3.imp file=a.dmp fromuser=a touser=b
I drop table by OEM what is a command to delete all table from schema b for imp
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2007 11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2007 11:40 PM
тАО06-05-2007 11:40 PM
Re: how to schema import in other user schema
select OBJECT_NAME from all_objects where OWNER='aaa' and object_type='TABLE';
it's good to catch the list!
regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2007 11:45 PM
тАО06-05-2007 11:45 PM
Re: how to schema import in other user schema
Many of these steps can be accomplished through OEM, if you are more comfortable using that product.
1) Copy user b's schema to b_temp.
2) Drop all segments in b_temp. Now you have an empty template for user b, that you can use for future exp/imp operations.
3) SQL> drop user b cascade;
4) Copy b_temp schema to b.
5) $ nohup un/pw exp owner=a ... &
6) $ nohup un/pw imp fromuser=a touser=b ... &
7) Check for schema a being hard-coded in any views, functions, procedures, etc., change to schema b, and recompile.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 01:20 AM
тАО06-06-2007 01:20 AM
Re: how to schema import in other user schema
"what is a command to delete all table from schema b"
select 'drop table '||table_name||';'
from dba_tables
where owner='B';
you can spool the above sql to a file:
e.g.
spool dropb_tables.sql
then run the dropb_tables.sql
sql> @dropb_tables.sql
Note that due to referential integrity constraints, not all the tables may be dropped on the first run of the script. You may have to run the above script several times.
I would be much easier to drop the user and re-create it (granting all the required privileges of course!)
What version of Oracle Database are you running?
if you need any further assistance, please let us know.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2007 06:55 PM
тАО06-08-2007 06:55 PM
Re: how to schema import in other user schema
I am use 10g .. u also tell me following syntex is correct for exp and imp
exp userid=a/a file=a.dump log=a.log compress=n
imp file=a.dmp fromuser=a touser=b