DIR Return Create A Forum - Home
---------------------------------------------------------
ExcelSoft Database Professionals
HTML https://esdbp.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Scripts
*****************************************************
#Post#: 47--------------------------------------------------
T-SQL Script to Add SQL Server Startup Parameters
By: srinivasma_exceldbp Date: April 15, 2014, 7:02 am
---------------------------------------------------------
/*
T-SQL Script to Add SQL Server Startup Parameters
SQL Server Configuration Manager can be used to change startup
parameters,
establishing a remote desktop session to the relevant machine is
required to launch it.
This process can be time-consuming when dealing with large
numbers of
scattered SQL Server instances.
In addition, when using SQL Server Configuration Manager,
manually entries of the startup parameters, may result in
making mistakes
1. This script works only on instances running SQL Server 2008
R2 SP2 or
later because the sys.dm_server_registry DMV isn't available in
earlier
versions of SQL Server.
2. For the script to run successfully, the SQL Server service
account should have full
access to the registry or be a member of Local Administrators
group.
After successfully testing the script against a SQL Server
instance,
you can extend its functionality by using Central Management
Server.
@Parameters -- Start up parameter to be added
@Argument_Number variable -- In the registry, each parameter's
name starts
with SQLArg followed by a number
SQLArg0 identifies the master database data file.
SQLArg1 identifies the Errorlog folder.
SQLArg2 identifies the master database log file.
Therefore, if no other startup parameter has been defined,
the value of @Argument_Number would be 3,
which will be used for the next startup parameter SQLArg3.
*/
declare
gopher.createaforum.com:70 /forums/esdbp/p/45:50: port field too long