Test new DSN connection to sql server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Test new DSN connection to sql server
# 1  
Old 10-24-2012
Test new DSN connection to sql server

I installed an odbc driver and created a DSN to connect to a sql server database on AIX 6. I want to know how to test the DSN from the command line. What syntax or commands do I use?

---------- Post updated at 11:44 AM ---------- Previous update was at 08:26 AM ----------

OK I figured out how to test the connection using the DSN from the command line. Now I get an error when trying to connect. Has anyone seen this before?

Code:
:CONNECT vendortst
Enter username for connecting to 'vendortst' DBMS [dbrown]: infoleas
Enter password for infoleas:
SQLConnect error:   Status = -1   SQLState = 00000   Natcode = 274637056
:274637056]


Last edited by radoulov; 10-25-2012 at 03:35 PM..
# 2  
Old 10-24-2012
If that is giving difficulties, verify the login using an alternate tool, like the freeTDS suite or JDBC jar with xigole jisql or SquirreL. It maqay be that the DSN has the wrong port or the host name does not resolve. It can be asking the questions lon before the connect. Are you using an IP or a full domain name?
# 3  
Old 10-24-2012
I am using an ip address and I verified the login by creating a dsn on another windows machine.
# 4  
Old 10-24-2012
I did not even know MS SQL Server had wandered off WinDOS! If the DSN's are alike and use IP, try a telnet to the right port and IP to ensure there is no routing or firewall challenge for the second PC. Also, some authentication systems demand hosts with valid reverse DNS lookup (but probably not here)! Are both PCs in the same Windows context, whatever they are calling it, workgroup, the bit before the back-slash?
# 5  
Old 10-24-2012
The units are an IBM AIX 6 server and a Windows 2003 server running SQL Server 2005 and there are no firewall issues between them.
# 6  
Old 10-25-2012
So, is this unixodbc or is AIX running a windows emulator, that we have odbc with DSN's on AIX?
# 7  
Old 10-25-2012
It's a unixodbc.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

How can I test ldap connection to DC?

Hi all, Recently, I configured LDAP loadbalancing. So I need to test it from HPUX servers. But I don't know how to to it. I know many ldap connection tools such as ldap browser etc. But it's HPUX 11.31, so please share your practices. Thanks (1 Reply)
Discussion started by: sembii
1 Replies

2. UNIX for Dummies Questions & Answers

UNIX string connection to sql server db

Hi, i have to perform a connection from unix to sql server database, using TCP protocol. I have all connection parameters (user,pwd,server_name,port,db_name). How can i perform this connection, by unix console ? is it available a command similar to this one (for oracle): sqlplus... (1 Reply)
Discussion started by: nash83
1 Replies

3. UNIX for Dummies Questions & Answers

Shell Script to test telnet connection using port

Hello, I need to test telnet connections using port number for few hosts. Could you please help me? Thanks !! (1 Reply)
Discussion started by: skhichi
1 Replies

4. UNIX for Dummies Questions & Answers

Test Connection to hosts

i have about 3500 hosts/devices which i monitor. i monitor them from one host. we'll call this one host HOSTA. HOSTA has connectivity to all 3500 hosts/devices. now, i have to create a backup for HOSTA. and the back up is in another state. how do i get a list of all open ports on HOSTA so... (1 Reply)
Discussion started by: SkySmart
1 Replies

5. Shell Programming and Scripting

Execute multiple SQL scripts from single SQL Plus connection

Hi! I would like to do a single connection to sqlplus and execute some querys. Actually I do for every query one connection to database i.e echo 'select STATUS from v$instance; exit' > $SQL_FILE sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies

6. Shell Programming and Scripting

Help with SQL*Plus Connection

I "inherited" these scripts which are used to access an Oracle DB on a test envoiroment. Originaly someone from our security team would add an system user and password to the otherwise finished script and encrypt the whole thing. The encrypted file (script.x) would then be scheduled with Control-M.... (7 Replies)
Discussion started by: dani_nonato
7 Replies

7. Shell Programming and Scripting

Connection to Microsoft SQL Server

Hi, I am using "ksh" and trying to connect to the Microsoft SQL Server but it gives an error that is: DB-LIBRARY error: Unexpected EOF from SQL Server. Can any one please help me to resolve this issue. And i am using Putty to connect to the Unix server. Thanks (3 Replies)
Discussion started by: anupdas
3 Replies

8. Shell Programming and Scripting

bash script to test network connection - please help

I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9) I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else) my code is the following: #!/bin/bash clear firstPart="192.168.1" maxNum="9" ... (2 Replies)
Discussion started by: shadow_boi
2 Replies

9. Shell Programming and Scripting

Connection Test Script

I am writing a script to do some conditional logic based on the results of a connection test. I need to capture the output of netcat, the 3 expected conditions are as follows. I need to capture the output of this command. I could write this to a file, but I would like to do it clearer if possible.... (1 Reply)
Discussion started by: princeboot
1 Replies

10. Shell Programming and Scripting

Database Connection test in unix Script

i have a unix script that gives me the sysdate from the database EDNAMID.WORLD.What i want my script to do the following 1) Establish a database connection 2) if database connection is successfull then echo the message "Connected" 3) put the o/p of the Sql query in a spool file 4) then... (3 Replies)
Discussion started by: ali560045
3 Replies
Login or Register to Ask a Question