Hello,
I am new to SQL Server, sorry for my ignorance !!!
I have installed SQL Server 2005 Express on my desktop (Win 2000 Pro.)
I have created a new database.
I just created a new login/user (SQL Authentication) and when I try to login, it
errors out:
[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test1'
I believe the error is from SQL Server and not from ODBC driver.
I am also only able to connect by using my own userid (the one that I am connected to my desktop): domain\userid, and then I am only able to connect to 'master' db:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/usr/local/etc>isql SQLSERVER_POS -v
++
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
++
SQL> use pcspos
[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Could not locate entry in sysdatabases for database 'pcspos'. No entry found with that name. Make sure that the name is entered correctly.
[ISQL]ERROR: Could not SQLExecute
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Hello,
While I browse the SSMSE (SQL Server Management Studion Express) , I see that the database state (from the
Database Properties Windows) is NORMAL | SHUTDOWN !!!!!!
Is this OK ?
In the meantime when I login via SSMSE, I can see all the tables and data in the database !!!!!!!!!
Thanks,
Tom
|||Hello, I was able to change the Database State to NORMAL (I changed the 'Auto Close' option to False).
BUT I am still not able to connect:
/usr/local/etc>isql SQLSERVER_POS -v
[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test1'.
[ISQL]ERROR: Could not SQLConnect
Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi Jens, thank you for your reply.
I am using the SQL Authentication mode, see below I am able to connect from the DOS prompt (localy),
but I can NOT connect from a Linux server by using the ODBC driver:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
C:\>isql -S (local)\SQLEXPRESS -U pos_sql05 -P passwd
1> select db_name()
2> go
--
--
--
POS
(1 row affected)
1> select * from pcs_lookup_active_status;
2> go
ACTIVE_STATUS_KEY ACTIVE_STATUS_DESC
-- --
1 Active
2 Inactive
3 Deleted
(3 rows affected)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|||I don′t know how the tool for Linux works but if you do not pass a username using SQL Server authentication there has to be somewhere a setting file where these information is stored.|||
I am using a config file by the name odbc.ini.
It looks like the following:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[SQLSERVER_POS]
Driver = /usr/local/easysoft/sqlserver/lib/libessqlsrv.so
Description = Easysoft SQL Server ODBC driver (unixODBC 2.2.12)
Server = 10.20.30.40\SQLEXPRESS
Port = 1433
Database = POS
User = pos_sql05
Password = passwd
Mars_Connection = No
Logging = 31
LogFile = /tmp/sqlserver.log
QuotedId = Yes
AnsiNPW = Yes
Language =
Version7 = No
ClientLB = No
Failover_Partner =
VarMaxAsLong = No
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
As you cann tell, the user id and password are there.
Thanks again.
Regards,
Tom
|||Make sure that you are using the right password for the mentioned user. In addition make sure taht the user is priviledged for the POS database, cause authentication or the connection will also fail if the initial database is not one of the allowed ones. if you are not sure, try to connect to the master database. A user which is granted access to the server should have access to the master database.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi Jens, thanks again.
The userid and password are correct (I am able to connect via isql from the DOS prompt).
I think the problem relies on the fact that I am coming remotetly (from a Linux server), BUT I have
enabled the TCP/IP protocol connection properties. What else can I look for ?
Thank you.
Tom
|||How are you authenticating? Is your server set to authenticate using Windows authentication only or integrated authentication? Perhaps this unix driver is trying to use SQL authentication and your SQL installation only accepts windows authenticated connections. That would explain this problem.
Hope this helps!
John (MSFT)
|||Hi John & Jens, the issue has been resolved. I contacted the ODBC driver's vendor and they provided me with an updated copy of it.
Thank you for your help and suggestions.
Keep up the GREAT job.
Best regards,
Tom