![Page 1: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/1.jpg)
Manual Database Creation in Linux Machine
Screen Shot 1: Before ecreating the database let us check the free space available in the disk,df –h depending up on the size we can select one drive and we can create the database there it self
![Page 2: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/2.jpg)
Screen Shot 2: make directories for databse contents like control file,redolog files anything,here we are creating a database testdb for that we are creating a folder testdb and sub-folders as adump bdump cdump udump and oradata to keep the files separate
![Page 3: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/3.jpg)
Screen Shot 3: before going for next process lets check the permissions of the directory testdb and change the permissions if needed
![Page 4: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/4.jpg)
Screen Shot 4: the permissions can be changed by using the command chown –R oracle:dba testdb
![Page 5: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/5.jpg)
Screen Shot 5: now select ll command to see the permissions , now the permissions of the directory testdb is set to oracle and dba group
![Page 6: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/6.jpg)
Before going for further database creation lets see the process of database,
After creating thedatabase the first stage it will go to NOMOUNT stage by using only P-FILE
So we need to create pfile,as we don’t know the contents inside the p-file we are going to copy a file from previous database and we are can
modify the required contents
As spfile is in binary format we are using pfile
DATABASE NO MOUNT
SPFILE or PFILE
![Page 7: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/7.jpg)
Screen Shot 6: for pfile we are searching for the already existed database ,spfile or pfile reside on $ORACLE_HOME/dbs location
![Page 8: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/8.jpg)
Screen Shot 7: Here we ca see the spfile which is spfilegun.ora
![Page 9: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/9.jpg)
Screen Shot 8:here we are copying the file to testdb/oradata/ location
![Page 10: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/10.jpg)
Screen Shot 9 : now open the spfile by using the command vi spfilegun.ora
![Page 11: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/11.jpg)
Screen Shot 10 : In another terminal open another file as vi inittestdb.ora it is nothing but pfile which we are going to create
![Page 12: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/12.jpg)
Screen Shot 11 : copy the required content from spfile and paste it in pfile and do necessary modifications and save & quiet the file by using
the commands :wq!
![Page 13: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/13.jpg)
Screen Shot 12 : Now we can check the pfile is there in /testdb/oradata
![Page 14: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/14.jpg)
Screen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script and do necessary
modifications and :wq!
![Page 15: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/15.jpg)
Screen Shot 14 : Before going for sql lets set ORACLE_SID=testdb as our database name is testdb
![Page 16: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/16.jpg)
Screen Shot 15 :start sql by using !sq and start into nomount phase by using pfile, the command for this is shown below
startup nomount pfile=’inittestdb.ora’;
![Page 17: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/17.jpg)
Screen Shot 16 : after pfile then execute @sampledb.sql , after few minnutes we can seea message as database created
![Page 18: Manual_database_creation_in_linux_machine - Pavan Web viewScreen Shot 13 : the creation of pfile work is over we have to create .sql file which contains script copy – paste the script](https://reader033.vdocument.in/reader033/viewer/2022051717/5a6fadff7f8b9ac0538b5056/html5/thumbnails/18.jpg)
After creating the database we need to run two scripts
catalog.sql and catproc.sql
which these two reside on ORACLE_HOME(oracle s/w location)
these scripts will take a few minutes to complete
after running the scripts we register this newly created databse in oratab (cat /etc/oratab)