Centralised Stored Proc.
-
Quick Question: I have a number of SQL/MSDE databases on the local company server. Each database uses identical stored procedures for quick updates to their record items.
Can I use just one copy of the stored procedure for use by all the databases, instead of duplicate in each one? If yes, does this have to go in the master database. How would you distinguish the active database (perhaps using Using dbo.???)?
I Dream of Absolute Zero
-
Quick Question: I have a number of SQL/MSDE databases on the local company server. Each database uses identical stored procedures for quick updates to their record items.
Can I use just one copy of the stored procedure for use by all the databases, instead of duplicate in each one? If yes, does this have to go in the master database. How would you distinguish the active database (perhaps using Using dbo.???)?
I Dream of Absolute Zero
You must to inform the database by parameter.... I worked in a proyect where each database had the data of an specific mounth and Year. To solve that we had a central DB with the stored procedures and a set of parameters, for example, the name of the last DB, and the name of the previous DBs, etc.... Regards.... Carlos Antollini Do you know piFive[^] ?
-
Quick Question: I have a number of SQL/MSDE databases on the local company server. Each database uses identical stored procedures for quick updates to their record items.
Can I use just one copy of the stored procedure for use by all the databases, instead of duplicate in each one? If yes, does this have to go in the master database. How would you distinguish the active database (perhaps using Using dbo.???)?
I Dream of Absolute Zero
try adding the new stored procedures to the model database all new databases are a copy of the model database so they will contain the stored procedures you created.
-
try adding the new stored procedures to the model database all new databases are a copy of the model database so they will contain the stored procedures you created.
True, but if one of the stored procedures needs to be updated, it will then have to be applied to all databases.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
-
True, but if one of the stored procedures needs to be updated, it will then have to be applied to all databases.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
Colin Angus Mackay wrote: but if one of the stored procedures needs to be updated, it will then have to be applied to all databases Exactly. What I was after is a central location where all the databases could access these SPs. Changes to the SP would then immediately be reflected to all the databases. I have searched, but to no avail. I can only assume that this is not [easily] possible.
I Dream of Absolute Zero