Can't log in with -P for isql


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can't log in with -P for isql
# 1  
Old 11-06-2012
Can't log in with -P for isql

Hi all,

I am a newbie with isql, so couldn't find what is the problem by myself.

I am writing script at Solaris which will log in to DB, run some SELECT queries and put in to some file.
The problem is that whe I am trying to log in with:

Code:
/eniq/sybase_iq/OCS-15_0/bin/isql -U username -P password -S db -n

I am getting error indicating that username or password incorrect:

Quote:
ASA Error -103: Invalid User ID or Password
But the thing is when I am trying to run:

Code:
/eniq/sybase_iq/OCS-15_0/bin/isql -U username -S db -n

(i.e. without providing password)
and providing SAME password in new string where asking to provide password it accepts it...

Could you please let me know where the problem is and how to fix it?

P.S. Just wanted to add that this problem happened with new created user. With old users its ok.

Thanks in advance

Last edited by nypreH; 11-06-2012 at 04:26 AM..
# 2  
Old 11-06-2012
Do you have special characters, like quotes or dollar-sign in the password? In this case, you have to properly quote the password to protect it.

Let's say, your password is 123$abc. In this case, the shell will try to expand the shell variable $abc which is probably undefined. So, the shell will change 123$abc to 123.
This User Gave Thanks to hergp For This Post:
# 3  
Old 11-09-2012
Hi Hergp,

Yes, exactly! I have $ in the password...
Is there any way to provide password with $ or not?
Anyhow, I can just change password, so problemis solved, but just interesting.. Smilie

Huge thanks man,
you helped me a lot!!!
# 4  
Old 11-09-2012
You can wrap the password in single quotes:

Code:
isql .... -p 'pas$word'

That will prevent the shell from giving special meaning to "$".
This User Gave Thanks to Scott For This Post:
# 5  
Old 12-27-2012
Thanks Scott,

that helped me a lot!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

New to ISQL

Hello, I am having sybase database want to use ISQL to extract some data. Can someone please provide the link from where i can download freeware ISQL. Also documents which i can read and know 1. How to get he list of tables. 2. How to check data inside the table. 3. How to make queries etc.... (1 Reply)
Discussion started by: rajjev_saini123
1 Replies

2. Shell Programming and Scripting

Problem using iSQL and variables

I have searched the forums and other sites and cannot come with the applicable approach for what I am trying to do. I am trying to setup a cron job that executes this script. The script uses iSQL - which is connecting ok - to then query a field and then assign that field to a variable to do an If... (4 Replies)
Discussion started by: courtneyjh
4 Replies

3. Shell Programming and Scripting

ISQL syntax

Hi All, I'm niks and i'm a newbie here and newbie in shell, i'm just wondering what is the meaning of -U -P -S in the sample script below. "-U iccbs_dbo -P iccbsdbo -S CCB_REO" Thanks, (2 Replies)
Discussion started by: nikki1200
2 Replies

4. Shell Programming and Scripting

ISQL - SELECT AS

I have been given an SQL script I need to convert to ISQl. In the styatement it has the following line which is flagging an error: Select stocknum as 'bipart' this comes up with: 201: A syntax error has occurred Does ISQL support the SELCT AS statement and if not is there a simple... (2 Replies)
Discussion started by: andydb70
2 Replies

5. Shell Programming and Scripting

isql output

hi all i m running following code # set up environment . /u/pimms/pimms_global.ksh echo "Get record from database" #echo ${PIMMS_ID} #echo ${PIMMS_PWD} #echo "1" isql -U${PIMMD_ID} -P${PIMMS_PWD} -S$SRV << eof > /sybase/applications/pimms/bin/automate1.txt use pimms ... (6 Replies)
Discussion started by: d_swapneel14
6 Replies

6. Shell Programming and Scripting

isql - select ... where ...

Hi, Please help me to solve this problem on Unix isql. Following is an example table and expected select result. I need to select NAMEs where those NAMEs don't have a record which TYPE='T1'. I tried, but got both N2 and N3. NAME TYPE DATA --------------------- N1 T1 D11 N2... (0 Replies)
Discussion started by: momi
0 Replies

7. Shell Programming and Scripting

isql behaviour with different shells

Hi, We are using isql in our scripts to connect to sybase dataserver on Solaris See the following snippet: isql -U${USER} -S${SERVER} -w999 <<- EOB ${PASSWD} use ${QS_DBNAME} go EOB The above code works even if there are spaces before the ${PASSWORD} But if we... (1 Reply)
Discussion started by: justsam
1 Replies

8. Shell Programming and Scripting

isql in shell script help

Hello all... i'm trying to execute a shell script through crontab. To run at 8pm on wednesday's The crontab entry: 00 20 * * 3 /u2/dir1/dir2/jobs/p.sh the p.sh file: isql -s claims /u2/dir1/dir3/dir4/a.sql permissions for it are -rwxrwx--x i've confirmed a.sql is in that directory. ... (2 Replies)
Discussion started by: mrviking
2 Replies

9. UNIX for Dummies Questions & Answers

regarding isql

can anyone pls explain me the command $ isql -Usa -SIN63DS -Pgoalmal 1>load database STS_IN_PRD from "/STSDBBakup/ AEOD20030509" 2>go thx (2 Replies)
Discussion started by: girish_shukla
2 Replies

10. UNIX for Dummies Questions & Answers

isql

What does the isql command do for solaris 8???? Is this something that comes with solaris because I have it at work but not at home. Plus does anyone know a good SQL site where I could learn all the sql commands thankx (2 Replies)
Discussion started by: eloquent99
2 Replies
Login or Register to Ask a Question