Like exec LinkedServerName.dbname.dbo. Procedurename @param1, @param2, @param3.
?)". – Mauro Mar 9 at 12:39 Only for SQL Server linked servers – gbn Mar 13 at 16:17.
I was finally able to do it by calling SELECT * FROM OPENQUERY(LinkedServer, 'SELECT "dbname". "spname"(@p1,@p2, @p3)') I'll add comments and example as soon as I experiment it.
4 part object names are valid only for SQL Server linked servers. You have to have your EXEC inside an OPENQUERY SELECT * FROM OPENQUERY(LinkedServer, 'EXEC MyDB.MyScheme.MyProc. Spname @p1, @p2, @p3') Now, you can't parametrise OPENQUERY calls so you have use dynamic SQL DECLARE @sql nvarchar(4000), @linkedsql nvarchar(4000) SET @sql = 'EXEC MyDB.MyScheme.MyProc.
Spname ' + CAST(@p1value as int) + ... SET @linkedsql = 'SELECT * FROM OPENQUERY(LinkedServer, ''' + @sql + ''')' EXEC (@linkedsql).
My goal is to execute a stored procedure hosted in Sybase SQL Anywhere 8 in SQL Server 2008 through the linked server I already created. Any SQL query made through the linked server is working. Thanks 4 all your help!
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.