




















操纵基本(表)的存储过程
注册应用程序。
CREATE PROCEDURE aspnet_Applications_CreateApplication
(
@ApplicationName nvarchar(256),
@ApplicationId uniqueidentifier OUTPUT
)
该过程检查应用程序名(@ApplicationName)在表(aspnet_Applications)中是否已经存在,
如果存在,则表示应用程序已经注册;如果不存在,就为@ApplicationName在应用程序表
(aspnet_Applications)中新增一行,注册新的应用程序。
输出参数带回用户ID。
创建新用户。
CREATE PROCEDURE aspnet_Users_CreateUser
(
@ApplicationId uniqueidentifier,
@UserName nvarchar(256),
@IsUserAnonymous bit,
@LastActivityDate datetime,
@UserId uniqueidentifier OUTPUT
)
输出参数带回新建用户的ID。
返回值:成功返回0;
失败(对应于@UserId的用户已存在)返回-1。
删除用户表的一个或多个从表中的数据,
当所有从表中的数据都被删除后,也一并删除主表(aspnet_Users)中的数据。
用户表(aspnet_Users)表的主从关系请参看数据库关系图 。
数据库关系图 。
CREATE PROCEDURE aspnet_Users_DeleteUser
(
@ApplicationName nvarchar(256),
@UserName nvarchar(256),
@TablesToDeleteFrom int,
@NumTablesDeletedFrom int OUTPUT
)
| 表 | 值 |
| aspnet_Membership | 1 |
| aspnet_UsersInRoles | 2 |
| aspnet_Profile | 4 |
| aspnet_PersonalizationPerUser | 8 |
返回值:成功返回 0;
发生错误,返回 SQL SEVER 系统错误号(@@ERROR)。
其它(杂类)
aspnet_AnyDataInTables:检查某个表中是否存在数据,还是空表。
aspnet_WebEvent_LogEvent:
由SqlWebEventProvider调用,向aspnet_WebEvent_Events表中写入事件日志。
以下三个是关于SchemaVersion的(请参见aspnet_SchemaVersions表)。
aspnet_CheckSchemaVersion
aspnet_RegisterSchemaVersion
aspnet_UnRegisterSchemaVersion
aspnet_Setup_RemoveAllRoleMembers:SQL SERVER ROLE
aspnet_Setup_RestorePermissions:SQL SERVER PERMISSION
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。