Unix Technical Forum

Test Connection failed if "attach database filename" property was set

This is a discussion on Test Connection failed if "attach database filename" property was set within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> we use SQL Server 2005 Express.(download from 17.november.) and tried to create a DSN that attaches a database file ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 10:01 PM
Steffen(i-net software)
 
Posts: n/a
Default Test Connection failed if "attach database filename" property was set

we use SQL Server 2005 Express.(download from 17.november.)
and tried to create a DSN that attaches a database file to server.
I created the datasource with the following configuration:

>Microsoft SQL Native Client Version 09.00.1399
>
>Data Source Name: sds
>Data Source Description: sds
>Server: (local)
>Use Integrated Security: No
>Database: mynorthwind
>Language: (Default)
>Data Encryption: No
>Trust Server Certificate: No
>Multiple Active Result Sets(MARS): No
>Mirror Server:
>Translate Character Data: Yes
>Log Long Running Queries: No
>Log Driver Statistics: No
>Use Regional Settings: No
>Use ANSI Quoted Identifiers: Yes
>Use ANSI Null, Paddings and Warnings: Yes
>Attach Database Filename: c:\porta\mynorthwind.mdf


A click on test connection results in the following error message:

>Microsoft SQL Native Client Version 09.00.1399
>
>Running connectivity tests...
>
>Attempting connection
>[Microsoft][SQL Native Client][SQL Server]Could not open new database 'mynorthwind'.
>CREATE DATABASE is aborted.
>[Microsoft][SQL Native Client][SQL Server]Could not attach file 'c:\porta\mynorthwind.mdf'
>as database 'mynorthwind'.
>
>TESTS FAILED!



The presence of original _log.LDF has no influence on the error
message.

If I use stored procedures to attach database, everything is ok.(same
user for login)
>EXEC sp_attach_db 'mynorthwind',N'c:\\porta\\mynorthwind.mdf',N'c:\\ porta\\mynorthwind_log.ldf'


How can I create a DS that attaches a database?

regards

Steffen

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com