Export (0) Print
Expand All

rs Utility

SQL Server 2000

The rs utility is a script host that processes script you provide in an input file. You can define scripts to administer a report server, copy report server database content to another database, publish reports, and so forth. The script must be written in Microsoft Visual Basic® .NET code, and stored in a Unicode or UTF-8 text file with a .rss file extension. You cannot debug scripts with the rs utility. To debug a script, run the code from within Visual Studio.

You can run scripts to make changes to the local computer or a remote computer. To make changes to a remote computer, specify the remote computer in the serverURL argument.

To run the tool, you must be a local administrator on the computer that has the report server instance you are running the script against. To learn more about the rs utility, run or view a sample scripts that publish sample reports to a report server and cancel a running process. For more information, see Sample Scripts.

File Location

The command line utilities are installed when you choose Administration Tools during Setup. You can run them from any directory on your file system. Rs.exe is located at <drive>:\Program Files\Microsoft SQL Server\80\Tools\Binn.

Syntax
rs {-?}
[-i input_file]
[-s serverURL]
{-u username}
{-p password}
{-l time_out}
{-b }
{-v globalvars}
{-t }
Arguments

-?

Displays the syntax of rs arguments.

-i input_file

(Required.) Specifies the .rss file to execute. This value must be a fully-qualified path to the .rss file. The following example illustrates the syntax for this argument:

rs –i c:\scriptfiles\script_copycontent.rss -s http://localhost/reportserver

-s serverURL

(Required.) Specifies the server and virtual directory to execute the file against. The prefix http:// or https:// at the beginning of the server name is optional. If you omit the prefix, Reporting Services attempts to use https first, and then uses http if https does not work.

-u username

(Optional if you are logged on as a local administrator.) Specifies the user name that is used to log on to the server. The value must include the domain and user account. If username and password are omitted, the current Windows user account is used.

-p password

(Optional if you are logged on as a local administrator.) Specifies the password that is used to log on to the server.

-l time_out

(Optional.) Specifies the number of seconds that elapse before the connection to the server times out. The default is 8 seconds. If you do not specify a time-out value, the default is used. A value of 0 specifies that the connection never times out.

-b

(Optional.) Specifies that the commands in the script file run in a batch. If any commands fail, the batch is rolled back. Some commands cannot be batched, and those succeed as usual. Only exceptions that are thrown and are not handled within the script result in a rollback. If the script handles an exception and returns normally from Main, the batch is committed.

If you omit this parameter, the commands run without creating a batch.

-v globalvars

(Optional.) Specifies that global variables are created with the names given and set to the values supplied. For example, -v a="b" c="d" results in a variable named a with a value of "b" and a variable c with a value of "d". These variables are global and are available to any function in the script. A backslash and quotation mark (\") is interpreted as a double quotation mark. The quotation marks are required only if the string contains a space. Variable names must be valid for Visual Basic .NET: they must start with alphabetic character or underscore and contain alphabetic characters, digits, or underscores. Reserved words cannot be used as variable names.

-t

(Optional.) Adds trace information to any error messages that may occur. This argument does not take a value.

See Also

Error Reporting for rs Utility

Running a Reporting Services Script File

Report Server Command Line Utilities

Scripting Deployment and Administrative Tasks

Scripting with RS.exe and the Web Service

Show:
© 2014 Microsoft