Sponsored Content
Top Forums Shell Programming and Scripting connect to sqlplus from shell Post 302106157 by aya_r on Tuesday 6th of February 2007 11:59:55 PM
Old 02-07-2007
connect to sqlplus from shell

I'm writting a shell script and at the begining I login to sqlplus by
sqlplus -l user_name/password@instance
what I would like is to check if the database is down or not , and if the database has started moved to the next step else sleep for a certain time and then check again .
I know how to do the sleep part, but I don't know how to check if the database is not down. can some one help me please.

Thanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sqlplus and shell scripting

i would like to learn how to integrate my little knowledge in shell scripting with sqlplus. well... i know how to make basic query in sqlplus but i dont know how i can integrate it with shell script. can someone :) please help me on this? can you give me some basic example on how to do this kind of... (10 Replies)
Discussion started by: inquirer
10 Replies

2. Shell Programming and Scripting

calling sqlplus from shell

Hi All, I am executing the following code :- sqlplus -s ${DATABASE_USER} |& print -p -- 'set feed off pause off pages 0 head off veri off line 500' print -p -- 'set term off time off serveroutput on size 1000000' print -p -- "set sqlprompt ''" print -p -- "SELECT run_command from... (2 Replies)
Discussion started by: suds19
2 Replies

3. Shell Programming and Scripting

connect to sqlplus in a script

Hi, I want to write a script, in which I will connect to sqlplus and do a quary and then exit sqlplus user/pwd@database select count(*) from table exit. and write the result in a log file. How to write it ? Many thanks before. (1 Reply)
Discussion started by: big123456
1 Replies

4. UNIX for Dummies Questions & Answers

connect sqlplus from unix

hi, I have this basic query. I have created a new user on unix. I have given home directory and permission through chmod to create directory stucture. Now need to connect sqlplus. What permissions should we give, so that this works? Any help is appreciated. Thanks, Neha (1 Reply)
Discussion started by: nehak
1 Replies

5. UNIX for Dummies Questions & Answers

Switch from SQLPlus to shell?

What is the command for when you are in SQLPlus and want to go back to the shell prompt without actually exiting SQLPLus? Thanks. (2 Replies)
Discussion started by: Sepia
2 Replies

6. Programming

Shell SQLPlus

Hi, I am trying to execute the update statment in shell sqlplus.But nothing prompts.if i do ctrl+c i got the below error. SQL> update table set enabled='N' where type_code='xx'; ^C update table set enabled='N' where type_code='xx' * ERROR at line 1: ORA-01013: user requested... (2 Replies)
Discussion started by: nmahendran
2 Replies

7. Shell Programming and Scripting

sqlplus in shell script

Hi When I use sqlplus in shell script, I get sqlplus: command not found. ORACLE_HOME is not set. How to set ORACLE_HOME in unix? Thanks (3 Replies)
Discussion started by: vinoth_kumar
3 Replies

8. UNIX for Advanced & Expert Users

Unable to connect to sqlplus from unix

Hi, I have been trying to connect to sqlplus the same way I used to do in my earlier company but I get these error messages , please suggest way out - user name - xyzuser schema name - xyzschema $ sqlplus xyzuser@xyzschema ksh: sqlplus: not found. $ sqlplus -s xyzuser@xyzschema... (5 Replies)
Discussion started by: dhirajdsharma
5 Replies

9. Shell Programming and Scripting

Connect to Oracle using sqlplus

I have logged into oracle using SQLPLUS. When I type any kind of query, there is only 1 answer - '2'. What is wrong with it? (1 Reply)
Discussion started by: Subhasis
1 Replies

10. Shell Programming and Scripting

Sqlplus shell

friends because when calling a sqlplus from a shell it brings me the following message sqlplus -s $BDDUSER/$BDDPASS@$BDDHOST @$DIR_SQL/prueba.sql echo "bandera 3 " $? STATUS=$? if ;then echo "bandera 4 " $? #log_info "La ejecucion de... (1 Reply)
Discussion started by: tricampeon81
1 Replies
pwck(1M)																  pwck(1M)

NAME
pwck, grpck - password/group file checkers SYNOPSIS
[password [shadow]] [password] [file] DESCRIPTION
scans fields in the password and shadow files and reports any inconsistencies to standard error. The checks include validation of the num- ber of fields, login name, user ID, group ID, and whether the login directory and optional program exist. In addition, if the root entry shows a program, it can only be one of: or The default password file is The default shadow file is For additional verification, use to check consistency between entries in the password and shadow files. verifies all entries in the group file and reports any inconsistencies to standard error. This verification includes a check of the number of fields, group name, group ID, and whether all login names appear in the password file. The default group file is Options recognizes the following options: Check inconsistencies with the Protected Password database. It calls Check encrypted password lengths that are greater than 8 characters. DIAGNOSTICS
Group entries in with no login names are flagged. WARNINGS
Successful password file validation is not sufficient for proper system operation. To help maintain consistency with other system data- bases, editing of the password file with is discouraged. HP recommends that you use or to edit HP-UX 11i Version 3 is the last release to support trusted systems functionality. DEPENDENCIES
NFS and check only the local password, shadow and group files. The Network Information Service database is not checked. AUTHOR
was developed by AT&T and HP. FILES
SEE ALSO
authck(1M), pwconv(1M), vipw(1M), group(4), passwd(4), shadow(4). STANDARDS CONFORMANCE
pwck(1M)
All times are GMT -4. The time now is 07:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy