您好,我是小DAI,专注于数据库管理员相关的技术问答,请问有什么可以帮您?

sp_extrapwdchecks

语法


sp_extrapwdchecks <caller_password>, <new_password>, <login_name>

参数

<caller_password>

指定当前口令。

<new_password>

指定要设置的新口令。

<login_name>

指定与要更改或要添加的口令相关联的登录名。

用法

  • sp_extrapasswordchecks 必须使用 raiserror 向 SAP ASE 服务器报告错误。使用 sp_addmessage 为 SAP ASE 服务器中的此故障添加错误消息。

    ⚠️

    请勿使用 raiserror 获取意外行为。raiserror 会更新 @@error 全局变量。每次执行 T-SQL 语句(包括 print 和 if)时也会更新 @@error。如果 raiserror 后跟有任何 T-SQL 语句,则 @@error 将被覆盖,而且如果 raiserror 后跟有任何 T-SQL 语句,sp_extrapwdchecks 无法对失败的口令返回错误。

  • sp_extrapwdchecks 允许 caller_password 和 loginame 参数为 NULL 值。

    在以下情况下,caller_password 参数为 NULL:

    a) 系统安全员使用 create login 命令创建新的登录帐户。

    b)系统安全员使用 alter login .. modify password 命令修改登录帐户的口令。

    系统安全员使用 create login 命令创建新登录帐户时,loginame 参数为 NULL。