Home » RDBMS Server » Server Administration » dbca
dbca [message #243237] Wed, 06 June 2007 10:26 Go to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Hi,

I am building a new database 9.2.0.7 on a windows 2003 server.
This is going to be a duplicate of the production database from the production server. My doubt is whether I can copy the database template from the production server, prod.dbt and paste it onto the new server and then start dbca? But the thing is the database name in the new server should be stg and not prod. But everything else going to be the same like the locations etc..

I am not sure if I can copy the template prod.dbt from the production server to the new server and then rename it to stg.dbt. Please advise if it is a good idea.

Thanks so much!
Re: dbca [message #243241 is a reply to message #243237] Wed, 06 June 2007 10:37 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
yes template would be good option.after creating your db on other machine you can change your db name by using DBNEWID utility.
Re: dbca [message #243243 is a reply to message #243237] Wed, 06 June 2007 10:39 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
ok.. I can use DBNEWID utility.

One more thing, do you think I could rename the database name by editing the template in the new server? Will that work?

Thanks for your support.
Re: dbca [message #243250 is a reply to message #243243] Wed, 06 June 2007 10:51 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
yes you can change your db name.
Post your oracle version.
when you would create database on other site using template after creating your duplicate database.
see the attached file for name changing.
Re: dbca [message #243252 is a reply to message #243237] Wed, 06 June 2007 10:56 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Oracle version is 9.2.0.7 on windows 2003.

I am sorry I am a little confused.. When you said ' yes, you can change the db name' did you mean to say I can change the dbname just by editing the template in the newserver after copying it from the old server?

Or you meant to say I can change the dbname only using DBNEWID utility using the attachment and not the above method?

Thank you.
Re: dbca [message #243257 is a reply to message #243252] Wed, 06 June 2007 11:11 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
I guess You can't change it in template because the template contains the same controlfile from production.
After creating database by template you can use DBNEWID to change that dbname.
Re: dbca [message #243270 is a reply to message #243237] Wed, 06 June 2007 12:42 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Dreamz,

I am thinking of copying the template from the production server to the new server. And then will make changes to the template on the new server. The template and the control files will still exist the same in the production server. Since, only the changes are made in teh new server template, I think it should be fine. Please correct me if I am wrong.

Thanks.
Re: dbca [message #243273 is a reply to message #243270] Wed, 06 June 2007 13:06 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
You will make template with data or without data.



will you create the database on non-production server using template or not?


[Updated on: Wed, 06 June 2007 13:06]

Report message to a moderator

Re: dbca [message #243274 is a reply to message #243273] Wed, 06 June 2007 13:08 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Another option

RMAN> DUPLICATE TARGET DATABASE TO your_db_name
DEVICE TYPE disk PFILE='/net/host_src/tmp/initTEST.ora';

[Updated on: Wed, 06 June 2007 13:08]

Report message to a moderator

Re: dbca [message #243281 is a reply to message #243237] Wed, 06 June 2007 13:49 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Template without the datafiles.. Yes, I am going to create the database on the new server using the renamed template from the production server. I will try it out and let you know if it worked out good.

Thanks!
Re: dbca [message #243509 is a reply to message #243237] Thu, 07 June 2007 10:17 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Hi,

I renamed the template in the new server and have created the database successfully using dbca specifying no datafiles. Now, I am trying to import the full database from the prodcution server to the new database. Below is the import script I used and below are the error messages I got:

imp system/system_bay@bay file=exp_full.dmp log=imp_full.log full=Y rows=Y buffer=400000

IMP-00015: following statement failed because the object already exists
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'kricki' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT UNLIMITED TABLESPACE TO "pnrl""

There was a bunch of similar error messages I got. I looked u for these errors in google, and I think I can just write IGNORE=Y in the imp script. But, since I renamed the template from prod server, the database files are already there. I have to import the rows though, because this database is to be used like a test database.

Thanks for your help!
Re: dbca [message #243515 is a reply to message #243509] Thu, 07 June 2007 10:41 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
ORA-01917: user or role 'kricki' does not exist




why wouldnt you use the template with daafiles??
Re: dbca [message #243518 is a reply to message #243237] Thu, 07 June 2007 10:47 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Dreamzz,
I meant I created the database with the option of No datafiles,when dbca asks for 'Include datafiles' I clicked No.
Because I need to use the data from the production.

Thanks!

[Updated on: Thu, 07 June 2007 10:50]

Report message to a moderator

Re: dbca [message #243521 is a reply to message #243518] Thu, 07 June 2007 10:52 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Ok.
does imports work now??
Re: dbca [message #243533 is a reply to message #243237] Thu, 07 June 2007 11:31 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
no..I tried using ignore=y, its ending up with the same errors.

Please give me your suggestions.Help really appreciated.
Thanks all.
Re: dbca [message #243534 is a reply to message #243533] Thu, 07 June 2007 11:33 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
can you paste the whole error log?
Re: dbca [message #243535 is a reply to message #243534] Thu, 07 June 2007 11:42 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
Template without the datafiles..


Create the tablespaces before import.

[Updated on: Thu, 07 June 2007 11:55]

Report message to a moderator

Re: dbca [message #243538 is a reply to message #243237] Thu, 07 June 2007 12:18 Go to previous messageGo to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Tablespaces are created already...I wont be able to paste the whole error log since its against my company policy and it will be a problem for me..Thanks for understanding...

But the following are the errors I am getting:

IMP-00015: following statement failed because the object already exists
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'kricki' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT UNLIMITED TABLESPACE TO "pnrl""

There are consistent error messages in the log file..Please give me your suggestions of how I can import the data.Thank you so much..
Re: dbca [message #244934 is a reply to message #243538] Thu, 14 June 2007 11:51 Go to previous message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Hi

Copy role definition from production, create new role here using that definition & then import using ignore=Y

That should work.

--Girish
Previous Topic: Ora-600[4194]
Next Topic: Upgrade to 10g
Goto Forum:
  


Current Time: Tue Dec 06 12:33:21 CST 2016

Total time taken to generate the page: 0.09973 seconds