SlideShare a Scribd company logo
1 of 11
STEP 1: Create Required Directories
C:>mkdir c:oracleoradatamydb
C:>mkdir c:oracleadminmydbbdump
C:>mkdir c:oracleadminmydbudump
C:>mkdir c:oracleadminmydbcdump

STEP 2: Create PASSWORDFILE for database authentication
C:>ORAPWD file=c:oracleora92databasePWDmydb.ora password=oracle entries=5

STEP 3: Create INIT parameter file and set below parameter
open notepad or wordpad and type the following parameters and save it as initMYDB.ora in the
ORACLE_HOME/database folder
eg:
c:oracleora92databaseinitMYDB.ora
init parameters
background_dump_dest=c:oracleadminmydbbdump
core_dump_dest=c:oracleadminmydbcdump
user_dump_dest=c:oracleadminmydbudump
control_files='c:oracleoradatamydbcontrol01.ctl'
compatible=9.0.0
db_name=mydb
instance_name=mydb
remote_login_passwordfile=exclusive

STEP 4: Create Database Services
C:>ORADIM -new -sid mydb -startmode auto
Connect with instance as SYSDBA
C:>set oracle_sid=mydb
C:>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 1 13:01:47 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
STEP 5: Startup the instance at NOMOUNT stage
SQL> startup nomount pfile=C:oracleora92databaseinitMYDB.ora
ORACLE instance started.
Total System Global Area 97589952 bytes
Fixed Size 453312 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes

STEP 6: Issue the Create Database statement
SQL> @"C:Documents and SettingsAdministratorDesktopdbcreate.sql"
Database created.
dbcreate.sql script
create database mydb
logfile GROUP 1 ('c:oracleoradatamydbredo01.log') size 5m, GROUP 2
('c:oracleoradatamydbredo02.log') size 5m
datafile
'c:oracleoradatamydbsystem01.dbf' size 200m
/
open the notepad and save this file as dbcreate.sql

STEP 7: Run Scripts to Build Data Dictionary views
SQL> @C:oracleora92rdbmsadmincatalog.sql
SQL> @C:oracleora92rdbmsadmincatproc.sql

STEP 8: Create Spfile from init.ora file.
SQL> create spfile from pfile='C:oracleora92databaseinitMYDB.ora';
File created.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 97589952 bytes
Fixed Size 453312 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
creating undo tablespace
SQL> create undo tablespace undotbs
2 datafile 'c:oracleoradatamydbundo01.dbf' size 100m;
Tablespace created.
SQL> alter system set undo_management=auto scope=spfile;
System altered.
SQL> alter system set undo_tablespace=undotbs scope=spfile;
System altered.
SQL> startup force
ORACLE instance started.
Total System Global Area 97589952 bytes
Fixed Size 453312 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
creating temporary tablespace
SQL> create temporary tablespace temptbs 2 tempfile
'c:oracleoradatamydbtemp01.dbf' size 100m;
Tablespace created.
SQL> alter database default temporary tablespace temptbs;
Database altered.
creating tablespace for users
SQL> create tablespace users
2 datafile 'c:oracleoradatamydbuser01.dbf' size 100m;
Tablespace created.
changing database from noarchivelog mode to archivelog
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination C:oracleora92RDBMS
Oldest online log sequence 61
Current log sequence 62
step 1:
SQL> shu immediate;
step 2:
SQL> startup mount
step 3:
SQL> alter database archivelog;
Database altered.
step 4:
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Disabled
Archive destination C:oracleora92RDBMS
Oldest online log sequence 61
Next log sequence to archive 62
Current log sequence 62
step 5:
SQL> alter system set log_archive_start=true scope=spfile;
System altered.
SQL> startup force

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:oracleora92RDBMS
Oldest online log sequence 62
Next log sequence to archive 63
Current log sequence 63
I HOPE THIS DOCUMENTATION WILL HELPS YOU DO CREATE A DATABASE.
THANKS FOR READING THIS DOCUMENTATION.
POSTED BY RAJESHKUMAR GOVINDARAJAN AT TUESDAY, MAY 26, 2009 0 COMMENTS
TO THIS POST
LABELS: 9I CONCEPTS, DATABASE CREATION

WEDNESDAY, MAY 13, 2009

creating database with dbca
creation of database using database configuration assitant(DBCA):
steps for creating a database using dbca in a oracle server for both windows and linux
environment follow the same procedure.
for linux:
open the terminal type dbca in the terminal
eg:
[oracle@localhost ~]$dbca
welcome screen will appear if not
[oracle@localhost ~]$$ORACLE_HOME/bin/dbca
for windows open command prompt and type dbca, welcome screen will appear
step 1:

click NEXT to proceed.
step 2:

LINKS
select create a database option, by
default it will be create a database only and click NEXT to proceed.
step 3:
select General Purpose and then click NEXT to proceed.

step 4:
Enter your new database name eg:demo and click NEXT to proceed.

step 4:
step 5:

step 6:

step 7:
step 8:

step 9:

step 10:
step 11:

step 12:

click FINISH
now you can connect and work with your new database
[oracle@localhost ~]ORACLE_SID=demo
[oracle@localhost ~]sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 13 00:45:19 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL>startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.

SQL> select name from v$database;

NAME
--------DEMO

More Related Content

What's hot

Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 

What's hot (19)

Oracle 12.2 sharding learning more
Oracle 12.2 sharding learning moreOracle 12.2 sharding learning more
Oracle 12.2 sharding learning more
 
PPT
PPTPPT
PPT
 
Oracle sharding : Installation & Configuration
Oracle sharding : Installation & ConfigurationOracle sharding : Installation & Configuration
Oracle sharding : Installation & Configuration
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorial
 
OrientDB
OrientDBOrientDB
OrientDB
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
Gg steps
Gg stepsGg steps
Gg steps
 
Terraform Cosmos DB
Terraform Cosmos DBTerraform Cosmos DB
Terraform Cosmos DB
 
MySQL Without the SQL -- Oh My! Longhorn PHP Conference
MySQL Without the SQL -- Oh My!  Longhorn PHP ConferenceMySQL Without the SQL -- Oh My!  Longhorn PHP Conference
MySQL Without the SQL -- Oh My! Longhorn PHP Conference
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
Oracle 12.2 sharded database management
Oracle 12.2 sharded database managementOracle 12.2 sharded database management
Oracle 12.2 sharded database management
 
MongoDB-SESSION03
MongoDB-SESSION03MongoDB-SESSION03
MongoDB-SESSION03
 
Dbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easyDbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easy
 
Json within a relational database
Json within a relational databaseJson within a relational database
Json within a relational database
 
MariaDB for developers
MariaDB for developersMariaDB for developers
MariaDB for developers
 
Jndicreation of database adapter
Jndicreation of database adapterJndicreation of database adapter
Jndicreation of database adapter
 

Viewers also liked

Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
Quantum Leap
 
Installing 12c R1 database on oracle linux
Installing 12c R1 database on oracle linuxInstalling 12c R1 database on oracle linux
Installing 12c R1 database on oracle linux
Anar Godjaev
 
Ex solutions-consulting-brochure-de
Ex solutions-consulting-brochure-deEx solutions-consulting-brochure-de
Ex solutions-consulting-brochure-de
Pieter Kroezen
 
Ppt foire2013 journéeelus
Ppt foire2013 journéeelusPpt foire2013 journéeelus
Ppt foire2013 journéeelus
asadac73
 
Geliştiriciler için Oracle_Part_2
Geliştiriciler için Oracle_Part_2Geliştiriciler için Oracle_Part_2
Geliştiriciler için Oracle_Part_2
Anar Godjaev
 
Fiziksel Standby Database Kurulum
Fiziksel Standby Database KurulumFiziksel Standby Database Kurulum
Fiziksel Standby Database Kurulum
Anar Godjaev
 
Profile backup mail_atma_script (disk drumu/export)
Profile backup mail_atma_script (disk drumu/export)Profile backup mail_atma_script (disk drumu/export)
Profile backup mail_atma_script (disk drumu/export)
Anar Godjaev
 
DATABASEI ARCHIVE MODA ALMA
DATABASEI ARCHIVE MODA ALMADATABASEI ARCHIVE MODA ALMA
DATABASEI ARCHIVE MODA ALMA
Anar Godjaev
 
Urinary tract infections
Urinary tract infectionsUrinary tract infections
Urinary tract infections
Sarah Saqer
 

Viewers also liked (12)

Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
Mr. Sharon Kedmi, former Director General, Ministry of Industry, Trade and La...
 
Installing 12c R1 database on oracle linux
Installing 12c R1 database on oracle linuxInstalling 12c R1 database on oracle linux
Installing 12c R1 database on oracle linux
 
11 g RAC -ASM
11 g RAC -ASM11 g RAC -ASM
11 g RAC -ASM
 
Ex solutions-consulting-brochure-de
Ex solutions-consulting-brochure-deEx solutions-consulting-brochure-de
Ex solutions-consulting-brochure-de
 
Table-ronde Qualité web - Codeurs en Seine 2013
Table-ronde Qualité web - Codeurs en Seine 2013Table-ronde Qualité web - Codeurs en Seine 2013
Table-ronde Qualité web - Codeurs en Seine 2013
 
Ppt foire2013 journéeelus
Ppt foire2013 journéeelusPpt foire2013 journéeelus
Ppt foire2013 journéeelus
 
La reputación de las universidades: Claves para su gestión
La reputación de las universidades: Claves para su gestiónLa reputación de las universidades: Claves para su gestión
La reputación de las universidades: Claves para su gestión
 
Geliştiriciler için Oracle_Part_2
Geliştiriciler için Oracle_Part_2Geliştiriciler için Oracle_Part_2
Geliştiriciler için Oracle_Part_2
 
Fiziksel Standby Database Kurulum
Fiziksel Standby Database KurulumFiziksel Standby Database Kurulum
Fiziksel Standby Database Kurulum
 
Profile backup mail_atma_script (disk drumu/export)
Profile backup mail_atma_script (disk drumu/export)Profile backup mail_atma_script (disk drumu/export)
Profile backup mail_atma_script (disk drumu/export)
 
DATABASEI ARCHIVE MODA ALMA
DATABASEI ARCHIVE MODA ALMADATABASEI ARCHIVE MODA ALMA
DATABASEI ARCHIVE MODA ALMA
 
Urinary tract infections
Urinary tract infectionsUrinary tract infections
Urinary tract infections
 

Similar to Create manula and automaticly database

How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
Jorge Batista
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
influxbob
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
maclean liu
 

Similar to Create manula and automaticly database (20)

Presentation day4 oracle12c
Presentation day4 oracle12cPresentation day4 oracle12c
Presentation day4 oracle12c
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
oracle dba
oracle dbaoracle dba
oracle dba
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
 
Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ubl
 
Let your DBAs get some REST(api)
Let your DBAs get some REST(api)Let your DBAs get some REST(api)
Let your DBAs get some REST(api)
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1
 
Oracle backup
Oracle backupOracle backup
Oracle backup
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
 

More from Anar Godjaev

