Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedures for many databases
Message
 
 
À
09/04/2001 14:27:30
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00493692
Message ID:
00493714
Vues:
18
>Hi All,
>
>I currently have about 10 databases. One of the databases stores information about all the other databases. I want to write stored procedures that all dtabases will access without having to manage each procedure from within each database, since each will all be the same, respectively.
>
>Is it acceptable to store all my procedures in one database where all my other databases will call the procedures?
>
>Are there performance implications?
>
>Thanks in advance....
>Michael

Michael,
While it is acceptable, I don't see how it will be beneficial to have them stored singularly except for maintenance purposes. I could be mistaken depending on what T-SQL code you have in your SPs.

If you are processing row sets for individual databases and tables, I see a big performance hit in centralizing your SPs. If you centalize then you would need to use Dynamic SQL in order to process databases and tables specified by the user. The SQL statements would have to compiled and optimized whenever the SP was run thereby short circuiting one of the reasons to use SPs. In order to be pre-optimized, you would need to hard code the database and table names in the SP at design time.

My $0.02.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform