How to create / recreate object

  • Hi,

    What is the best way to modify a existing stored procedure or function ?

    Is it to drop / create / grant the object or is it to only alter the object ?

    The scope here is to modified a customer production database.

    First, I can modify directly the customer database, I don't know the right I have on it.

    Second, I just provide the script to a IT or a DBA ?

    Thanks

  • This was removed by the editor as SPAM

  • Hi,

    1. ALTER PROCEDURE is recommended because all permissions are retained.

    2. DBA has to run scripts but IT support has to be notified too. But before ANYTHING has to be done you have to sign the installation plan with all 4 signatures: Customer, Your Manager, DBA and IT Support. Have a meeting. Find out / request the appropriate rignts, ensure backups and a process of restoring the backups if needed.

     

    Regards,Yelena Varsha

  • As a production DBA I attempt to discourage the use of ALTER, whilst it might maintain permissions it does not update the create date of the object. When prod systems have problems being able to sort objects by create date to see what was last changed is very useful and has assisted in speedy resolution of many a problem. If there was ever one command I wished did not exist in sql server it is the "alter" command. ( followed very closely by sp_rename !! )

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

Viewing 4 posts - 1 through 3 (of 3 total)

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