Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 sp_addlinkedsrvlogin

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2010-02-04 : 12:21:40
[code]
EXEC sp_addlinkedsrvlogin
@rmtsrvname = 'AccessDb',
@useself = 'false',
@locallogin = NULL,
@rmtuser = 'SysUser',
@rmtpassword = '905555'
GO
[/code]
this is my code but it's not working
the problem is my access database is access password protected so there is no username but just a password?
how do i set this up
i know in my odbc dsn to this access database I set it up as
dsn=DB2000;PWD=905555

Kristen
Test

22859 Posts

Posted - 2010-02-05 : 02:35:02
I think the Access user is "Admin" in such circumstances.

Alternatively use OPENDATASOURCE or OPENROWSET which allow you to enter a "normal" connection string.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2010-02-05 : 02:51:00
even with Admin i'm getting

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb".


(Is locallogin suppsed to be null?
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2010-02-05 : 02:52:17
what's the correct syntax to opendatasource - either from access or from my system dsn?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-02-05 : 03:58:18
See www.connectionstrings.com
Go to Top of Page
   

- Advertisement -