The ASP.NET SQL Server Registration tool is used to create a Microsoft SQL Server database for use by the SQL Server providers in ASP.NET, or to add or remove options from an existing database.
You can run Aspnet_regsql.exe without any command-line arguments to run a wizard that will walk you through specifying connection information for your SQL Server installation, and installing or removing the database elements for the membership, role management, profile, Web Parts personalization, and health monitoring features. (Setting session state and SQL cache dependency are not covered by the wizard.) You can also run Aspnet_regsql.exe as a command-line tool to specify database elements for individual features to add or remove, using the options listed in the table below
Aspnet_regsql.exe
Option Description
-? Prints Aspnet_regsql.exe Help text in the command window.
-W Runs the tool in wizard mode. This is the default if no command-line arguments are specified.
-C Specifies the connection string to the computer running SQL Server where the database will be installed, or is already installed. This option is not necessary if you specify only the server (-S) and login (-U and -P, or -E) information.
-S Specifies the name of the computer running SQL Server where the database will be installed, or is already installed.
-U The SQL Server user ID to log in with. This option also requires the password (-P) option. This option is not necessary if you are authenticating using Windows credentials (-E).
-P The SQL Server password to log in with. This option also requires the user ID (-U) option. This option is not necessary if you are authenticating using Windows credentials (-E).
-E Authenticates using the Windows credentials of the currently logged-on user.
-sqlexportlonly Generates a SQL script file that can be used to add or remove the specified features. The specified actions are not performed.
Application Services Options
Adds support for one or more ASP.NET application services. Service identifiers can be specified together or separately. The following identifiers are used for ASP.NET application services:
-A all|m|r|p|c|w
all - All services, including common tables and stored procedures shared by the services
m - Membership
r - Role Manager
p - Profile
c - Web Parts Personalization
Removes support for one or more application services. Service identifiers can be specified together or separately. The following identifiers are used for ASP.NET application services:
-R all|m|r|p|c|w
m - Membershipr - Role Manager
p - Profile
c - Web Parts Personalization
w - Web Events
-Q Runs the tool in quiet mode and does not confirm before removing an application service.
-d Specifies the name of the database to create or modify for use with application services. If the database is not specified, the default database name of "aspnetdb" is used.
The database elements that are installed in the application services database will always be owned by the SQL Server database owner account (dbo). You do not need to be a system administrator for the computer running SQL Server to install the application services database. To install the application services database, a SQL Server login must be permitted to the db_ddladmin and dd_securityadmin roles for the SQL Server database.
Option Description
-d Specifies the name of the database to use with SQL cache dependency. The database can optionally be specified using the connection string option, -C.
-ed Enables a database for SQL cache dependency.
-dd Disables a database for SQL cache dependency.
-et Enables a table for SQL cache dependency. The -t option must also be included in the parameter string.
-dt Disables a table for SQL cache dependency. The -t option must also be included in the parameter string.
-t Specifies the table name to enable or disable for use with SQL cache dependency. This option must be used with the -et or -dt options.
-lt Lists all tables enabled for SQL cache dependency.
-ssremove Removes support for SQL Server mode session state.
Specifies the type of session state to us1:
-sstype t|p|c
t - Temporary. Session state data is stored in the SQL Server tempdb database. Stored procedures for managing session state are installed in the SQL Server ASPState database. Data is not persisted if you restart SQL. This is the default.
p - Persisted. Both session state data and stored procedures are stored in the SQL Server ASPState database.
c - Custom. Both session state data and stored procedures are stored in a custom database. The database name must be specified using the -d option.
0 Comments:
Post a Comment