Share via


sac Utility

The sac utility imports and exports Microsoft SQL Server 2005 surface area settings. Using this utility, you can configure the surface area on one computer, and then apply the same settings to other computers.

The easiest way to use the sac utility is to use the SQL Server Surface Area Configuration graphical user interface to configure one computer, then use sac to export the settings of that computer to a file. You can then use sac to apply the settings for all SQL Server 2005 components to other SQL Server 2005 instances on the local computer or on remote computers.

This utility is located at x:\Program Files\Microsoft SQL Server\90\Shared.

Syntax

sac {in | out} filename [-S computer_name]
    [-U SQL_login [–P SQL_ password]]
    [-I instance_name ]
    [-DE] [-AS] [-RS] [-IS] [-NS] [-AG] [-BS] [-FT]
    [-F] [-N] [-T] [-O]
    [-H | -?]

Parameters

  • in
    Import the surface area settings from a file and configure the instance, specified by instance_name, using those settings.
  • out
    Export the surface area configuration settings from an instance to the file specified by filename.
  • filename
    The full path of the file used when importing or exporting the surface area settings.
  • -Scomputer_name
    Specifies the name of a remote computer. If this argument is not specified, sac connects to the local computer.
  • -USQL_login
    Specifies the SQL Server Authentication login to use for the connection to the Database Engine. If not specified, sac uses Windows Authentication to connect to the Database Engine.
  • -PSQL_password
    Specifies the password for SQL_login. If this argument is not specified, sac prompts for a password. If -P is specified at the end of the command without a value, sac uses a null password.
  • -Iinstance_name
    Specifies the SQL Server instance to run sac against. If this option is not specified, sac connects to all SQL Server instances. For the default instance, the instance name is MSSQLServer.
  • -DE
    Import or export Database Engine settings.
  • -AS
    Import or export Analysis Services settings.
  • -RS
    Import or export Reporting Services settings.
  • -IS
    Import or export Integration Services settings.
  • -NS
    Import or export Notification Services settings.
  • -AG
    Import or export SQL Server Agent settings.
  • -BS
    Import or export the SQL Server Browser service settings.
  • -FT
    Import or export the Full-Text Search service settings.
  • -F
    Import or export the state of the following features for the specified components:

    Component Features

    Database Engine

    Ad hoc remote queries

    CLR integration

    DAC

    Database Mail

    Native XML Web service

    OLE automation

    SQL Server Service Broker

    SQL Mail

    Web assistant

    xp_cmdshell

    Analysis Services

    Ad hoc data mining queries

    Anonymous connections

    Linked objects

    User-defined functions

    Reporting Services

    Scheduled events and report delivery

    Web service and HTTP access

    Windows integrated security

  • -N
    Import or export the state of network protocols for remote connectivity for the specified components. Only the Database Engine and Analysis Services provide options for configuring remote connectivity.
  • -T
    Import or export the state of the Windows services for the specified components.
  • -O
    Specifies the name of the file that receives command-line output from sac.
  • -H | -?
    Display command syntax. Other arguments are ignored.

Remarks

The following rules apply to sac:

  • Arguments are not case-sensitive.
  • Precede command arguments with either a hyphen (-) or a forward slash (/). These symbols are equivalent.
  • Include a space between the argument and its value.
  • Enclose any value that contains special characters in quotation marks.

Examples

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.

sac out server1.out –DE

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

See Also

Concepts

Command Prompt Utilities

Other Resources

SQL Server Surface Area Configuration

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

12 December 2006

Changed content:
  • Removed -AD switch from syntax.