Password changes

  • I would like my SQL users to be able to change their SQL password.Using below stor proc it can be done.

    Exec sp_password <old password>, <new password>

    However, I have question, when i run the exec sp_password syntax it works fine.But when i have server level trigger which i am auditing all security access changes to a table, so in order to work this i have to grant additional permissions to work like View server state and sp_send_dbmail. Which i would think is not appropriate to grant access to every user. Any thoughts to be done better way? Thanks in advance.

    • This topic was modified 5 years, 9 months ago by Admingod.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Any advice please?

  • I think you can put an EXECUTE AS clause in your trigger definition.  Alternatively, use a SQL Audit instead of triggers.

    John

  • In order to give the stored procedure permissions that you don't want the calling user to have, it would help to use a certificate to sign the procedure.

    Here's an article showing and example of one for AdventureWorks:

    https://docs.microsoft.com/en-us/sql/relational-databases/tutorial-signing-stored-procedures-with-a-certificate?view=sql-server-ver15

     

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply