The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.
1) log in to the server
2)Confirm the DB name and services are running or not?
3)set the environment variable?
4)connect sqlplus
1) log in to the server
2)Confirm the DB name and services are running or not?
[oracle@ltitest ~]$ ps -ef |grep pmon
oracle 3511 3166 0 12:30 pts/0 00:00:00 grep --color=auto pmon
[oracle@ltitest ~]$
Note: services aren't running
3)set the environment variable?
[oracle@ltitest ~]$ . oraenv
ORACLE_SID = [oracle] ? Here type your database name
The Oracle base has been set to /u01/app/oracle
[oracle@ltitest ~]$
4)connect sqlplus
[oracle@ltitest ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 22 12:32:26 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
Note: in that case, DB is down so we need to start my database.
SQL> startup;
ORACLE instance started.
Total System Global Area 713031680 bytes
Fixed Size 2928488 bytes
Variable Size 587202712 bytes
Database Buffers 117440512 bytes
Redo Buffers 5459968 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DBNAME READ WRITE
SQL>
Thanks for your time!!
Thanks
Rameshbabu
0 Comments