How do we transfer server configurations from one SQL Server Instance to another

How do we transfer server configurations from one SQL Server Instance to another
How do we transfer server configurations from one SQL Server Instance to another

In the article we will see an easy way to transfer the parameters of one SQL Server instance in another. Parameters like max memory, max degree of parallelism, cost of threshold for parallelism

All we'll need to do is run the T-SQL script I've made on the server that has the parameters we want to keep.

The code

select 'sp_configure ''show advanced options'',1'
union all
select 'reconfigure with override'
union all
select 'go'
union all
select
'sp_configure ''' + cast(name as nvarchar(255)) + ''',' + cast(value as nvarchar(255)) + '' + ';'
from sys.configurations
union all
select 'go'
union all
select 'sp_configure ''show advanced options'',0'
union all
select 'reconfigure with override'
union all
select 'go'

The result

We can copy the generated commands all together to execute them on the server we want to have the same parameters.

How do we transfer server configurations from one SQL Server Instance to another

Do the parameters take effect immediately or does the instance need to be restarted?

Most parameters work dynamically, i.e. they don't need to restart the instance to activate.

To see which ones are not and require a restart, we execute the following query.

SELECT name ,description FROM sys.configurations
WHERE is_dynamic = 0
Share it

Leave a reply