Sponsored Content
Top Forums Shell Programming and Scripting UNIX Sqlplus - Capture the sql statement about to run and execution status Post 302980060 by vgersh99 on Tuesday 23rd of August 2016 11:16:29 AM
Old 08-23-2016
Code:
{
sqlplus -s username/password@servername <<EOF
...
EOF
} > ${drctry}/${v_timestamp}_unix_sql_log.txt

This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

2. UNIX for Advanced & Expert Users

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

3. Shell Programming and Scripting

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

4. Shell Programming and Scripting

Executing a Oracle SQL statement in a UNIX script

Hi All, I need to select one column from a table based upon the passed in parameter. I tried this: sqlplus -silent $MISP_USER << EOF set feedback off; set verify off; set sqlprompt "" SELECT mail_flag FROM dailyjobs WHERE job_name = '$1'; exit 0 EOF exit... (1 Reply)
Discussion started by: ganga.dharan
1 Replies

5. UNIX for Dummies Questions & Answers

how to capture no. of rows updated in update sql in unix db2

hi, i am a new user in unix..and we have unix db2. i want to capture the no. of rows updated by a update db2 sql statement and redirect into a log file. I've seen db2 -m...but not sure how the syntax should be. The update sql that I'm going to run is from a file... Can you please share... (1 Reply)
Discussion started by: j_rymbei
1 Replies

6. Shell Programming and Scripting

Need to capture error of sybase sql in unix

Hi Gurus, I am very new in Unix, I have 1 script, in which I am truncating the table , then BCP the data in Sybase table, and then loading the data from sybase table to sybase table. every thing is working fine, but the problem is with Error. I made some hanges in my insert statement so... (1 Reply)
Discussion started by: aksar
1 Replies

7. UNIX for Dummies Questions & Answers

unix script with SQL statement problem

Hello, I have a script to get the information from database, however, it's look like the loop is not work, can someone help? :confused: echo Input file list to check: read filelist for file in 'cat $filelist.txt' do echo "select FILENAME from FILE_TABLE where filename like '${file}'%;" >>... (9 Replies)
Discussion started by: happyv
9 Replies

8. UNIX for Dummies Questions & Answers

SQL statement is not work on unix script

Hi, I have the following basic script. However, the statement (line 5) is not work. The output data is not able to set my request format a30. Any advise? :mad: echo " Column filename format a30"|sqlplus4 echo Input file list to check: read filelist for file in `cat $filelist.txt` do... (1 Reply)
Discussion started by: happyv
1 Replies

9. Shell Programming and Scripting

UNIX variable to SQL statement

The following is my script : #!/bin/bash echo "please give app_instance_id" read app_instance_id echo "id is $app_instance_id" export app_id=app_instance_id sqlplus -s nnviewer/lookup@//nasolora008.enterprisenet.org:1521/LOAD3 @test.sql<<EOF SPOOL /home/tibco/MCH/Data/qa/raak/name.xls... (4 Replies)
Discussion started by: raakeshr
4 Replies

10. Shell Programming and Scripting

Connecting sqlplus from UNIX with multiple select statement

hi, i have a requirement where i need to connect sqlplus from unix and i am able to do so by following command: cust_count=`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF set pagesize 0 set feedback off set verify off ... (1 Reply)
Discussion started by: lovelysethii
1 Replies
dsconfigldap(1) 					    BSD General Commands Manual 					   dsconfigldap(1)

NAME
dsconfigldap -- LDAP server configuration/binding add/remove tool. SYNOPSIS
dsconfigldap [-fvixsgmeSN] -a servername [-n configname] [-c computerid] [-u username] [-p password] [-l username] [-q password] dsconfigldap [-fviSN] -r servername [-u username] [-p password] [-l username] [-q password] options: -f force authenticated binding/unbinding -v verbose logging to stdout -i prompt for passwords as required -x choose SSL connection -s enforce secure authentication only -g enforce packet signing security policy -m enforce man-in-middle security policy -e enforce encryption security policy -S do not update search policies -N do not prompt about adding certificates -h display usage statement -a servername add config of servername -r servername remove config of servername -n configname name given to LDAP server config -c computerid name used if binding to directory -u username privileged network username -p password privileged network user password -l username local admin username -q password local admin password DESCRIPTION
dsconfigldap allows addition or removal of LDAP server configurations. Presented below is a discussion of possible parameters. Usage has three intents: add server config, remove server config, or display help. Options list and their descriptions: -f Bindings will be established or dropped in conjunction with the addition or removal of the LDAP server configuration. -v This enables the logging to stdout of the details of the operations. This can be redirected to a file. -i You will be prompted for a password to use in conjunction with a specified username. -s This ensures that no clear text passwords will be sent to the LDAP server during authentication. This will only be enabled if the server supports non-cleartext methods. -e This ensures that if the server is capable of supporting encryption methods (i.e., SSL or Kerberos) that encryption will be enforced at all times via policy. -m This ensures that man-in-the-middle capabilities will be enforced via Kerberos, if the server supports the capability. -g This ensures that packet signing capabilities will be enforced via Kerberos, if the server supports the capability. -x Connection to the LDAP server will only be made over SSL. -S Will skip updating the search policies. -N Will assume Yes for installing certificates -h Display usage statement. -a servername This is either the fully qualified domain name or correct IP address of the LDAP server to be added to the DirectoryService LDAPv3 configuration. -r servername This is either the fully qualified domain name or correct IP address of the LDAP server to be removed from the DirectoryService LDAPv3 configuration. -n configname This is the UI configuration label that is to be given the LDAP server configuration. -c computerid This is the name to be used for directory binding to the LDAP server. If none is given the first substring, before a period, of the hostname (the defined environment variable "HOST") is used. -u username Username of a privileged network user to be used in authenticated directory binding. -p password Password for the privileged network user. This is a less secure method of providing a password, as it may be viewed via process list. For stronger security leave the option off and you will be prompted for a password. -l username Username of a local administrator. -q password Password for the local administrator. This is a less secure method of providing a password, as it may be viewed via process list. For stronger security leave the option off and you will be prompted for a password. EXAMPLES
dsconfigldap -a ldap.company.com The LDAP server config for the LDAP server myldap.company.com will be added. If authenticated directory binding is required by the LDAP server, then this call will fail. Otherwise, the following parameters configname, computerid, and local admin name will respectively pick up these defaults: ip address of the LDAP servername, substring up to first period of fully qualified hostname, and username of the user in the shell this tool was invoked. dsconfigldap -r ldap.company.com The LDAP server config for the LDAP server myldap.company.com will be removed but not unbound since no network user credentials were sup- plied. The local admin name will be the username of the user in the shell this tool was invoked. SEE ALSO
opendirectoryd(8), odutil(1) Mac OS April 24 2010 Mac OS
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy