If you are on UNIX (not sure about other OS), then if you can make it work, the second method is more secure - other users that can list processes can see the username and password in the process listing if you specify
sqlplus system/manager@database
If you can't make it work, try
sqlplus system@database
This will allow other users to see the username in a process listing, but not the password. You will then be prompted for the password.
I setted the TWO_TASK to INSTANCE_NAME it worked ! But if i set it to SERVICE_NAME , it doesn't like.
Thanks for your help.
Can u explain me what is TWO_TASK variable is for ? And differnece between running sqlplus and keying in password and user name on request rather then writing
sqlplus user/password@INSTANCE on command line
You are setting your instance name locally (temporarily for that session) thru two_task parameter and connecting to SQL*Plus. So , it defaults to what you have set in TWO_TASK parameter.
You care connecting to whatever the service_name/database you wanted by explicitly specifying @xyz.
One other point I would like to make using sqlplus direct connection is as follows. If you are just planning to use the sql editor to execute the sqcripts or do query form the client manchine and would only be connecting to one perticular instance, then use TWO_TASK. But again you don't have to worry that you wouldn't be able to connect to the other systems, other than TWO_TASK, you can use
sqlplus user_name@service_name
Try to refrain from giving the
sqlplus sys/password@service_name
on Unix systems because, there you would be compromising your password. (i.e, any one who does the ps -ef would be able to see your username and password :confused: )
So one world of advice, don't use
sqlplus sys/password@servicename
or
sqlplus sys/password
Bookmarks