Question
SQL: sp_addlinkedserver? (Querying two DBs)
I'm full of SQL questions today.
I'm trying to do a join across two servers in Enterprise Manager for MS SQL.
Can this be done?
Here is my query:
SELECT *
FROM WeSiteMenus INNER JOIN
SQLPRODSERV.DBPublic.dbo.WeSiteMenus WeSiteMenus_1 ON
WeSiteMenus_1.pageID = WeSiteMenus.pageID
And here is the error I get in Enterprise Manager:
---------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
'SQLPRODSERV' in sysservers. Execute sp_addlinkedserver to add the server to
sysservers.
---------------------------
Is something wrong with my syntax, or do I need to so something with that
stored procedure. I've ran it, but it doesn't seem to fix anything.
-Darrel
I'm trying to do a join across two servers in Enterprise Manager for MS SQL.
Can this be done?
Here is my query:
SELECT *
FROM WeSiteMenus INNER JOIN
SQLPRODSERV.DBPublic.dbo.WeSiteMenus WeSiteMenus_1 ON
WeSiteMenus_1.pageID = WeSiteMenus.pageID
And here is the error I get in Enterprise Manager:
---------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
'SQLPRODSERV' in sysservers. Execute sp_addlinkedserver to add the server to
sysservers.
---------------------------
Is something wrong with my syntax, or do I need to so something with that
stored procedure. I've ran it, but it doesn't seem to fix anything.
-Darrel
