Sunday, September 13, 2009

ASP.NET Membership Tables Export to SQL File

With C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe its possible to create needed asp.net membership tables for authentification in web / win applications.

With this executable its also possible to create a SQL file and install it on every wanted database. To export everything to SQL file we just need to run the following command:

aspnet_regsql.exe -E -S localhost -d targetDBSchemaName -A all -sqlexportonly c:\membership.sql

The output of this script looks like this:

---------------------------------------
Starting execution of InstallCommon.SQL
---------------------------------------

(130 row(s) affected)
Creating the aspnet_Applications table...
Creating the aspnet_Users table...
Creating the aspnet_SchemaVersions table...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
Creating the vw_aspnet_Applications view...
Creating the vw_aspnet_Users view...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
----------------------------------------
Completed execution of InstallCommon.SQL
----------------------------------------
-------------------------------------------
Starting execution of InstallMembership.SQL
-------------------------------------------
Creating the aspnet_Membership table...
Creating the vw_aspnet_MembershipUsers view...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
--------------------------------------------
Completed execution of InstallMembership.SQL
--------------------------------------------
------------------------------------------------
Starting execution of InstallProfile.SQL
------------------------------------------------
Creating the aspnet_Profile table...
Creating the vw_aspnet_Profiles view...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
-------------------------------------------------
Completed execution of InstallProfile.SQL
-------------------------------------------------
--------------------------------------
Starting execution of InstallRoles.SQL
--------------------------------------
Creating the aspnet_Roles table...
Creating the aspnet_UsersInRoles table...
Creating the vw_aspnet_Roles view...
Creating the vw_aspnet_UsersInRoles view...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
---------------------------------------
Completed execution of InstallRoles.SQL
---------------------------------------
------------------------------------------------
Starting execution of InstallPersonalization.SQL
------------------------------------------------
Creating the aspnet_Paths table...
Creating the aspnet_PersonalizationAllUsers table...
Creating the aspnet_PersonalizationPerUser table...
Creating the vw_aspnet_WebPartState_Paths view...
Creating the vw_aspnet_WebPartState_Shared view...
Creating the vw_aspnet_WebPartState_User view...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
-------------------------------------------------
Completed execution of InstallPersonalization.SQL
-------------------------------------------------
----------------------------------------------------
Starting execution of InstallWebEventSqlProvider.SQL
----------------------------------------------------
Creating the aspnet_WebEvent_Events table...
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
-----------------------------------------------------
Completed execution of InstallWebEventSqlProvider.SQL
-----------------------------------------------------

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge