The following examples show common usage scenarios for the sac utility:
A. Export All Default Instance Settings
The following example shows how to export all of the feature, connections, and service settings for the default SQL Server instance to the file server1.out. Because the example specifies a user name but no password, sac will prompt for a password.
|
sac out server1.out –S server1 –U admin –I MSSQLSERVER |
B. Import Feature Settings to Another Server
The following example imports only the feature settings from the file server1.out and applies them to the default SQL Server instance on server 2. Because this example does not provide a user name, sac uses Windows Authentication.
|
sac in server1.out –S server2 –F |
C. Export All Local Feature and Network Settings
The following example will export all feature and connection settings, but not service settings, for all SQL Server instances and components on the local server to the file server1.out.
|
sac out server1.out –F –N |
D. Import All Settings
The following example imports all settings available in the file server1.out to server2.
|
sac in server1.out –S server2 |
E. Export All Database Engine Settings
The following example exports all settings for all Database Engine instances on the local server to the file server1.out.
F. Import Service State Settings
The following example imports only the service state settings from server1.out and applies the service settings to server2.
|
sac in server1.out –S server2 -T |