Generate sp_configure commands from a server to replay on another or after a rebuild. Correct spelling of create before runnig
SET NOCOUNT ON
SELECT '/****--' + @@SERVERNAME
EXEC sp_configure 'show advanced options' , '1'
RECONFIGURE WITH OVERRIDE
SELECT '****/'
CREAT TABLE #temp
(
name varchar(35) ,
minimum varchar(12) ,
maximum varchar(12) ,
config_value varchar(12) ,
run_value varchar(12) ,
)
INSERT #temp
exec sp_configure
SELECT 'EXEC sp_configure ''' + LTRIM(RTRIM(name)) + ''' , ''' + LTRIM(RTRIM(run_value)) + '''' FROM #temp
DROP TABLE #temp
dumping ground for code that might be useful sometime, somewhere. Beware the formatting mangle of the blog post...
Wednesday, March 7, 2007
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
07
(13)
-
▼
Mar
(11)
- TSQL: Restore commands for al DBs
- TSQL: Generate sp_configure commands
- TSQL: Generate Make Directory (MD) commands
- TSQL: SQLServerAgent job history
- TSQL: Rowcount for all tables
- SQL-DMO: Script all DB objects, all DBs
- TSQL: SQLServerAgent job detail summary
- DBCC CHECKDB: Summarise output file
- TSQL: Get drive space
- TSQL: Get database space info
- SQL-DMO: SQLServerAgent Jobs to files
-
▼
Mar
(11)
No comments:
Post a Comment