Error 15028 Linked Server
Contents |
New? Advanced Search Forum Database Discussions MS SQL Server 7/MS SQL Server 2000 HELP - Error 15028 - Can't create linked server If this is your first visit, be sure to check out the FAQ by clicking sql linked server already exists the link above. You may have to register before you can post: click the register msg 15028 link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to
Remove Linked Server
3 of 3 Thread: HELP - Error 15028 - Can't create linked server Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-22-2002,08:30
Sp_addlinkedserver
AM #1 DaveH View Profile View Forum Posts Registered User Join Date Nov 2002 Posts 23 HELP - Error 15028 - Can't create linked server I have 2 instances of server A. A is the primary instance and A1 is the logical instance. Instance A1 has a linked server to server B. When I try to create a linked server from the primary instance A to server B, I get the error message Error 15028: The server 'B' already exists. When I run a select of master..sysservers on the primary instance, A, I see all linked servers for A and A1. When I select off of A1 I only see the instances for A1. If I try to access server B from the primary instance A, I receive the following message: Server: Msg 7411, Level 16, State 1, Line 1 Server 'B' is not configured for DATA ACCESS. (1) Why does sysservers on the primary instance, A, show instances for A and A1 and not just the ones for A? (2) Why can't I create the linked server 'B' on instance 'A'? Thanks, Dave Reply With Quote 11-25-2002,12:55 PM #2 rmiao View Profile View Forum Posts Moderator Join Date Sep 2002 Posts 5,938 1. Shouldn't. What's server id and value of isremote for A1 in sysservers of A? 2. Did you see B in sysservers? If so, double check in em for linked server B. Reply With Quote 11-25-2002,01:39 PM #3 DaveH View Profile View Forum Posts Registered User Join Date Nov 2002 Posts 23 I resolved the problem, however I don't know why it occured in the first place. When I ran sp_linkedservers, sp_helpserver and sp_helplinkedsrvlogin all returned results indicating that a linked server existed despite Enterprise Manager not listing a server. The login id information indicated a self mapping id, whi
if any one knows the query for checking the existence of linked server plzz tell me. right now i am gettin this error Msg 15028, Level 16, State 1, Procedure sp_addlinkedserver, Line 79 The server 'vbserver02' already exists. i am waiting for ur kind response regards August 22nd, 2007, 05:56 AM mansoor_aziz Re: how to check if linked server exists ??? I am using SQL Server 2005 database August 22nd, 2007, 05:58 AM andreasblixt Re: how to check http://forums.databasejournal.com/showthread.php?29574-HELP-Error-15028-Can-t-create-linked-server if linked server exists ??? Try this query and I guess you'll figure the rest out by yourself: Code: SELECT * FROM sys.servers August 22nd, 2007, 06:05 AM mansoor_aziz Re: how to check if linked server exists ??? thanks but u have already tried this i got this errir Msg 208, Level 16, State 1, Line 1 Invalid object http://forums.codeguru.com/printthread.php?t=432146 name 'sys.servers'. August 22nd, 2007, 06:07 AM Shuja Ali Re: how to check if linked server exists ??? Good one Andrea :thumb: Here is a modified version of previous post PHP Code: Select1WhereExists(Select[SERVER_ID]Fromsys.serversWhere[Name]='TestServer')
August 22nd, 2007, 06:11 AM Shuja Ali Re: how to check if linked server exists ??? Quote: Originally Posted by mansoor_aziz thanks but u have already tried this i got this errir Msg 208, Level 16, State 1, Line 1 Invalid object name 'sys.servers'. Are you sure you are using SQL 2005? Because this works properly for me. In case you are using SQL 2000 then try this PHP Code:
Select1WhereExists(Select[SRVID]FromsysserversWhere[srvName]='TestServer')
August
| Related Tips: 1 | 2 | 3 | 4 | More > Linked Servers ProblemI https://www.mssqltips.com/sqlservertip/1845/on-demand-creation-and-destruction-of-a-sql-server-linked-server/ am trying to create a stored procedure which creates a linked server connection, performs a query against the linked server, and then tears down the linked server http://stackoverflow.com/questions/10226692/to-add-server-using-sp-addlinkedserver connection. I don't want the connection to be up at all times, hence the reason I want to create the connection in the stored procedure. However, when linked server I try to create the stored procedure, I get the following error: Msg 7202, Level 11, State 2, Procedure usp_GetDatabasesFromRemoteServer, Line 8>Could not find server 'LinkingServer' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. How do I get around this error 15028 linked and create the stored procedure? SolutionThe trick to solving this problem is to create the linked server before executing the CREATE PROCEDURE statement. What's happening here is SQL Server is trying to validate the syntax of the stored procedure and cannot find the reference to "LinkingServer". For instance, if you have this query within the body of the stored procedure this is what SQL Server is failing on when trying to create the procedure. SELECTnameFROM[LinkingServer].master.sys.databases; SQL Server has to have the reference to "LinkingServer" defined or it can't validate the query. As a result, the stored procedure creation will fail. To get around this issue, you'll need to manually execute sp_addlinkedserver to create the connection as shown below and then create the stored procedure. EXECsys.sp_addlinkedserver@server='LinkingServer',@srvproduct=N'SQLServer'; Once the linked s
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up To add server using sp_addlinkedserver up vote 28 down vote favorite 11 I tried to insert values from one server to another server .I got error like Msg 7202, Level 11, State 2, Line 1 Could not find server 'SNRJDI\SLAMANAGEMENT' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. sql-server share|improve this question edited Sep 7 '15 at 11:23 Nicholas 4,395122349 asked Apr 19 '12 at 11:05 Domnic 2,03351626 add a comment| 2 Answers 2 active oldest votes up vote 63 down vote I got it. It worked fine Thank you for your help: EXEC sp_addlinkedserver @server='Servername' EXEC sp_addlinkedsrvlogin 'Servername', 'false', NULL, 'username', 'password@123' share|improve this answer edited Mar 5 '13 at 17:30 SteveC 4,025135097 answered Apr 19 '12 at 12:19 Domnic 2,03351626 add a comment| up vote 7 down vote Add the linked server first with exec sp_addlinkedserver @server = 'SNRJDI\SLAMANAGEMENT', @srvproduct=N'', @provider=N'SQLNCLI' See http://msdn.microsoft.com/en-us/library/ms190479.aspx share|improve this answer answered Apr 19 '12 at 11:08 hkf 3,08311534 When I tried to execute above I got error like 'Msg 15028, Level 16, State 1, Procedure sp_MSaddserver_internal, Line 89 The server 'SNRJDI\SLAMANAGEMENT' already exists.' –Domnic Apr 19 '12 at 11:12 Then When I execute the Query I got another error like'Msg 18452, Level 14, State 1, Line 1 Login failed for user ''. The user is not associated with a trusted SQL Server connection.' –Domnic Apr 19 '12 at 11:13 How are you connecting to the server you are running from? You should be providing the server credentials as opposed to using a network service or windows logon. –hkf Apr 19 '12 at 11:17 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged sql-server or ask your