USE master;
GO
EXEC sp_configure 'show advanced option', '1';
RECONFIGURE
Then use
EXEC sp_configure;
to display those options
If you wanted, for example, to set min server memory to 300 use
EXEC sp_configure 'min server memory (MB)', '300';
RECONFIGURE WITH OVERRIDE;
select * from sys.dm_clr_properties
sys.xp_readerrorlog 0,1,2,3...
;WITH VAS_Summary AS
(
SELECT
Size = VAS_Dump.Size,
Reserved = SUM(CASE(CONVERT(INT, VAS_Dump.Base)^0) WHEN 0 THEN 0 ELSE 1 END),
Free = SUM(CASE(CONVERT(INT, VAS_Dump.Base)^0) WHEN 0 THEN 1 ELSE 0 END)
FROM
(
SELECT CONVERT(VARBINARY, SUM(region_size_in_bytes)) [Size],
region_allocation_base_address [Base]
FROM sys.dm_os_virtual_address_dump
WHERE region_allocation_base_address <> 0x0
GROUP BY region_allocation_base_address
UNION
SELECT CONVERT(VARBINARY, region_size_in_bytes) [Size],
region_allocation_base_address [Base]
FROM sys.dm_os_virtual_address_dump
WHERE region_allocation_base_address = 0x0
)
AS VAS_Dump
GROUP BY Size
)
SELECT SUM(CONVERT(BIGINT,Size)*Free)/1024 AS [Total avail mem, KB],
CAST(MAX(Size) AS BIGINT)/1024 AS [Max free size, KB]
FROM VAS_Summary
WHERE Free <> 0
Thursday, July 30, 2009
Wednesday, July 29, 2009
SWAP investigation SQL
-- from order to sec_id
select * from ts_order where order_id=1700007815
select 'Parent', SEC_ID, SEC_NAME,* from csm_security where sec_id=1700007812
-- from parent sec_id to leg sec_id
select 'Legs',SEC_ID, SEC_NAME,* from csm_security where parent_sec_id = 1700007812
-- from sec_id to underlying
select 'uPL1L2',* from CRDQT..CSM_UNDERLYING_SECURITY where sec_id in (1700007812,1700007813,1700007814)
select 'up', * from CSM_SECURITY where sec_id=null
select 'u1l', * from CSM_SECURITY where sec_id=null
select 'u2l', * from CSM_SECURITY where sec_id=null
-- from sec_id to orig-sec_id
select 'cust',ORIG_SEC_ID,SEC_ID,* from CSM_SECURITY_CUST where sec_id in (1700007812,1700007813,1700007814)
select 'custP',sec_id, sec_name,* from csm_security where sec_id=null
select 'custLeg1',sec_id, sec_name,sec_typ_Cd, * from csm_security where sec_id=null
select 'custLeg2' sec_id, sec_name,sec_typ_Cd,* from csm_security where sec_id=1700002237
-- list order udf
select * from CRDQT..ts_order_sec_spec where order_id=1700007815
select * from ts_order where order_id=1700007815
select 'Parent', SEC_ID, SEC_NAME,* from csm_security where sec_id=1700007812
-- from parent sec_id to leg sec_id
select 'Legs',SEC_ID, SEC_NAME,* from csm_security where parent_sec_id = 1700007812
-- from sec_id to underlying
select 'uPL1L2',* from CRDQT..CSM_UNDERLYING_SECURITY where sec_id in (1700007812,1700007813,1700007814)
select 'up', * from CSM_SECURITY where sec_id=null
select 'u1l', * from CSM_SECURITY where sec_id=null
select 'u2l', * from CSM_SECURITY where sec_id=null
-- from sec_id to orig-sec_id
select 'cust',ORIG_SEC_ID,SEC_ID,* from CSM_SECURITY_CUST where sec_id in (1700007812,1700007813,1700007814)
select 'custP',sec_id, sec_name,* from csm_security where sec_id=null
select 'custLeg1',sec_id, sec_name,sec_typ_Cd, * from csm_security where sec_id=null
select 'custLeg2' sec_id, sec_name,sec_typ_Cd,* from csm_security where sec_id=1700002237
-- list order udf
select * from CRDQT..ts_order_sec_spec where order_id=1700007815
Subscribe to:
Posts (Atom)