More from Anar Godjaev (20)

Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Create manula and automaticly database

  • 1. STEP 1: Create Required Directories C:>mkdir c:oracleoradatamydb C:>mkdir c:oracleadminmydbbdump C:>mkdir c:oracleadminmydbudump C:>mkdir c:oracleadminmydbcdump STEP 2: Create PASSWORDFILE for database authentication C:>ORAPWD file=c:oracleora92databasePWDmydb.ora password=oracle entries=5 STEP 3: Create INIT parameter file and set below parameter open notepad or wordpad and type the following parameters and save it as initMYDB.ora in the ORACLE_HOME/database folder eg: c:oracleora92databaseinitMYDB.ora init parameters background_dump_dest=c:oracleadminmydbbdump core_dump_dest=c:oracleadminmydbcdump user_dump_dest=c:oracleadminmydbudump control_files='c:oracleoradatamydbcontrol01.ctl' compatible=9.0.0 db_name=mydb instance_name=mydb remote_login_passwordfile=exclusive STEP 4: Create Database Services C:>ORADIM -new -sid mydb -startmode auto Connect with instance as SYSDBA C:>set oracle_sid=mydb C:>sqlplus "/as sysdba" SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 1 13:01:47 2009 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to an idle instance.
  • 2. STEP 5: Startup the instance at NOMOUNT stage SQL> startup nomount pfile=C:oracleora92databaseinitMYDB.ora ORACLE instance started. Total System Global Area 97589952 bytes Fixed Size 453312 bytes Variable Size 46137344 bytes Database Buffers 50331648 bytes Redo Buffers 667648 bytes STEP 6: Issue the Create Database statement SQL> @"C:Documents and SettingsAdministratorDesktopdbcreate.sql" Database created. dbcreate.sql script create database mydb logfile GROUP 1 ('c:oracleoradatamydbredo01.log') size 5m, GROUP 2 ('c:oracleoradatamydbredo02.log') size 5m datafile 'c:oracleoradatamydbsystem01.dbf' size 200m / open the notepad and save this file as dbcreate.sql STEP 7: Run Scripts to Build Data Dictionary views SQL> @C:oracleora92rdbmsadmincatalog.sql SQL> @C:oracleora92rdbmsadmincatproc.sql STEP 8: Create Spfile from init.ora file. SQL> create spfile from pfile='C:oracleora92databaseinitMYDB.ora'; File created. SQL> shu immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup
  • 3. ORACLE instance started. Total System Global Area 97589952 bytes Fixed Size 453312 bytes Variable Size 46137344 bytes Database Buffers 50331648 bytes Redo Buffers 667648 bytes Database mounted. Database opened. creating undo tablespace SQL> create undo tablespace undotbs 2 datafile 'c:oracleoradatamydbundo01.dbf' size 100m; Tablespace created. SQL> alter system set undo_management=auto scope=spfile; System altered. SQL> alter system set undo_tablespace=undotbs scope=spfile; System altered. SQL> startup force ORACLE instance started. Total System Global Area 97589952 bytes Fixed Size 453312 bytes Variable Size 46137344 bytes Database Buffers 50331648 bytes Redo Buffers 667648 bytes Database mounted. Database opened. creating temporary tablespace SQL> create temporary tablespace temptbs 2 tempfile 'c:oracleoradatamydbtemp01.dbf' size 100m; Tablespace created. SQL> alter database default temporary tablespace temptbs; Database altered. creating tablespace for users SQL> create tablespace users
  • 4. 2 datafile 'c:oracleoradatamydbuser01.dbf' size 100m; Tablespace created. changing database from noarchivelog mode to archivelog SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination C:oracleora92RDBMS Oldest online log sequence 61 Current log sequence 62 step 1: SQL> shu immediate; step 2: SQL> startup mount step 3: SQL> alter database archivelog; Database altered. step 4: SQL> alter database open; Database altered. SQL> archive log list; Database log mode Archive Mode Automatic archival Disabled Archive destination C:oracleora92RDBMS Oldest online log sequence 61 Next log sequence to archive 62 Current log sequence 62 step 5: SQL> alter system set log_archive_start=true scope=spfile; System altered. SQL> startup force SQL> archive log list; Database log mode Archive Mode
  • 5. Automatic archival Enabled Archive destination C:oracleora92RDBMS Oldest online log sequence 62 Next log sequence to archive 63 Current log sequence 63 I HOPE THIS DOCUMENTATION WILL HELPS YOU DO CREATE A DATABASE. THANKS FOR READING THIS DOCUMENTATION. POSTED BY RAJESHKUMAR GOVINDARAJAN AT TUESDAY, MAY 26, 2009 0 COMMENTS TO THIS POST LABELS: 9I CONCEPTS, DATABASE CREATION WEDNESDAY, MAY 13, 2009 creating database with dbca creation of database using database configuration assitant(DBCA): steps for creating a database using dbca in a oracle server for both windows and linux environment follow the same procedure. for linux: open the terminal type dbca in the terminal eg: [oracle@localhost ~]$dbca welcome screen will appear if not [oracle@localhost ~]$$ORACLE_HOME/bin/dbca for windows open command prompt and type dbca, welcome screen will appear step 1: click NEXT to proceed. step 2: LINKS
  • 6. select create a database option, by default it will be create a database only and click NEXT to proceed. step 3: select General Purpose and then click NEXT to proceed. step 4: Enter your new database name eg:demo and click NEXT to proceed. step 4:
  • 10. now you can connect and work with your new database [oracle@localhost ~]ORACLE_SID=demo [oracle@localhost ~]sqlplus '/as sysdba'
  • 11. SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 13 00:45:19 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL>startup ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1218316 bytes Variable Size 79694068 bytes Database Buffers 83886080 bytes Redo Buffers 2973696 bytes Database mounted. Database opened. SQL> select name from v$database; NAME --------DEMO