-
Hi All
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.
Amol
-
Hi Amol,
I tried this code and it works.
sqlplus -s '<'<'EOF'
sys/password as sysdba
spool sss.txt;
select sysdate from dual;
spool off;
exit
EOF
cat sss.txt
SYSDATE
---------
12-JUL-02
PS: Don't put any quotes in the first line. I put it because the due to vbcode some characters were not displaying in the message.
Sanjay
[Edited by SANJAY_G on 07-12-2002 at 05:09 AM]
-
Hi!
sqlplus "/ as sysdba"
Ales The whole difference between a little boy and an adult man is the price of toys
-
Thanks a lot Sanjay and Ales,
Your tips not only helped me in this prblems but also helped to explore and try out new things. Thank you very much....
Amol
-
You can also start with sqlplus /nolog and then do a conn / as sysdba - which is what you need to do when creating a database in 9i.
-
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.
Amol
-
Hi,
Can you check you oracle executable file permission. It should set to setuid and setgid.
chmod u,g+s filename should do the trick.
regards,
feroz
-
Hi,
This site might help you:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x50ba854994d9d4118fef0090279cd0f9,00.html
regards,
feroz
-
HI
Do I need to modify privs of file 'oracle' in $ORACLE_HOME/bin
currently they are as follows :
-rwsr-s--x 1 oracle dba 37551088 Jul 1 05:10 oracle
Amol
-
Hi,
No. it looks fine.
regards,
feroz
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|