Steps for Oracle setup in Lunix/Unix Environment:
Step1: Login admin user (sudo su -)
Step2: Set the below paths in .bash-profile and .bash-rc
ex:
[root@systemname bin]# export ORACLE_BASE=/u01/app/scc-dev/product
[root@systemname bin]# export ORACLE_HOME=/u01/app/scc-dev/product/12.1.0/dbhome_1
[root@systemname bin]# export PATH=/u01/app/scc-dev/product/12.1.0/dbhome_1/bin:$PATH
[root@systemname bin]# export PATH=/usr/sbin:$PATH
[root@systemname bin]# export LD_LIBRARY_PATH=$/u01/app/scc-dev/product/12.1.0/dbhome_1/lib:/lib:/usr/lib
[root@systemname bin]# export CLASSPATH=$/u01/app/scc-dev/product/12.1.0/dbhome_1/jlib:/u01/app/scc-dev/product/12.1.0/dbhome_1/rdbms/jlib
[root@systemname bin]# export ORACLE_SID=orcl
[root@systemname bin]# export ORACLE_UNQNAME=orcl
[root@systemname bin]# export ORACLE_HOSTNAME=localhost
Step 3: Check the Oracle server starts or not?
[root@systemname bin]# lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-JUN-2015 12:24:28
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=systemname.company.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Step 4: Please give the bin folder and go to the oraenv and type the 'orcl'
[root@systemname bin]# . /usr/local/bin/
coraenv dbhome oraenv
[root@systemname bin]# . /usr/local/bin/oraenv
ORACLE_SID = [orcl] ? orcl
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID root.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /u01/app/scc-dev/product
Step 5: If show's above message, Please go through below folder and delete the all content.
[root@systemname bin]# ls /var/tmp/.oracle/
s#11910.1 s#11910.2 sEXTPROC1521
[root@systemname bin]# rm -rf /var/tmp/.oracle/*
[root@systemname bin]# ls /var/tmp/.oracle/
Step 6: Check the status the oracle 12C
[root@systemname bin]# lsnrctl status
bash: lsnrctl: command not found...
[root@systemname bin]# . /usr/local/bin/oraenv
ORACLE_SID = [orcl] ? orcl
bash: dbhome: command not found...
ORACLE_HOME = [] ? /u01/app/scc-dev/product/12.1.0/dbhome_1
The Oracle base has been changed from /u01/app/scc-dev/product to /u01/app/scc-dev
[root@systemname bin]# lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-JUN-2015 12:27:13
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=systemname.company.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Step 7: Login the admin user with using admin password
[root@systemname bin]# sqlplus SYS as SYSDBA
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 12:27:34 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
Step 8: First run the below command (startup)
SQL> startup;
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 2925072 bytes
Variable Size 1056968176 bytes
Database Buffers 587202560 bytes
Redo Buffers 13848576 bytes
Database mounted.
Database opened.
Step 9: Please create the username and password and give the permissions as well as.
SQL> CREATE USER dasu_username IDENTIFIED BY company_123;
User created.
SQL> grant all privileges to dasu_username;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[root@systemname bin]# sqlplus dasu_username
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 12:32:37 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> exit
Note: Please refer the below url for more details:
http://www.thegeekstuff.com/2009/05/oracle-lsnrctl-listener-shutdown-and-startup-procedures/
Step1: Login admin user (sudo su -)
Step2: Set the below paths in .bash-profile and .bash-rc
ex:
[root@systemname bin]# export ORACLE_BASE=/u01/app/scc-dev/product
[root@systemname bin]# export ORACLE_HOME=/u01/app/scc-dev/product/12.1.0/dbhome_1
[root@systemname bin]# export PATH=/u01/app/scc-dev/product/12.1.0/dbhome_1/bin:$PATH
[root@systemname bin]# export PATH=/usr/sbin:$PATH
[root@systemname bin]# export LD_LIBRARY_PATH=$/u01/app/scc-dev/product/12.1.0/dbhome_1/lib:/lib:/usr/lib
[root@systemname bin]# export CLASSPATH=$/u01/app/scc-dev/product/12.1.0/dbhome_1/jlib:/u01/app/scc-dev/product/12.1.0/dbhome_1/rdbms/jlib
[root@systemname bin]# export ORACLE_SID=orcl
[root@systemname bin]# export ORACLE_UNQNAME=orcl
[root@systemname bin]# export ORACLE_HOSTNAME=localhost
Step 3: Check the Oracle server starts or not?
[root@systemname bin]# lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-JUN-2015 12:24:28
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=systemname.company.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Step 4: Please give the bin folder and go to the oraenv and type the 'orcl'
[root@systemname bin]# . /usr/local/bin/
coraenv dbhome oraenv
[root@systemname bin]# . /usr/local/bin/oraenv
ORACLE_SID = [orcl] ? orcl
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID root.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /u01/app/scc-dev/product
Step 5: If show's above message, Please go through below folder and delete the all content.
[root@systemname bin]# ls /var/tmp/.oracle/
s#11910.1 s#11910.2 sEXTPROC1521
[root@systemname bin]# rm -rf /var/tmp/.oracle/*
[root@systemname bin]# ls /var/tmp/.oracle/
Step 6: Check the status the oracle 12C
[root@systemname bin]# lsnrctl status
bash: lsnrctl: command not found...
[root@systemname bin]# . /usr/local/bin/oraenv
ORACLE_SID = [orcl] ? orcl
bash: dbhome: command not found...
ORACLE_HOME = [] ? /u01/app/scc-dev/product/12.1.0/dbhome_1
The Oracle base has been changed from /u01/app/scc-dev/product to /u01/app/scc-dev
[root@systemname bin]# lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-JUN-2015 12:27:13
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=systemname.company.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Step 7: Login the admin user with using admin password
[root@systemname bin]# sqlplus SYS as SYSDBA
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 12:27:34 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
Step 8: First run the below command (startup)
SQL> startup;
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 2925072 bytes
Variable Size 1056968176 bytes
Database Buffers 587202560 bytes
Redo Buffers 13848576 bytes
Database mounted.
Database opened.
Step 9: Please create the username and password and give the permissions as well as.
SQL> CREATE USER dasu_username IDENTIFIED BY company_123;
User created.
SQL> grant all privileges to dasu_username;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[root@systemname bin]# sqlplus dasu_username
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 12:32:37 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> exit
Note: Please refer the below url for more details:
http://www.thegeekstuff.com/2009/05/oracle-lsnrctl-listener-shutdown-and-startup-procedures/
No comments:
Post a Comment
I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.