RE: Cannot open user default database.



Hi Lujate,

This problem is related more towards the SQL server setup than the JDBC
driver itself. It seems to me that the user id does not correctly refer to
a default database. You should try logging into the new server instance
again and try to issue the following TSQL command to see the user id to
default database mapping:

select default_database_name from sys.sql_logins where name =
'<youruserid>'

There are also a great deal of information pertinent to this topic posted
elsewhere on other newsgroup such as:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=167068&SiteID=1&PageID
=1.

Also, you can find direct help related to this issue on the Books Online
and at the following Knowledge Base article:
http://support.microsoft.com/kb/196076/en-us

Additionally, if you know the database you want to connect to you can
specify it directly in the URL argument for getConnection() with the
keyword "database=<yourdatabase>" That is
"jdbc:sqlserver//ipaddress\\new;user=<youruserid>;password=<yourpassword>;da
tabase=<yourdatabase>"

I hope this informations helps.

Kind regards,
Jaaved Mohammed [MSFT]

.


Loading