Friday, March 9, 2012

How to get remote query timeout value

Hi,
We can use
EXEC sp_configure 'remote query timeout', 6000
to set the remote query timeout value.
How can we get the value remote query timeout ?> How can we get the value remote query timeout ?
You can execute sp_configure without the @.configvalue parameter to show the
existing configuration value:
EXEC sp_configure 'remote query timeout'
If you need to retrieve the value into a variable using Transact-SQL, here's
one method:
IF OBJECT_ID('tempdb..#ConfigValues') IS NOT NULL
DROP TABLE #ConfigValues
DECLARE @.run_value int
CREATE TABLE #ConfigValues
(
name varchar (35) NOT NULL,
minimum int,
maximum int,
config_value int,
run_value int
)
INSERT INTO #ConfigValues
EXEC sp_configure 'remote query timeout'
SELECT @.run_value = run_value FROM #ConfigValues
DROP TABLE #ConfigValues
Hope this helps.
Dan Guzman
SQL Server MVP
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:OpBzNAOyGHA.4548@.TK2MSFTNGP05.phx.gbl...
> Hi,
> We can use
> EXEC sp_configure 'remote query timeout', 6000
> to set the remote query timeout value.
> How can we get the value remote query timeout ?
>

No comments:

Post a Comment