SELECT * FROM OPENQUERY([INSTANCEB], 'SELECT value FROM sys.configurations WHERE name = ''max server memory (MB)''')
SELECT * FROM OPENQUERY([INSTANCEB], 'sp_configure ''show advanced options'', 1')SELECT * FROM OPENQUERY([INSTANCEB], 'RECONFIGURE')SELECT * FROM OPENQUERY([INSTANCEB], 'sp_configure ''max server memory'', 3000')SELECT * FROM OPENQUERY([INSTANCEB], 'RECONFIGURE')
Msg 11512, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1The metadata could not be determined because the statement 'select name, convert(int, minimum) as minimum, convert(int, maximum) as maximum, convert' in procedure 'sp_configure' is not compatible with the statement 'select duplicate_options = name from sys.configurations where lower(name collate Latin1_Genera' in procedure 'sp_configure'.
Msg 7357, Level 16, State 2, Line 1Cannot process the object "RECONFIGURE". The OLE DB provider "SQLNCLI11" for linked server "INSTANCEB" indicates that either the object has no columns or the current user does not have permissions on that object.
CREATE PROCEDURE FixMemoryASEXEC sp_configure 'max server memory', 3000RECONFIGUREGOEXEC FixMemory AT <linked server name>
We walk in the dark places no others will enterWe stand on the bridge and no one may pass
EXEC ('database.dbo.FixMemory') AT [INSTANCEB]EXEC ('RECONFIGURE') AT [INSTANCEB]
SELECT * FROM OPENQUERY([INSTANCEB], 'SELECT SERVERPROPERTY(''ComputerNamePhysicalNetBIOS'')')
DECLARE @InstanceBComputer NVARCHAR(250)SELECT @InstanceBComputer = CONVERT(NVARCHAR(250), RemoteServer ) FROM OPENQUERY([FQTC3SQL2012B\INSTANCEB], 'SELECT SERVERPROPERTY(''ComputerNamePhysicalNetBIOS'') as RemoteServer')PRINT @InstanceBComputer