Nadeem M .: How To Create Oracle 11g Database Manually On Windows
Nadeem M .: How To Create Oracle 11g Database Manually On Windows
Nadeem M……….
My Blog to share my views on Oracle Database
Home
About
Type text to search here...
Home > Generic > How To Create Oracle 11g Database Manually on Windows
How To Create Oracle 11g Database Manually
on Windows
May 24, 2012 Nadeem M Leave a comment Go to comments
Below steps will help you to create 11.2.0.1 oracle database manually on windows
platform. These steps would remain same on all the Windows version such as XP, Vista
etc. Before starting the creation of the database, ensure you have Oracle Database binaries
installed.
1. Set up environment variables
1 C:\>set ORACLE_HOME=c:\oracle\product\11.2.0\dbhome_1
2 C:\>set PATH=%ORACLE_HOME%\bin;%PATH%
3 C:\>set ORACLE_SID=ORA11G
2. Create required directories
1 C:\>mkdir c:\oracle\db\ora11g\admin\adump
2 C:\>mkdir c:\oracle\db\ora11g\admin\dpdump
3 C:\>mkdir c:\oracle\db\ora11g\admin\pfile
4 C:\>mkdir c:\oracle\db\ora11g\diag
5 C:\>mkdir c:\oracle\db\ora11g\flash_recovery_area
6 C:\>mkdir c:\oracle\db\ora11g\oradata
3. Create the parameter file
Create the parameter file named initORA11G.ora under ORACLE_HOME/database
directory
1 db_name='ORA11G'
2 db_block_size=8192
3 memory_target=500m
4 processes=100
5 open_cursors=300
6 remote_login_passwordfile='EXCLUSIVE'
7 undo_tablespace='UNDOTBS1'
8 compatible ='11.2.0'
9 audit_trail ='db'
10 db_recovery_file_dest_size=5g
11 db_recovery_file_dest='c:\oracle\db\ora11g\flash_recovery_area'
12 audit_file_dest='c:\oracle\db\ora11g\admin\adump'
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 1/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
12 audit_file_dest='c:\oracle\db\ora11g\admin\adump'
13 diagnostic_dest='c:\oracle\db\ora11g\diag'
14 control_files = ('c:\oracle\db\ora11g\oradata\control1.ctl', 'c:\oracle\db\ora11g
4. Create a Windows service
Create a Windows service for Oracle instance and check the service status.
1 C:\>oradim ‐NEW ‐SID ora11g ‐STARTMODE manual
2 Instance created.
3
4 C:\>sc query oracleserviceora11g
5
6 SERVICE_NAME: oracleserviceora11g
7 TYPE : 10 WIN32_OWN_PROCESS
8 STATE : 4 RUNNING
9 (STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
10 WIN32_EXIT_CODE : 0 (0x0)
11 SERVICE_EXIT_CODE : 0 (0x0)
12 CHECKPOINT : 0x0
13 WAIT_HINT : 0x0
5. Connect to instance and create SPFILE
1 C:\>sqlplus
2
3 SQL*Plus: Release 11.2.0.1.0 Production on Wed May 23 07:39:54 2012
4
5 Copyright (c) 1982, 2010, Oracle. All rights reserved.
6
7 Enter user‐name: /as sysdba
8 Connected to an idle instance.
9
10 SQL> create spfile from pfile;
11
12 File created.
6. Start the instance with NOMOUNT mode
Startup the database with the newly created spfile.
1 SQL> startup nomount
2 ORACLE instance started.
3
4 Total System Global Area 523108352 bytes
5 Fixed Size 1375704 bytes
6 Variable Size 314573352 bytes
7 Database Buffers 201326592 bytes
8 Redo Buffers 5832704 bytes
7. Execute the CREATE DATABASE Command
1 CREATE DATABASE ORA11G
2 USER sys IDENTIFIED BY sys
3 USER system IDENTIFIED BY system
4 MAXLOGFILES 5
5 MAXLOGMEMBERS 3
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 2/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
5 MAXLOGMEMBERS 3
6 MAXDATAFILES 200
7 MAXINSTANCES 1
8 MAXLOGHISTORY 500
9 LOGFILE
10 GROUP 1 (
11 'c:\oracle\db\ora11g\oradata\redo01a.rdo',
12 'c:\oracle\db\ora11g\oradata\redo01b.rdo'
13 ) SIZE 50M,
14 GROUP 2 (
15 'c:\oracle\db\ora11g\oradata\redo02a.rdo',
16 'c:\oracle\db\ora11g\oradata\redo02b.rdo'
17 ) SIZE 50M,
18 GROUP 3 (
19 'c:\oracle\db\ora11g\oradata\redo03a.rdo',
20 'c:\oracle\db\ora11g\oradata\redo03b.rdo'
21 ) SIZE 50M
22 DATAFILE 'c:\oracle\db\ora11g\oradata\system01.dbf' SIZE 300M EXTENT MANAGEMENT
23 SYSAUX DATAFILE 'c:\oracle\db\ora11g\oradata\sysaux01.dbf' SIZE
24 UNDO TABLESPACE UNDOTBS1 DATAFILE 'c:\oracle\db\ora11g\oradata\undotbs01.dbf'
25 DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE 'c:\oracle\db\ora11g\oradata\temp01.db
26 CHARACTER SET WE8ISO8859P1
27 NATIONAL CHARACTER SET UTF8;
8. Create data dictionary objects
Run the catalog.sql and catproc.sql scripts to create the dictionary objects.
1 SQL> @%ORACLE_HOME%\rdbms\admin\catalog.sql
2 SQL> @%ORACLE_HOME%\rdbms\admin\catproc.sql
3 SQL> connect system/system
4 SQL> @%ORACLE_HOME%\sqlplus\admin\pupbld.sql
9. Enable Archiving
To enable archiving shutdown the database and startup it in mount status. Enable the
archiving and then open the database.
1 SQL> connect /as sysdba
2 SQL> shut immediate
3 Database closed.
4 Database dismounted.
5 ORACLE instance shut down.
6 SQL> startup mount
7 ORACLE instance started.
8
9 Total System Global Area 523108352 bytes
10 Fixed Size 1375704 bytes
11 Variable Size 314573352 bytes
12 Database Buffers 201326592 bytes
13 Redo Buffers 5832704 bytes
14 Database mounted.
15 SQL> alter database archivelog;
16
17 Database altered.
18
19 SQL> alter database open;
20
21 Database altered.
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 3/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
21 Database altered.
22
23 SQL> archive log list
24 Database log mode Archive Mode
25 Automatic archival Enabled
26 Archive destination USE_DB_RECOVERY_FILE_DEST
27 Oldest online log sequence 12
28 Next log sequence to archive 13
29 Current log sequence 13
10. Check for any invalid component or objects
1 SQL> select comp_id,version,status from dba_registry;
2
3 COMP_ID VERSION STATUS
4 ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐
5 CATALOG 11.2.0.1.0 VALID
6 CATPROC 11.2.0.1.0 VALID
7
8 2 rows selected.
9
10 SQL> select owner,object_name,object_type from all_objects where
11
12 no rows selected
If any invlaid components or objects are found then run utlrp.sql to validate them.
1 SQL> @%ORACLE_HOME%/rdbms/admin/utlrp.sql
About these ads
Like
One blogger likes this.
Related
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 4/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Categories: Generic Tags: 11.2, 11g, create oracle databsae, manual, windows
Comments (19) Trackbacks (0) Leave a comment Trackback
1.
Damien B
December 9, 2012 at 10:28 PM
Reply
Minor edit :
C:\>set PATH=%ORACLE_HOME%;%PATH%
should be
C:\>set PATH=%ORACLE_HOME%\bin;%PATH%
Nadeem M
December 10, 2012 at 2:24 AM
Reply
Thanks Damien. I corrected it.
2.
Yuvi
February 5, 2013 at 11:29 AM
Reply
I have Followed your steps to create the database, database is created where i
couldn’t able to see any entry in tnsnames.ora, there is no new SID for newly created
database.since there is no entry in tnsnames.ora i am unable to connect the database
remotely or via code.
Nadeem M
February 5, 2013 at 5:03 PM
Reply
Listener and TNS creation is not included in this article. To do the same you
can use Net Configuration Assistant (netca).
Start > Run > netca
3.
Anush
March 3, 2013 at 9:45 AM
Reply
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 5/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Excellent stuff Nadeem..
one minor edit ..for doing 9th step you need to connect as sys user..
Can we use the same script for 10g?
Nadeem M
March 6, 2013 at 11:50 PM
Reply
Obviously you need to connect as SYS user to shutdown the database. I have
added that for more clarity. And yes the steps and script can be used for 10g as
well.
4.
Alao
July 22, 2013 at 4:42 AM
Reply
where do i start from? do i have to install the oracle on my computer? i have
windows 7 on my system
Nadeem M
July 24, 2013 at 12:37 PM
Reply
Yes, as I mentioned you need to first install Oracle binaries before you start
creating the database.
5.
Shveta S.R
August 8, 2013 at 7:55 PM
Reply
could u give a possible link for installing the Oracle binaries.
6.
Shveta S.R
August 11, 2013 at 12:44 PM
Reply
wat do u type for the 3rd command…???
Nadeem M
September 4, 2013 at 2:04 AM
Reply
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 6/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Thanks for visiting my blog. You can check following Oracle Document to
Install Oracle Binaries.
11.2 DB Install Guide for Microsoft Windows
For the third step you need to create a simple text file with the required name
and parameters under $ORACLE_HOME/database.
7.
Dhanunjay
October 21, 2013 at 8:18 PM
Reply
Hi Nadeem,
Thanks for the article.
I got struck after creating Oracle instance.
If i am trying to connect oracle as below
Sqlplus / as sysdba
It is asking for the password.
Which password it mean
Thanks in advance.
Regards,
Dhanunjay
Nadeem M
October 25, 2013 at 7:18 PM
Reply
Ensure that the user is part of ORA_DBA Group. Metalink Note 730067.1 has
more details on similar issue.
8.
Noe
April 14, 2015 at 8:47 PM
Reply
Thanks. Clear and simple.
9.
Mohammad Shahnawaz
June 16, 2015 at 4:46 PM
Reply
as salamo alaikum wa rahmatullah nadeem sahab,
it is awesome article, i enjoy to follow the step, nothing problem if we go to step by
step.
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 7/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Thanking you
Mohd. Shahnawaz
10.
pathak1611pankaj
August 14, 2015 at 7:32 PM
Reply
Hi Nadeem,
Nice explanation with commands, I really appreciate this article.
Thanks a ton…!!
Pankaj
11.
kushal
December 31, 2015 at 12:06 PM
Reply
Nice
12.
dwaraka
March 18, 2016 at 2:14 PM
Reply
Thankyou verymuch its helped me a lot
13.
Srini
April 11, 2016 at 6:40 PM
Reply
nice documentation ,Thanks alot
1. No trackbacks yet.
Leave a Reply
Enter your comment here...
ORA16179 While Changing The Archive Destination List of Oracle Database Patch Set
Updates (PSU)
RSS feed
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 8/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Recent Posts
Page Expired Message Using Oracle EM
Cloud Control 12c
Oracle Enterprise Manager Cloud Control
12c (12.1.0.4) Installation
ORA01102 ORA09968 Error While
Starting Oracle Database
GoldenGate : ggsci: error while loading
shared libraries: libnnz11.so
Convert Database To ASM While
Upgrading to 11g via RMAN
Categories
ASM
Backup & Recovery
EM 12c Colud Control
Generic
Golden Gate
GRID
Install & Upgrade
Others
Performance
Related Links
10gR2 Oracle Documentation
11gR2 Oracle Documentation
12cR1 Oracle Documentation
Monthly Archives
April 2015
March 2015
September 2013
July 2013
September 2012
May 2012
March 2012
January 2012
October 2011
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 9/10
9/22/2016 How To Create Oracle 11g Database Manually on Windows | Nadeem M..........
Follow Blog via Email
Enter your email address to follow this blog and
receive notifications of new posts by email.
Join 27 other followers
Enter your email address
Follow
Top
Blog at WordPress.com.
https://nadeemmohammed.wordpress.com/2012/05/24/howtocreateoracle11gdatabasemanuallyonwindows/ 10/10