chokka
asked on
Whether Drop and Create Stored Procedure is best practice for deployment (or) Alter Stored Procedure is best practice for deployment?
Whether Drop and Create Stored Procedure is best practice for deployment (or) Alter Stored Procedure is best practice for deployment?
I am working on automating a process of deploying Stored Procedures across the Servers through SSIS Package.
My clarification is, when we deploy an existing stored procedure across the environments , Whether we can drop and create (or) Alter would be fine?
I am working on automating a process of deploying Stored Procedures across the Servers through SSIS Package.
My clarification is, when we deploy an existing stored procedure across the environments , Whether we can drop and create (or) Alter would be fine?
whenever you DROP and CREATE you may lose the permissions associated with that object.
I haven't used SSIS. I am curious though as to why you wouldn't drop if exists and the recreate them. Are you worried about losing permissions on them? If so can't it run something to GRANT those as needed?
ASKER
@SStory, My question is " Which is the best practice? "
Either Drop and Create
(or)
Alter
I understand about losing the permission on Drop and Create. We can add a Grant Permission syntax after create.
Which is the best practice to follow for SP Deployment from DBA Stand point?
Either Drop and Create
(or)
Alter
I understand about losing the permission on Drop and Create. We can add a Grant Permission syntax after create.
- Drop Procedure
- Create Procedure
- Grant Permission
Which is the best practice to follow for SP Deployment from DBA Stand point?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
no problem. Thank you.
You should use ALTER in case of the stored procedure so as to maintain the permissions associated with that stored procedure.
Regards,
Pratik