I am writing a shell script to connect directly to sys user as a dba. However I cannot write something 'sqlplus sys as sysdba' as it gives me the error (I am on 9i with RH 7.2) it says the syntax is not correct. I tried even sqlplus / nolog but it also gives error for that. What can I do as I want to connect as sysdba even when database is down using shell script.
I wrote a the following script which works with problems
--------------------------------------------------------------------------------------
sqlplus -s <
sqlplus /nolog
conn /as sysdba
startup
exit
EOF
--------------------------------------------------------------------------------------
It gives the following problem
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
ORACLE instance started.
Total System Global Area 336356520 bytes
Fixed Size 279720 bytes
Variable Size 268435456 bytes
Database Buffers 67108864 bytes
Redo Buffers 532480 bytes
Database mounted.
Database opened.
Now what can be the problem as I am not machine with 512 m RAM. I searched on error code but there is no good answer about startups.. Why is it creating problems.
Bookmarks