November 17, 2017 at 3:25 am
Dear All,
Have a job on a server in which it executes a stored procedure that is present in other linked server; now this job's time -frame is taking more than 2 hours to get completed.
The query text that is calling this specific stored procedure in the linked server is :
EXEC Linkeservername.[Tabelname].[dbo].[SP name] @ScalarVariable name.
Need a query in which i need to find out what query text the above sp is executing that is taking longer time to complete.
Any help on it will be appreciated !
Regards,
Adil
November 17, 2017 at 3:37 am
Do you have any control on LinkedServer and is it a SQL SERVER ? If yes then you can use sp_whoisactive SQL Server Monitoring Stored Procedure by Adam Machanic
Please read the complete documentation for more detail in the link.
Hope it helps.
Note: This needed to be deployed on the LinkedServer
November 17, 2017 at 5:03 am
Yeah we have controls over the linked server, unfortunately we cannot deploy a new procedure since it is a high maintained Production server and have to get through lots of management permissions to deploy the same.
Is there any alternative way to find it or something like a simple T-SQL Query which i can run over the server to find it.
Regards,
Adil
November 17, 2017 at 5:46 am
adilahmed1989 - Friday, November 17, 2017 5:03 AMYeah we have controls over the linked server, unfortunately we cannot deploy a new procedure since it is a high maintained Production server and have to get through lots of management permissions to deploy the same.Is there any alternative way to find it or something like a simple T-SQL Query which i can run over the server to find it.
Regards,
Adil
Work with the DBAs for the Prod server and ask for their help.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
November 17, 2017 at 5:52 pm
adilahmed1989 - Friday, November 17, 2017 3:25 AMDear All,
Have a job on a server in which it executes a stored procedure that is present in other linked server; now this job's time -frame is taking more than 2 hours to get completed.The query text that is calling this specific stored procedure in the linked server is :
EXEC Linkeservername.[Tabelname].[dbo].[SP name] @ScalarVariable name.Need a query in which i need to find out what query text the above sp is executing that is taking longer time to complete.
Any help on it will be appreciated !
Regards,
Adil
You're not actually using a [Tablename] instead of a [Databasename} are you?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply