WEB开发网
开发学院数据库MSSQL Server sqlserver的日常检查脚本归结 阅读

sqlserver的日常检查脚本归结

 2012-02-15 12:23:49 来源:WEB开发网   
核心提示:SELECT @domain as 'Domain', serverproperty('ComputerNamePhysicalNetBIOS') as 'MachineName',

SELECT                      


@domain as 'Domain',                      


serverproperty('ComputerNamePhysicalNetBIOS') as 'MachineName',                      


CPU_COUNT as 'CPUCount',


(physical_memory_in_bytes/1048576) as 'PhysicalMemoryMB',                      


@Ipaddress as 'IP_Address',                      


@instance_name1 as 'InstanceName',


@image_path as 'BinariesPath',                      


@log_directory as 'ErrorLogsLocation',                      


@start_username as 'StartupUser',                      


@Startuptype as 'StartupType',                      


serverproperty('Productlevel') as 'ServicePack',                      


serverproperty('edition') as 'Edition',                      


serverproperty('productversion') as 'Version',                      


serverproperty('collation') as 'Collation',                      


serverproperty('Isclustered') as 'ISClustered',                      


@out as 'ClusterNodes',                      


serverproperty('IsFullTextInstalled') as 'ISFullText'                      


From sys.dm_os_sys_info                        


                     




-- Step 6: Printing database details 



SELECT                      


serverproperty ('ComputerNamePhysicalNetBIOS') as 'Machine'                      


,@instance_name1 as InstanceName,                      


(SELECT 'file_type' =                      


CASE                      


WHEN s.groupid <> 0 THEN 'data'                      

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:sql server 脚本

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接