After I executed the above command, I saw that there was \n at the end, corrected that and when I run my shell script, I get the prompt to enter username and password and once entered I am getting the error "ORA-12545: Connect failed because target host or object does not exist". Is it because I have @SID?
---------- Post updated Jun 2nd, 2015 at 03:46 AM ---------- Previous update was Jun 1st, 2015 at 08:17 PM ----------
Thanks for all your help...problem resolved...this is what I did...
and that's it...now I am able to connect to database and insert from sample csv file...
thanks again for your help...
Thanks & Regards,
Sudhakara.T.P.
Last edited by Don Cragun; 06-01-2015 at 07:32 PM..
Reason: Add CODE tags.
Hi,
I would like to write a Korn shell script which will remove files older than a certain date. In my script, it will read a configuration file with the following entries:
# <directory> <filename wildcard>
#
/home/philip/log *.log
/home/philip/log1 delete-me*.log
The... (1 Reply)
Hi All,
We have requirement to read XML details from large Log File and save in new file name. I have enclosed the sample xml which has start tag <OUTBOUND_MESSAGE xmlns="http://www.abc.com"> and the end tag as </OUTBOUND_MESSAGE>
The log file contains many lines with other details which... (6 Replies)
Hello all,
Please let me know if anyone have the idea how to read the configuration file from the shell script?
Thanks in advance,
Nishanth (7 Replies)
Hi,
Could someone tell me how to stop SQLPLUS command from printing the connection details in the console.
Below is the lines i get in console when executing the sqlplus...
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 9 03:31:03 2011
Copyright (c) 1982, 2005, Oracle. All rights... (2 Replies)
How to find the entire configuration details of a solaris.
I need to know what partion were made, which OS is used and wat version is used etc...
Thanks to tell (4 Replies)
Hi,
How to find the cpu configuration details of Cores, Speed MHz, virtual processors for the following servers:
LINUX OS Servers:
Linux 2.6.9-89.0.3.ELsmp #1 SMP Sat Jun 13 07:05:54 EDT 2009 i686 i686 i386 GNU/Linux. (Cores, Speed, Processor)
Linux 2.6.18-164.el5 #1 SMP Tue Aug 18... (5 Replies)
Hi for all!
I need for my job one shell script very concrete about connection to oracle databases and writing to text file.
Well I tell you:
1.- I must read a file as parameter from linux interface:
> example.sh fileToRead
2.-I must read line to line in "fileToRead" and take a... (9 Replies)
hi all,
I have flat file in unix. By using sql loader i need to import the data from the flat file. I have created a control file, table with the below data structure and pasted the sample input file. I am not sure whether it is a right way to do it. can anyone provide the thought on this.
... (2 Replies)
Hi All,
unable to fetch the bios configuration information and service provider information in centos 5 using dmidecode command.
ServiceProvider=`dmidecode -s system-product-name |awk '{print $1}'`
BIOS_Configuration=`dmidecode | grep "BIOS Information" -A10 | grep -e... (4 Replies)
Discussion started by: sravani25
4 Replies
LEARN ABOUT OSX
dropdb
DROPDB(1) PostgreSQL Client Applications DROPDB(1)NAME
dropdb - remove a PostgreSQL database
SYNOPSIS
dropdb [ option... ] dbname
DESCRIPTION
dropdb destroys an existing PostgreSQL database. The user who executes this command must be a database superuser or the owner of the data-
base.
dropdb is a wrapper around the SQL command DROP DATABASE [drop_database(7)]. There is no effective difference between dropping databases
via this utility and via other methods for accessing the server.
OPTIONS
dropdb accepts the following command-line arguments:
dbname Specifies the name of the database to be removed.
-e
--echo Echo the commands that dropdb generates and sends to the server.
-i
--interactive
Issues a verification prompt before doing anything destructive.
dropdb also accepts the following command-line arguments for connection parameters:
-h host
--host host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory
for the Unix domain socket.
-p port
--port port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections.
-U username
--username username
User name to connect as.
-w
--no-password
Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as
a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to
enter a password.
-W
--password
Force dropdb to prompt for a password before connecting to a database.
This option is never essential, since dropdb will automatically prompt for a password if the server demands password authentication.
However, dropdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W
to avoid the extra connection attempt.
ENVIRONMENT
PGHOST
PGPORT
PGUSER Default connection parameters
This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see in the documentation).
DIAGNOSTICS
In case of difficulty, see DROP DATABASE [drop_database(7)] and psql(1) for discussions of potential problems and error messages. The
database server must be running at the targeted host. Also, any default connection settings and environment variables used by the libpq
front-end library will apply.
EXAMPLES
To destroy the database demo on the default database server:
$ dropdb demo
To destroy the database demo using the server on host eden, port 5000, with verification and a peek at the underlying command:
$ dropdb -p 5000 -h eden -i -e demo
Database "demo" will be permanently deleted.
Are you sure? (y/n) y
DROP DATABASE demo;
SEE ALSO createdb(1), DROP DATABASE [drop_database(7)]
Application 2010-05-14 DROPDB(1)