sp_approlepassword (języka Transact-SQL)

Zmienia hasło roli aplikacji w bieżącej bazie danych.

Important noteImportant Note:

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. W zamian należy użyć instrukcji ALTER APPLICATION ROLE.

Topic link iconKonwencje składni języka Transact-SQL

sp_approlepassword [ @rolename= ] 'role' , [ @newpwd = ] 'password' 

Argumenty

  • [ @rolename = ] 'role'
    Is the name of the application role.Role is sysname, with no default.role must exist in the current database.

  • [ @newpwd = ] 'password'
    Is the new password for the application role.password is sysname, with no default.password cannot be NULL.

    Security noteSecurity Note:

    Nie należy używać hasła wartości NULL.Należy używać silnego hasła.Aby uzyskać więcej informacji zobaczStrong Passwords.

Wartości kodów powrotnych

0 (sukces) lub 1 (brak)

Remarks

Procedury sp_approlepassword nie można wykonać w transakcji zdefiniowanej przez użytkownika.

Uprawnienia

Wymaga ALTER ROLE aplikacja bez uprawnień w bazie danych.

Przykłady

Poniższy przykład ustawia hasło dla PayrollAppRole Rola aplikacji do B3r12-36.

EXEC sp_approlepassword 'PayrollAppRole', '''B3r12-36'