Script for creating template? [message #72632] |
Mon, 11 August 2003 13:01 |
Sid
Messages: 38 Registered: May 1999
|
Member |
|
|
Is there any way to write a script that would automate the generation of an Oracle template?
I am guessing it is possible to do this because when you create a template using the Oracle Database Configuratio Assistant, it runs a SQL*Plus window in the background.
I ask this because this would be a preferable way for us to backup our database. Currently we backup the database by backing up the datafiles, control files, etc. but recovering from such a backup is a pain.
Any input is HIGHLY appreciated!!!
Thanks,
Sid
PS: We're using Oracle 9
|
|
|
|
Re: Script for creating template? [message #72636 is a reply to message #72634] |
Tue, 12 August 2003 07:56 |
Sid
Messages: 38 Registered: May 1999
|
Member |
|
|
Mahesh,
First of all, thank you so much for your reply. You are being generous by sharing your knowledge, and I appreciate it.
When I say "create a template" I am talking about the process of creating an Oracle template using the Oracle Database Configuratio Assistant in a Windows environment. The sequence of steps is:
1. Open the Oracle Database Configuration Assistant
2. Choose the option "Manage Templates"
3. Choose the option "Create a database template" and the sub-option under it of "From an existing database (structure as well as data)"
4. Specify the instance name, username and password
5. Specify the template name (say TEST)
...etc.
At this point Oracle launches a process that creates two files located in C:oracleora90assistantsdbcatemplates. The files are called TEST.dfj and TEST.dbc.
This is the process I want to automate. This is useful to us for backups because it is very easy to create a database in any machine from the above two files.
Is this possible?
Thanks in advance,
Sid
PS: As you can probably tell by my language, I am not much of a DBA, I'm more of a PL/SQL and front-end programmer :-)
|
|
|
Re: Script for creating template? [message #72637 is a reply to message #72636] |
Tue, 12 August 2003 09:09 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
first i am not sure, whether this would be a valid 'backup / restore strategy'.
I have not done this before so , i give no comment on that.
There are options for silent installation of oracle software, without gui.
I have no idea about DBCA taking command line parameters.
if it would, there might be a way to automate this.
the .dbt file is just an xml template.
which is generated from alter database backup controlf ile, and contents of init< sid >.ora
|
|
|