SQL code
伺服器配置選項--啟動AWEsp_configure 'show advanced options',1reconfiguregosp_configure 'awe enable',1--啟動AWE選項,用於支援超過4G記憶體 具體用法見筆記三go sp_configure 'show advanced options',0reconfigurego
--指定遊標集中的行數sp_configure 'show advanced options',1reconfiguregosp_configure 'cursor threshold'--指定遊標集中的行數,超過此行數,將非同步產生遊標鍵集go sp_configure 'show advanced options',0reconfigurego /*配置選項 'show advanced options' 已從 0 更改為 1。請運行 RECONFIGURE 語句進行安裝。name minimum maximum config_value run_value----------------------------------- ----------- ----------- ------------ -----------cursor threshold -1 2147483647 -1 -1配置選項 'show advanced options' 已從 1 更改為 0。請運行 RECONFIGURE 語句進行安裝。*/ --指定全文索引列的預設語言值sp_configure 'show advanced options',1reconfiguregosp_configure 'default full-text language'--2052代表簡體中文,具體的查詢聯機叢書go sp_configure 'show advanced options',0reconfigurego/*name minimum maximum config_value run_value----------------------------------- ----------- ----------- ------------ -----------default full-text language 0 2147483647 2052 2052*/--控制是否讓觸發器返回結果集sp_configure 'show advanced options',1reconfiguregosp_configure 'disallow results from triggers',1--1代表ongo sp_configure 'disallow results from triggers',0--0代表offgo sp_configure 'show advanced options',0reconfigurego/*配置選項 'disallow results from triggers' 已從 1 更改為 1。請運行 RECONFIGURE 語句進行安裝。配置選項 'disallow results from triggers' 已從 1 更改為 0。請運行 RECONFIGURE 語句進行安裝。*/--控制最初為建立索引分配的最大記憶體量sp_configure 'index create memory', 4096GO--設定可用的鎖的最大個數sp_configure 'show advanced options',1reconfiguregosp_configure 'locks'---要設定的話在後面加',數字'go sp_configure 'show advanced options',0reconfigurego/*name minimum maximum config_value run_value----------------------------------- ----------- ----------- ------------ -----------locks 5000 2147483647 0 0*/--設定SQL進程可使用的背景工作執行緒數sp_configure 'show advanced options',1reconfiguregosp_configure 'max worker threads'--要設定的話在後面加',數字'go sp_configure 'show advanced options',0reconfigurego/*name minimum maximum config_value run_value----------------------------------- ----------- ----------- ------------ -----------max worker threads 128 32767 0 0*/--指定一個查詢在逾時前等待所需資源的時間sp_configure 'query wait',數字go--指定在SQL SERVER逾時之前遠程操作可以持續的時間sp_configure 'remote query timeout',數字go--是否允許運行系統預存程序xp_cmdshellsp_configure 'show advanced options',1reconfiguregosp_configure 'xp_cmdshell',1reconfiguregosp_configure 'show advanced options',0reconfigurego--從運行SQL SERVER執行個體的本地或遠程伺服器上控制預存程序的執行sp_configure 'show advanced options',1reconfiguregosp_configure 'remote access',1 --1表示允許reconfiguregosp_configure 'remote access',0 --0表示禁止reconfiguregosp_configure 'show advanced options',0reconfigurego---更多的查看聯機叢書--啟動,暫停和停止本地的SQL SERVER 服務net start MSSQLSERVER --啟動net pause MSSQLSERVER --暫停net continue MSSQLSERVER ---繼續被停止的服務net stop MSSQLSERVER --停止--查詢服務器配置選項資訊select * from sys.configurationsgo--得到的結果中configuration_id --配置選項的唯一IDname --配置選項的名稱value --配置選項的值minimum --配置選項的最小值maximum --配置選項的最大值value_in_use --配置選項當前使用的運行值description --配置選項的說明is_dynamic --等於1時表示需要執行reconfiguration語句才會生效的變數is_anvanced --等於1時表示需要執行show advanced語句才會生效的變數--也可以使用sp_configure查詢服務器配置選項資訊,只是參數有所不同,具體查看聯機叢書
引用地址:http://www.cnblogs.com/meslog/