Home » RDBMS Server » Server Utilities » Import schema from prod to test db
Import schema from prod to test db [message #118210] Tue, 03 May 2005 12:40 Go to next message
oskarthik
Messages: 26
Registered: March 2005
Junior Member
Hi all,
i have a full export dmp of prod db
I hava created a new db test and i need to import just the schema
i tried this syntax which was not successful.

imp system/manager@prod file=exp.dmp fromuser=system@prod touser=system@test rows=n

error:
imp-00034 fromuser "system@prod" not found in export file

what is the correct syntax to get this done
Thanx in Advance,
Karthik

Re: Import schema from prod to test db [message #118212 is a reply to message #118210] Tue, 03 May 2005 13:00 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
-- You are lucky this time.
-- you were about to crap your PROD db.
-- by this statement you as importing data into PROD DB.
-- it failed becuase of @prod/test entry in fromuser/touser

imp system/manager@prod file=exp.dmp fromuser=system@prod touser=system@test rows=n

--
-- the right syntax would be.
-- and using SYSTEM schema for custom / business data
-- is just as bad it can ever be.

imp system/manager@test file=exp.dmp fromuser=system touser=system
rows=n
Re: Import schema from prod to test db [message #118213 is a reply to message #118212] Tue, 03 May 2005 13:06 Go to previous messageGo to next message
oskarthik
Messages: 26
Registered: March 2005
Junior Member
Thanx a lot mahesh

Today shud have been my day.
Re: Import schema from prod to test db [message #118218 is a reply to message #118213] Tue, 03 May 2005 13:49 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Not scary as it looks like.
>>
imp system/manager@prod file=exp.dmp fromuser=system@prod touser=system@test rows=n

You have used rows=n.
So now data will be appended.
and by default ingore=n. So during import oracle tries to import the table structure, comes to know that there is already an object with the same name, hollers and whines a few errors and finally says import is not very successful.

Anyhow, it is still potentially dangerous. Any obsolete object in dump file that is not available in database, will be recreated.

[Updated on: Tue, 03 May 2005 13:53]

Report message to a moderator

Previous Topic: DATAFILE SYSTEM IN STATUS SYSOFF
Next Topic: SQL*Loader Multiple Rows
Goto Forum:
  


Current Time: Thu Jul 04 05:46:35 CDT 2024