Database creation through script
10g / OEL
I would like to create database using script istead of DBCA
1. Create parameter file pfile
2. create spfile
3.create database ...
4. run catalog.sql.
what are the other steps to create database using script
santhanam
Edited by: santhanam_oradba on May 17, 2010 10:13 AM
santhanam_oradba wrote:
10g / OEL
I would like to create database using script istead of DBCA
1. Create parameter file pfile
2. create spfile
3.create database ...
4. run catalog.sql.
what are the other steps to create database using script
santhanam
Edited by: santhanam_oradba on May 17, 2010 10:13 AMDo you enjoy self-inflicted pain?
Use DBCA. Select 'custom database'. Work through the wizard. At the end, select 'create scripts' and DEselect 'create database'. I think when you see and study the resulting scripts, you'll see the wisdom of going that route.
I never use dbca to actually create a database, but I do use the above procedure. In fact, I used the resulting scripts to create a skeleton set of scripts that I reuse at will.
Similar Messages
-
Find Database name through scripts
Hi ALL,
I have a solaris box with 10 Database are running on that.
i am wrirting some scripts on that box to do some activity. So From OS level i am fetching the database name like this.
Ps -ef | grep smon
Now i want to startup all my 10 database to single script.( now database is down).
So in this level how can i fetch the database name in OS level.
Kindly give some ideas....
MAny Thanks
Senthil KumarSenthil,
The Oracle provided script dbstart starts all databases in /var/opt/oracle/oratab.
Likewise the Oracle provided script dbshut shuts down all databases mentioned in this file.
Please don't reinvent the wheel.
Sybrand Bakker
Senior Oracle DBA -
Database Creation through DBCA
Sir,
I m trying to create a database through DBCA but before creation of database, occurs an error ORA-12560: TNS:protocol adapter error. So what is the Problem.
I m using oracle 10g.
Thanks in advance
RamIf this is not related to EBS, pl post your question in the database forums http://forums.oracle.com/forums/category.jspa?categoryID=18
HTH
Srini -
Database creation through command prompt
Dear all,
When i tried to create the database through comand prompt , till startu nomount stage it went fine after that when i issued create database command
the following error occurred
*ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced*
Please help..i have checked alert log and i even googled it , could not find it ....
Regards,
Vamsi.Dear azar,
See the alert.log file.
*create database oradb
logfile group 1 ('C:\oracle\product\10.2.0\oradata\oradb\redo1.log') size 10M,
group 2 ('C:\oracle\product\10.2.0\oradata\oradb\redo2.log') size 10M,
group 3 ('C:\oracle\product\10.2.0\oradata\oradb\redo3.log') size 10M
character set WE8ISO8859P1
national character set utf8
datafile 'C:\oracle\product\10.2.0\oradata\oradb\system.dbf'
size 50M
autoextend on
next 10M maxsize unlimited
extent management local
sysaux datafile 'C:\oracle\product\10.2.0\oradata\oradb\sysaux.dbf'
size 10M
autoextend on
next 10M
maxsize unlimited
undo tablespace undo
datafile 'C:\oracle\product\10.2.0\oradata\oradb\undo.dbf'
size 10M
default temporary tablespace temp
tempfile 'C:\oracle\product\10.2.0\oradata\oradb\temp.dbf'
size 10M
Sun May 22 12:48:21 2011
Database mounted in Exclusive Mode
Sun May 22 12:48:22 2011
Successful mount of redo thread 1, with mount id 2505041684
Assigning activation ID 2505041684 (0x954fe714)
Thread 1 opened at log sequence 1
Current log# 1 seq# 1 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORADB\REDO1.LOG
Successful open of redo thread 1
Sun May 22 12:48:23 2011
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sun May 22 12:48:23 2011
SMON: enabling cache recovery
Sun May 22 12:48:23 2011
create tablespace SYSTEM datafile 'C:\oracle\product\10.2.0\oradata\oradb\system.dbf'
size 50M
autoextend on
next 10M maxsize unlimited
EXTENT MANAGEMENT LOCAL online
Sun May 22 12:48:25 2011
Completed: create tablespace SYSTEM datafile 'C:\oracle\product\10.2.0\oradata\oradb\system.dbf'
size 50M
autoextend on
next 10M maxsize unlimited
EXTENT MANAGEMENT LOCAL online
Sun May 22 12:48:25 2011
create rollback segment SYSTEM tablespace SYSTEM
storage (initial 50K next 50K)
Completed: create rollback segment SYSTEM tablespace SYSTEM
storage (initial 50K next 50K)
Sun May 22 12:48:27 2011
Thread 1 advanced to log sequence 2
Current log# 2 seq# 2 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORADB\REDO2.LOG
Sun May 22 12:48:29 2011
CREATE UNDO TABLESPACE UNDO DATAFILE 'C:\oracle\product\10.2.0\oradata\oradb\undo.dbf'
size 10M
Sun May 22 12:48:29 2011
ORA-30012 signalled during: CREATE UNDO TABLESPACE UNDO DATAFILE 'C:\oracle\product\10.2.0\oradata\oradb\undo.dbf'
size 10M
Sun May 22 12:48:29 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\udump\oradb_ora_2412.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Sun May 22 12:48:29 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\udump\oradb_ora_2412.trc:
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '%ORACLE_HOME%\RDBMS\ADMIN\SQL.BSQ' near line 5792
ORA-00604: error occurred at recursive SQL level 1
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Error 1519 happened during db open, shutting down database
USER: terminating instance due to error 1519
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_pmon_2152.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_reco_1432.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_smon_1568.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_ckpt_3724.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_lgwr_2172.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_dbw0_2316.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:30 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_mman_1868.trc:
ORA-01519: error while processing file '' near line
Sun May 22 12:48:31 2011
Errors in file c:\oracle\product\10.2.0\admin\oradb\bdump\oradb_psp0_3464.trc:
ORA-01519: error while processing file '' near line
Instance terminated by USER, pid = 2412
ORA-1092 signalled during: create database oradb
logfile group 1 ('C:\oracle\product\10.2.0\oradata\oradb\redo1.log') size 10M,
group 2 ('C:\oracle\product\10.2.0\oradata\oradb\redo2.log') size 10M,
group 3 ('C:\oracle\product\10.2.0\oradata\oradb\redo3.log') size 10M
character set WE8ISO8859P1
national character set utf8
datafile 'C:\oracle\product\10.2.0\oradata\oradb\system.dbf'
size 50M
autoextend on
next 10M maxsize unlimited
extent management local
sysaux datafile 'C:\oracle\product\10.2.0\oradata\oradb\sysaux.dbf'
size 10M
autoextend on
next 10M
maxsize unlimited
undo tablespace undo
datafile 'C:\oracle\product\10.2.0\oradata\oradb\undo.dbf'
size 10M
default temporary tablespace temp
tempfile 'C:\oracle\product\10.2.0\oradata\oradb\temp.dbf'
size 10M...
Regards,
Vamsi. -
Database creation error ucing DBCA
Hi!
When i istalled oracle 9i .the installation is suucessful but database creation is not.
the database creation aborted with error invalid size entry(expected 419...1232 but found 4192...1230 )
Pls Help
Hainder KaurHi,
Again run database create assistance by ./dbca and choose custom option for creating database,in this option oracle run database creation's scripts and i hope this time u will not face the same problem.
Thanks
Kuljeet -
Can we get database creation script using any packages?
Hi Friends,
we will get table creation script using dbms_metadata.get_ddl package. just like that is there any way to get database creation script? i know that we can add some lines to controlfile trace to convert it into database creation script. but i would like to know whether it is possible through packages?
thanks in advance.I think there's no package to use it for getting database creation script. But anyway, you can search it in [Oracle Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
VISION demo database creation scripts
Does anyone have a copy of the VISION demo database creation scripts that they could give me. Have to try and add this into an already installed EBS system.
rgds
AlanThe VISION demo database is a fully populated EBS installation delivered by rapid install. You would just use rapidwiz and select the Vision Demo, and not fresh production. You need the VISION data in order to be able to run through the various process flows. You do not want to import Vision data into a non-VISION EBS.
-
Generate script from SQL for database creation
Hi,
as we have DBMS_METADATA to get scripts for constraints , is there any way by which we can get scripts used for database creation from existing databases
Thanks
kedarThanks for the ODB tool. I'm trying to connect with SYS but ODB tool replied :
Unable to make connection : connection to sys should be sysdba or sysoper
How do I tell it to connect "as sysdba" ? I tried putting that in "User Name" field but it didn't work.
Also, when I create a new connection and try to save it, it will prompt me to :
Setup user preferences for this instance
and then popped up the window for "Set Options and Preferences"
My question is, after I saved this connection, how do I go back into this window to edit it ? I don't see any button for it.
Thanks again -
Database creation scripts from a running RAC
Hi all
We have a two node Oracle 10g R2 RAC running on SLES 10 SP2 Itanium systems.
We have 4 database instances running on the two nodes.
I need to create database creation scripts for one of the databases. eg. the script should contain all current configuration of the database (i.e i dont want the script which would have been created at the time of creation of the database)
Is this possible to achieve?
thanksHi,
You can follow this steps to create yours scripts using notes below:
Create Database Manually
*How to create a RAC database using DBCA generated scripts from templates [ID 856783.1]*
Create Database Service Manually
*How To Configure Server Side Transparent Application Failover [ID 460982.1]*
*10g & 11g :Configuration of TAF(Transparent Application Failover) and Load Balancing [ID 453293.1]*
Regards,
Levi Pereira
Edited by: Levi Pereira on Mar 18, 2011 11:36 AM -
Save .wav file into database through script
Hi,
I want to store a .wav file into a database through script. Is that possible to do it through the ccx script?
Thanks,
HowYeeHi,
At this moment, script can save the file only to Custom directory of UCCX. It's not possible to save it to external DB.
Regards
GP. -
Can i change the database connections through MAXL Scripts?
Hi,
just want to know whether i can change the database connections through MAXL Scripts. i am using essbase 9.3.1.Hi John,
I have built my rulefile by connecting to a database & now i want to change the database connections. I know i can change the database connections through frontend. ( File--> open file). I want to know whether i can change the database connections by writing any MAXL Scripts. -
Database Creation Script Error
When i tried to create a database using the script i am getting the below error
Instance created.
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 5 15:58:16 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile="E:\mydatabase\scripts\init.ora";
ORA-09314: sltln: error translating logical name
OSD-04503: text contains no translatable elements
Thanks!{code}
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Cache and I/O
db_block_size=8192
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=MYDATABASE
# File Configuration
control_files=("E:\oradata\MYDATABASE\control01.ctl", "E:\flash_recovery_area\MYDATABASE\control02.ctl")
db_recovery_file_dest=E:\flash_recovery_area
db_recovery_file_dest_size=5218762752
# Miscellaneous
compatible=11.2.0.0.0
diagnostic_dest=E:
memory_target=1287651328
# Processes and Sessions
processes=150
# Security and Auditing
audit_file_dest=E:\admin\MYDATABASE\adump
audit_trail=db
remote_login_passwordfile=EXCLUSIVE
# Shared Server
dispatchers="(PROTOCOL=TCP) (SERVICE=MYDATABASEXDB)"
# System Managed Undo and Rollback Segments
undo_tablespace=UNDOTBS1
{code} -
Database creation in oracle 9i
can any one tell me step of database creation in oracle 9i
i try many times from 2 days through script because my DBCA is not open
when i click it. DBCA created orcl during instalation but now
it is not running. will i have to install it ?
1)i add db_name=mukesh below db_name=orcl and run script but errors
2)i crete initm.ora by copy init.ora and change db_name=orcl by db_name=mukesh
in initm.ora but errors
1)when i use init.ora without adding db_name=mukesh
i also change undo_management by AUTO to manual i get
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile=D:\oracle\admin\orcl\pfile\init.ora nomount
ORACLE instance started.
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL> create database mukesh
2 datafile 'D:\oracle\oradata\mukesh\system01.dbf' size 325m
3 logfile
4 group 1 ('D:\oracle\oradata\mukesh\redo01.log') size 100m,
5 group 2 ('D:\oracle\oradata\mukesh\redo02.log') size 100m,
6 group 3 ('D:\oracle\oradata\mukesh\redo03.log') size 100m;
create database mukesh
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-01504: database name 'mukesh' does not match parameter db_name 'orcl'
after that i add db_name=mukesh below db_name=orcl
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup pfile=D:\oracle\admin\orcl\pfile\init.ora nomount
ORACLE instance started.
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL> create database mukesh
2 datafile 'D:\oracle\oradata\mukesh\system01.dbf' size 325m
3 logfile
4 group 1 ('D:\oracle\oradata\mukesh\redo01.log') size 100m,
5 group 2 ('D:\oracle\oradata\mukesh\redo02.log') size 100m,
6 group 3 ('D:\oracle\oradata\mukesh\redo03.log') size 100m;
create database mukesh
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: 'D:\oracle\oradata\orcl\CONTROL01.CTL'
ORA-27038: skgfrcre: file exists
OSD-04010: <create> option specified, file already existsHi,
If you getting a problem with DBCA go for manually process:-
I had listed steps which I follow
Step 1: Decide on Your Instance's System Identifier (SID)
Step 2: Create the Initialization Parameter File
Note:- Name the copied init.ora file init<SID>.ora because this is the default naming convention that the Oracle server looks for when it tries to start up the instance ORACLE_HOME/dbs directory (exists over the prefered path)
Edit this file's parameters so that your database and your instance will run effectively on your system.
DB_NAME Must be set to a text string of eight characters or less. During database creation, the value assigned to DB_NAME is recorded in the database's datafiles, redo log files, and control files. If, when you attempt to start the database instance, the value of DB_NAME as recorded in the initialization parameter file and the database name in the control files are not the same, the database will not start.
DB_DOMAIN A text string that specifies the network domain where the database is created.
CONTROL_FILES Is assigned the comma-separated list of control file names to use for the new database. When you execute the CREATE DATABASE statement, the control files listed as values assigned to this parameter are created. If you fail to specify a filename for the CONTROL_FILES parameter, Oracle creates a file with a default operating system dependant filename.
DB_BLOCK_SIZE Specifies the standard block size of the database. This size is used in the creation of the system tablespace and by default in any other tablespaces created. Take care when determining what this value should be because after the database is created, the value cannot be changed.
UNDO_MANAGEMENT Determines whether the database starts in automatic undo management mode. A value of AUTO enables automatic undo management; MANUAL enables manual undo management mode. In 9i, AUTO is suggested, but MANUAL is default.
UNDO_TABLESPACE When the instance starts in automatic undo management mode, it needs to have a tablespace in which to store its undo information. The default is SYS_UNDOTBS and is automatically created if you execute a CREATE DATABASE statement with the UNDO_MANAGEMENT initialization parameter set to AUTO and no UNDO TABLESPACE statement in the CREATE DATABASE statement.
Step 3: Connect to and Start the Instance
Connect to the instance as SYSDBA either using operating system authentication or the password file method of authentication and start up the instance using the STARTUP command.
sqlplus '/ as sysdba'
If your parameter file is not in the default location or is not named init<SID>.ora, you may need to specify the PFILE clause in the STARTUP command for the instance to start.
Because you do not yet have a database attached to the instance, you need to start up the instance in NOMOUNT state:
startup nomount;
The instance is now started and ready for the CREATE DATABASE command.
Step 4: Issue the CREATE DATABASE Statement
create database mydb1 controlfile reuse
Logfile
Group 1 ('/mydb1/log1/log01a.log',
'/mydb2/mydb1/log01b.log') size 50M,
Group 2 ('/mydb1/log1/log02a.log',
'/mydb2/log1/log02b.log') size 50M,
Group 3 ('/mydb1/log1/log03a.log',
'/mydb2/mydb1/log03b.log') size 50M
Datafile '/mydb1/mydb1_system.dbf' 250M
AUTOEXTEND ON MAXSIZE 500M
Undo tablespace mydb1_undo1
Datafile '/mydb/mydb1/mydb1_undo1.dbf' 50M
Default temporary tablespace mydb1temp tempfile
'/mydb/mydb1/mydb1temp1.dbf' size 75M
Extent management local
Character set US7ASCII
MAXLOGFILES 10
MAXLOGMEMBERS 10
MAXLOGHISTORY 1
MAXDATAFILES 500;
Thanks
Pavan Kumar N -
Database creation problems and parition consolidation
This is my first time on here so please look past my green-ness. =)
I Installed Oracle 8.1.7 successfully and opted to setup the database creation later so I could put the database on another partition. Well, I tried once to create the database on the partition I installed oracle onto (/oracle) but I had insufficient space, It said I needed 1.3 gigs. My "/database" partition is only a 1 gig parition (and /oracle is 2 gigs). My plan was of course, to seperate them.
Ok, I didn't see an option to create the db on another partition so I resigned to using /oracle. My question now is, is the 960 megs on /oracle enough to create the database? I used the custom setup so I could see how everything was broken down and I noticed that my rollback segment is 500 megs. Is this necessary? Can I get by with 100 megs and be fine? Also, if I did do this, I'd have approximately 100 megs free for data, this is enough I hope??
Lastly, I need to combine the partitions somehow without effecting /. The hard drive is broken down into:
gigs
5.5 /
2.0 /oracle
1.0 /database
Does anyone have any ideas? In windows, I used partiton magic but I don't know if there is a linux version.
One more thought (last one for real =), it had 50 megs allocated for it's shared memory pool. I'm assuming this will take away from the 128megs I have thus effectively making only 78 available to X, will this cause any noticeable problems other than a bit of slowdown? I have most if not all of my virtual memory free at all times. I know I should get more ram, but you know how the budget thing goes...
Any help would be greatly appreciated,
RobTry running the catalog and catproc sql scripts.
$ cd $ORACLE_HOME/rdbms/lib
$ svrmgrl
connect internal
@catalog
@catproc
That will set up all of the internal views and packages that
oracle needs to do DDL.
Scott
Don DeLuca (guest) wrote:
: I'm gotten through the install and created the database. The
: database comes up, I can do some simple stuff like create a new
: user, create a simple table but when I try to run SQL DDL
: statements I get errors saying: "recursive SQL error". I
: looked at the sql.log file after the install. It doesn't look
: like all the packages were created successfully. Have others
had
: similiar problems with the system table/package creation? To
me
: it looks like a DDL that was needed was not called during the
: install and later caused problems during package creation.
: This is my fourth time installing and I have the same problem
: each time. I also tried to run the plsql.sql file to recreate
: some of the packages but this did not work either.
: I've just about given up and I'm starting to realize why its
: free.
null -
Database creation best practices.
Hi,
We are planning to setup new database, oracle-10G on Sun and AIX. It is a datawarehose environment.
Can anyone please share me the documents which speaks about best practices to be followed during database creation/setup. I googled and got some douments but not satisfied with them, so thought of posting this query.
Regards,
Yoganath.YOGANATH wrote:
Anand,
Thanks for your quick response. I went thru the link, but it seems to be a brief one. I need a sort of crisp/summary document for my presentation, which speaks about:
1. Initial parameter settings for an datawarehouse to start with, like block_size, db_file_multiblock_read_count, parallel server etc...
2. Memory parameters, SGA, PGA (say for an sever with 10GB RAM).
3. How to split tablespaces, like Large, small.
If someone has a just a crisp/outline document which speaks about the above mentioned points, it will be grateful.
Regards,
YoganathYou could fire up dbca, select the 'data warehouse' template, walk through the steps, and at the end do not select 'create a database' but simply select 'create scripts', then take a look at the results, especially the initialization file. Since you chose a template instead of 'custom database' you won't get a CREATE DATABASE script, but you should still get some stuff genned that will answer a lot of the questions you pose.
You could even go so far as to let dbca create the database. Nothing commits you to actually using that DB. Just examine it to see what you got, then delete it.
Edited by: EdStevens on Feb 10, 2009 10:41 AM
Maybe you are looking for
-
I wrote a script that: 1. gathers data from cells copied in an excel spreadsheet 2. creates variables from data 3. creates a new job folders using variables 4. copies an excel file into the job folder 5. opens the excel file and fills in specified ce
-
HELP! White Screen then Completely Unresponsive
I have a year-old Ipod nano 6th generation (small, touch-screen). Last night I fell asleep with the ipod still on (which I've done many times before with no problem) and when I woke up, I hit the start button and it only had a plain white screen. Aft
-
OutOfMemoryError during many file open/close
In my application, which reads many files( one by one). I close the file everytime when it is finished. But when the number of files getting bigger, such as 16, I got following problem. What I could to do to avoid it? Any help is great appreciated. E
-
ITunes library too big for Nano
I have a 4G nano and about 45G on my computer. Is there a way that I can make a playlist to transfer onto my nano rather than just letting iTunes make a selection? mac book pro 17" Mac OS X (10.4.8)
-
Why isn't my CS3 serial number qualified for CC promotional membership?
I am trying to buy the CC membership but with the promotion for clients. When i put the cs3 serial number it tells me i am not qualified. Why does this happen?