By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,163 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Stored Procedure Reuse

P: n/a
I wonder if there is a solution for this in SQL 2000 (or do I have to
wait for SQL 2005)?

I am currently in the middle of developing a 'Yahoo' style portal which
will be rolled out in about 20 or so countries. I have set up in SQL
Server one database per country. All the portals have the same
functionality - but show different data.

Is it possible to have a single database which holds stored
proceedures, functions and views and have the individual country
databases use these?

Note: I want to avoid using EXEC sp_executesql.

I look forward to some good news on this! Thank you in advance.

Dadou.

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Dadou" <je**********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I wonder if there is a solution for this in SQL 2000 (or do I have to
wait for SQL 2005)?

I am currently in the middle of developing a 'Yahoo' style portal which
will be rolled out in about 20 or so countries. I have set up in SQL
Server one database per country. All the portals have the same
functionality - but show different data.

Is it possible to have a single database which holds stored
proceedures, functions and views and have the individual country
databases use these?

Note: I want to avoid using EXEC sp_executesql.

I look forward to some good news on this! Thank you in advance.

Dadou.


Proper source control and deployment is usually the best way to go - check
out the discussion on a "master" database here:

http://www.sommarskog.se/dynamic_sql.html#Dyn_DB

One other possibility might be to use a country code as part of the key in
your tables, and then have only one database, but that might not be possible
or desirable in your situation anyway.

Simon
Jul 23 '05 #2

P: n/a
If they are on the same server then why do you want separate databases
per country? As Simon has said, you could just add the country as part
of your primary keys. If you do have to take the separate databases
route then you probably won't gain much from putting the SPs in one
central DB. It would just add to code complexity unless for example you
created separate views in your master db that pointed to the correct
database, or maybe a set of partitioned views... which again begs the
question, why separate DBs?

--
David Portas
SQL Server MVP
--

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.