Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Beginner Question 2

Author  Topic 

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2011-08-03 : 09:29:47
Hey everyone, I'm going to be changing a DB name to match our existing naming convention and I'm wondering if there is a way to point existing jobs (backups and replication/dump jobs) to the newly named DB, or if this even needs to be done. I know when creating a new step in a job, it asks which DB you want to use, but when I edit the existing steps, there no place to change it.

Suggestions?

Steve

Steve

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-08-03 : 10:46:17
When you edit a job step you absolutely have an opportunity to select the DB.

Generally speaking - renaming any existing sql object is very risky. Lots of stuff will break. That is why it is worth taking time at the beginning to thoughtfully name stuff.

If you don't have applications with their own connection configurations and sql code in other databases that reference this one, etc. Then you may be able to get away with it - but generally I'd say live with what you have.

Be One with the Optimizer
TG
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2011-08-03 : 10:56:58
quote:
Originally posted by TG

When you edit a job step you absolutely have an opportunity to select the DB.

Generally speaking - renaming any existing sql object is very risky. Lots of stuff will break. That is why it is worth taking time at the beginning to thoughtfully name stuff.

If you don't have applications with their own connection configurations and sql code in other databases that reference this one, etc. Then you may be able to get away with it - but generally I'd say live with what you have.

Be One with the Optimizer
TG



Changing the configuration file will be easy, as we are upgrading the application at the same time, though, I'm now thinking that I might do both of them separately. TO help with troubleshooting if something were to happen.

Where can I change the DB for a specific Step in a Job? The dropdown is only there when you create a new job. It's possible that I'm blind too, FYI. Thanks for your help.

Steve

Steve
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-08-03 : 11:39:26
>>Where can I change the DB for a specific Step in a Job? The dropdown is only there when you create a new job.
select the "Steps" page | Select the specific Step | click "Edit" button. There will be a database drop down with various options depending on the "Type" of step you've selected.

Be One with the Optimizer
TG
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-08-03 : 12:22:55
You will also need to check every procedure, function and view on that server, make sure none use 3-part naming to refer to a table. If there are any instances with linked servers pointing to the one you're changing, you'll also have to make that check on all of those. If the app embeds SQL code, you need to do the same check there.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2011-08-03 : 17:34:15
I would recommend downloading SQL Server from Redgate to help you find any references in SQL Server to that database. It will not help with anything outside of SQL Server, but it will identify any code that uses 3 or 4 part-naming in that system.

Jeff
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2011-08-04 : 08:18:39
Was there a specific SQL tool you were referring to Jeff?

Steve
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2011-08-04 : 16:38:04
Sorry - bad fingers...SQL Search (almost did it again...) :)

This is a free utility that you can use to search for objects in your databases. It has come in very handy for me.
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2011-08-05 : 07:49:29
Oh ok, thanks Jeff. This will definitely do the trick! It was able to find a few instances where I might not have looked otherwise, hopefully saving any hassle when it actually comes time to switching the name. Thanks for everyone's help!

Steve
Go to Top of Page
   

- Advertisement -