Sponsored Content
Top Forums Shell Programming and Scripting Switching user to oracle to connect Oracle 11g DB with 'sysdba' Post 302628233 by cero on Monday 23rd of April 2012 06:56:40 AM
Old 04-23-2012
Hi,
there are some syntactical errors with quoting and the here-documents. Try this:
Code:
su - oracle -c 'sqlpus -s / as sysdba <<EOF
        whenever sqlerror exit sql.sqlcode;
        set echo off 
        set heading off
    
        shutdown immediate
        startup mount
        alter database archivelog;
        alter database open;
        
        exit;
EOF
'

The terminating delimiter of there here-doc has to be the only string in its line and not indented (unless you use <<-).
 

3 More Discussions You Might Find Interesting

1. Programming

Help on a perl script to connect to oracle ASM as sysdba

I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database. This is because, a cluster has more than 4 databases running and a check on... (0 Replies)
Discussion started by: sai_rsk
0 Replies

2. Shell Programming and Scripting

Use perl to connect to Oracle ASM as sysdba

I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database. This is because, a cluster has more than 4 databases running and a check on... (1 Reply)
Discussion started by: sai_rsk
1 Replies

3. UNIX and Linux Applications

Identify a specific environment Oracle variable to connect a remote Oracle database ?

Good evening I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus. I tried to find out the user/passwd and service name by env variable and all Ive got is this: ORACLE_SID_REPCOL=SCL_REPCOL ORACLE_SID=xmeta ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
NGORCA(1)							   User Manuals 							 NGORCA(1)

NAME
ngorca - Password recovery tool for Oracle databases SYNOPSIS
ngorca [ -f hashfile ] [ OPTIONS ] DESCRIPTION
ngorca is a multithreaded password recovery tool using exhaustive key search for Oracle versions 7-11g Rel.2. Due to the weak hashing algorithm and constantly improving hardware performance, passwords can be found in minutes, depending on their length. OPTIONS
-f hashfile To use ngorca a list of usernames and hashes is required, which has the format username:hash. The username has a maxiumum length of 64 characters and the hash is always a 16 byte hex value. If the 11g algorithm is used a 40 byte SHA1 plus 20 bytes salt must be added. The hash values are calculated one after another. Example of hash file entry with old DES hash and SHA1 hash: NETGARAGE:5D7F5FD88AE4C07F:EAC3EAC57FF0635AB298EB40CBDA1BB45DFC1B7F20464AA591C1613A2CB8 -l password length The length of the password. If this option is not set, passwords with the length of 5-8 bytes are calculated. -c charset The charset of the password. 1 for numeric, 2 for alpha, 3 for alpha numeric and 4 for alpha numeric with special characters. The default is alpha numeric. -t thread number The number of threads which should be used. It is recommended to take the number of cpu's which you want to involve in the calcula- tion for the best result. Per default one thread is used. -o logfile A logfile could be specified. It contains the passwords which are found and some info messages. The default logfile name is ngorca.log placed in the directory the binary runs in. -v verbose level Loglevel for the logfile and standard output 1-4 with 4 as the highest level which contains percent printouts. The default loglevel is 1. EXAMPLE
ngorca -f hashlist -c3 -l6 -t2 -v4 BUG REPORT
For bugreporting write a mail to ebrosius@netgarage.org or use the issues tracker on the project hosting site http://code.google.com/p/ngoca COPYRIGHT
ngorca is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AUTHOR
Dennis Krzyzaniak <ebrosius@netgarage.org> SEE ALSO
the project site http://netgarage.org Linux October 2009 NGORCA(1)
All times are GMT -4. The time now is 09:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy