Solved

Create sp_addlinkedserver  code for sql server 2005 express

Posted on 2010-09-22
2
1,163 Views
Last Modified: 2012-05-10
sql server 2005 express

Trying to get the following from below into  code to similiar to this:

exec sp_addlinkedserver @server='GpsFindMroData',
@srvproduct='Access',
@provider='Microsoft.Jet.OLEDB.4.0',
@datasrc='C:\Program Files\CrEn\Databases\mro.mdb'
go

But using the information below...

Thanks
fordraiders




Linked Server name :  LINKED_CHGO
Server Type : Other Data Source

server provider name: SQLNCLI

Product Name  :  RAYMOND

DATASOURCE:  PMTB04.campus.ggg.com

PROVIDER STRING: DSN=BMOnly;Description=PRODUCT db;UID=BMOnly;PWD=BMly;APP=Microsoft Office 2003;WSID=2CE942HWD1;DATABASE=CPIR_Product  


CATALOG: CPIR_Product

Open in new window

0
Comment
Question by:fordraiders
2 Comments
 
LVL 26

Accepted Solution

by:
tigin44 earned 500 total points
ID: 33735702
try this
USE [master]
GO
EXEC master.dbo.sp_addlinkedserver 
	@server = N'LINKED_CHGO', 
	@srvproduct=N'RAYMOND', 
	@provider=N'SQLNCLI10', 
	@datasrc=N'PMTB04.campus.ggg.com', 
	@provstr=N'DSN=BMOnly;Description=PRODUCT db;UID=BMOnly;PWD=BMly;APP=Microsoft Office 2003;WSID=2CE942HWD1;DATABASE=CPIR_Product', 
	@catalog=N'CPIR_Product'

GO

Open in new window

0
 
LVL 3

Author Closing Comment

by:fordraiders
ID: 33735783
Thanks
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get row count of current SQL query 8 58
how many extra RAM for SQL server is needed 22 43
Delete from table 6 47
kill process lock Sql server 9 63
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…

839 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