How to create database in oracle :
To create database in oracle, first of all, binaries should have been installed. Here our binaries are present at /u02/app/oracle/product/12201 location.Steps to create database in oracle are below:-
Step 1 : Go to /u02/app/oracle/product/12201/bin directory.
]$ ./dbca
Then Create a database.
Step 2: Click Advance configuration.
Step 3: Select the Database type as a Single instance database.
Step 4: Give the Global Database name as well as SID.
Here in Single Instance Database we usually keep both names as same, whereas in RAC both are different. Also, SID is the database name that you see in cat /etc/oratab.Step 5: Now, you have to select Storage for your database.
So before creating a database in oracle you have to do grid installation (ASM) where the actual data is stored. Here I have already installed ASM. So I have selected ASM as my storage type and the Create file destination is +DATA ( It is Diskgroup where actual data is present, also basic Notation for data in ASM that we basically use is +DATA and for Archives we use +FLASH/FRA).
Step 6: Select Size and Destination of Fash Recovery area.
As Discussed above Fast recovery area is place where we store archives of the database. Also, select the size of the fast recovery area as per your database size and retention (For how many days you want to keep your archives in the database). For longer retention use recovery catalog and save archive or backup data on tapes, as tape storage is much cheaper.
Step 7: Listener Configuration
The default port for Listener is 1521. Here we just selected that. Now the question arises what is the listener? As we know user's with the help of the Application server connect the database. The listener's work is to make a connection of application users with the database. Once the connection is established, now if the listener goes down connection still remains.
Step 8: Memory Configurations
Now select the size of SGA and PGA, as per your application configurations.Step 9: Process Configuration
How many users concurrently can make connections with database ( That depends on the type of application for which you are making the database). Also, whether you are using dedicated server mode or Shared server mode will decide how many processes you gonna require.Step 10: Character set
Just select the language of the database. You can see these values in (v$nls_parameters).
Step 11: Connection Mode
Select as per your application design and configuration. Also, remember one thing the most resource-consuming task for the database is to make as well as remove connections. So to improve the performance of the database if so many connections are coming and leaving, it is a big overhead. So use dedicated mode if database is not going to be used by too many users concurrently.Step 12: Sample schemas
Just uncheck this, as we don't require this to create database in oracle.
Step 13: OEM configuration
This can be done in the future if required.
Step 14: Set sys user password.
Step 15: Create database
Step 16: Set all initialization parameters.
One major thing to remember is if you do not have a license for the control management pack. Then replace TUNING+DIAGNOSTIC to NONE in the initialization parameters.Step 17: Custom storage Location and management.
In this Set Minimum datafiles to 512. As this is not dynamic parameters so in the future if you have to change this you have to bounce the database. Better to increase this now, while creating database.Step 18: Redo Log Group size
Redo log group size should be tuned because if its size is small then database has to do too many log switches, which might increase overhead on I/O due to too many write operations. So tuned/determine the redo log group size as per the size of the database and how fastly users are updating, writing into the database.Step 19: Click next
Step 20: Recheck all configurations you have done till now.
Step 21: Finish
You have successfully created database in oracle.
Once installed set environment variable and you can use the vanilla database.
Thanks and Enjoy Learning!!
No comments:
Post a Comment