Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importance of where sprocs are stored 2

Status
Not open for further replies.

tektipster79

Programmer
Oct 1, 2007
34
0
0
US
Are there any performance implications to storing a stored procedure in one database that accesses data in another database? Same server, just a different database. My reason for storing it on the other database is mainly for organizational purposes.
 
If you are doing cross db work then it depends on what you are doing. You probably won't notice a db hit unless you are going cross server.

If "for organizational purposes" is the only reason that you have it on db x instead of db y, then that's not really a legitimate reason for doing it. The databases should be as isolated as possible, otherwise there is no point in having separate databases, except for "organizational purposes, which we won't even go near.

The problem that you run into with cross db is if you ever change your database name. (Things get interesting)



If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Or what if you want to move the database to another server?

And how about the fact that your "full database backup" actually doesn't have the "full database"?

I would advise against this maintenance nightmare.

Joe Schwarz
Custom Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top