Merging a linked server?

I have a server that I need to have as a linked server with another server using sp_addLinkedServer.

My server name is in the format "DepartmentName.CompanyName.com", which I can usually change to [blah.blah.com], but which I cannot use in the creator of SQL Server Management Studio View, because it removes my square brackets. ..

On the other hand, since @srvproduct is SQL Server, I cannot provide a name for the server to use it, so I cannot just name it “Department Name”.

I think I got a little 22 here. Any suggestions?

+3
source share
1

View Studio Management ( ), , /, .

, CREATE/ALTER VIEW ( script VIEWs ALTER, ).

, , , " Microsoft OLE DB SQL Server", "SQL Server" , "SQL Server", . ( , , , )

:.

EXEC master.dbo.sp_addlinkedserver @server = N'ALIAS', @srvproduct=N'ACTUALSERVER', @provider=N'SQLOLEDB', @datasrc=N'ACTUALSERVER'
+7

Source: https://habr.com/ru/post/1771918/


All Articles