Hi, i have a server containing a database for each month of the year, each db have 5 tables and a 10 stored procedures. All tables and all sp have the same name in every database. eg.
---TABLES---
Jan01.dbo.RevenueDetail_tb
Feb01.dbo.RevenueDetail_tb
Mar01.dbo.RevenueDetail_tb
---STORED PROCEDURES---
Jan01.dbo.Get_Summary_sp(param1,param2)
Feb01.dbo.Get_Summary_sp(param1,param2)
Mar01.dbo.Get_Summary_sp(param1,param2)
I need some code or workaround to execute only one SP and decide which database is the right one.
My first try was making a database with no tables just the stored procedures, and joining the tables of all db in the stored procedure, but the performance is very "very" slow.
Each SP is executed from ASP pages.
I really apreciate any kind of help.
---TABLES---
Jan01.dbo.RevenueDetail_tb
Feb01.dbo.RevenueDetail_tb
Mar01.dbo.RevenueDetail_tb
---STORED PROCEDURES---
Jan01.dbo.Get_Summary_sp(param1,param2)
Feb01.dbo.Get_Summary_sp(param1,param2)
Mar01.dbo.Get_Summary_sp(param1,param2)
I need some code or workaround to execute only one SP and decide which database is the right one.
My first try was making a database with no tables just the stored procedures, and joining the tables of all db in the stored procedure, but the performance is very "very" slow.
Each SP is executed from ASP pages.
I really apreciate any kind of help.