Solved

SQL SERVER 2005 LINKED SERVERS

Posted on 2008-06-17
4
335 Views
Last Modified: 2008-07-10
I want to link a password protected Microsoft Access 97 Database to SQL Server 2005 as a linked server so that all of the mdb tables will be available through the sql server engine as if that database was a database inside of sql server.

Can i do this?

 if so can you give me a step by step

Thanks in advance.
0
Comment
Question by:talker2004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21806968
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 500 total points
ID: 21810534
use the sp_linkedserver facility... Here I have an Access database name DB4 and lives in c:\access+mdb\db4.mdb. I create a Linked Server with a name Access_DB4 and can then use it in any query - just have to prefix the table name with the linked server name...


EXEC sp_addlinkedserver
      @server = 'Access_DB4',
      @provider = 'Microsoft.Jet.OLEDB.4.0',
      @srvproduct = 'OLE DB Provider for Jet',
      @datasrc = 'c:\access_mdb\db4.mdb'
GO

EXEC sp_addlinkedsrvlogin
      @rmtsrvname = 'Access_DB4',
      @useself = 'FALSE',
      @locallogin = NULL,
      @rmtuser = 'Admin',
      @rmtpassword = NULL
GO  -- note you will probably set up the real user name and password above. also found much more success leaving out useself and locallogin...

EXEC sp_tables_ex 'Access_DB4'
GO -- gets the list of tables...

SELECT * FROM Access_DB4...Customers

-- then remove the linked server if neede with : sp_dropserver AccessDB4, droplogins
0
 
LVL 7

Author Comment

by:talker2004
ID: 21850217
Got this to work only after i removed the database password of of the Access Database. It is a simple database password on the databsae not a workgroup password. How do i specify the password for the database so that SQL server can connect to my mdb?
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 21851641
in  the @rmtuser and @rmtpassword = needs to be you access database user and password...
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question