April 3, 2017 at 1:18 pm
Comments posted to this topic are about the item Rename Database
April 11, 2017 at 9:15 am
Great start with this thank you for your post! It looks like something that will be very useful to my team. One thing I wasn't sure of...
As written how does this sproc handle multiple secondary data files? At first glance, it looks like it doesn't. Is that right or am I misreading some of the script?
April 12, 2017 at 7:47 am
Hey Travis, I wasn't thinking about secondary files when I wrote this so you would have to modify it to do so.
April 18, 2017 at 10:06 am
darren.thompson 95578 - Monday, April 3, 2017 1:18 PMComments posted to this topic are about the item Rename Database
Hi, that's great script available only for the databases that have 1 data file .MDF and 1 log file .ldf
Can you modify and add rename task for secondary file .ndf thanks
April 21, 2017 at 7:43 am
Hi, I tried this stored procedure and it did not work because our system Administrator blocked access to
procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server.
Is there any work around?
Thanks.
Pete
April 21, 2017 at 8:04 am
Unfortunately, renaming a database is really a DBA task. This script blurs those lines between a DBA and a developer and some DBA's aren't going to allow it. So, there's not a good work around.
Having said that, ask your admin if they're willing to set it up as a job with an account that has privileges to run it.
(Note: This assumes you have access to kick off jobs.)
April 21, 2017 at 8:06 am
You can capture the output of the script and execute it directly instead of using xp_cmdshell.
April 21, 2017 at 9:34 am
darren.thompson 95578 - Friday, April 21, 2017 8:04 AMUnfortunately, renaming a database is really a DBA task. This script blurs those lines between a DBA and a developer and some DBA's aren't going to allow it. So, there's not a good work around.
Having said that, ask your admin if they're willing to set it up as a job with an account that has privileges to run it.
(Note: This assumes you have access to kick off jobs.)
I was able to by do it by adding a step in front to turn on the cmdshell and turn off at the end. Thanks
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply