Hello,
I have 2 identical databases (identical structure) on the same sql server
correspoding to 2 companies.
Do I have to create 2 identical sets of reports or it is possible to choose
database on runtime?
Thank you,
LoriIn SQL 2005, you can make a dynamic connection, but not in sql 2000... about
the best you can do is use
Dynamic SQL, and OpenRowset or a linked server to do your queries ie.
If Parameters!.DataSource.value = 'a'
Select * from mytable
Else
Select * from openrowset(all the parameters that get you to the other
server...)
You could also put this in a SP... I am currently working on a project which
has about a dozen servers. We are making stored procedures which use the
openrowset function based on a parameter sent to the sp , which comes from
the Report Parameters.
As long as there are no cross server (multi server) joins etc. performance
has been alright...
I would prefer to use a linked server however... to centralize the login and
server info in one place instead of all over..
good luck...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Lori" <lhaiducescu@.seniorsoftware.ro> wrote in message
news:ev47$5ZoFHA.2920@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I have 2 identical databases (identical structure) on the same sql server
> correspoding to 2 companies.
> Do I have to create 2 identical sets of reports or it is possible to
> choose database on runtime?
> Thank you,
> Lori
>
No comments:
Post a Comment