Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tbrothers
Yak Posting Veteran
83 Posts |
Posted - 2008-07-30 : 15:23:16
|
Hi:On our SQL 2005 Reporting Services server we are using a shared data source. The connection string is Data Source=SQL2K5-PUB;Initial Catalog=ESI.Exactly what does the term "initial" mean?Thanks,Terry |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tbrothers
Yak Posting Veteran
83 Posts |
Posted - 2008-07-30 : 15:33:35
|
So if the report needs resources from multiple databases, does it matter which database is specified as "initial"?Thanks,Terry |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tbrothers
Yak Posting Veteran
83 Posts |
Posted - 2008-07-30 : 15:38:29
|
Yep - Using stored procedures. All SP's and views are in a separate and dedicated SRS database I created for the report writers to use. This way they don't need any special permissions to our accounting (production) databases.Thanks for the clarification Tara.Thanks,Terry |
 |
|
tbrothers
Yak Posting Veteran
83 Posts |
Posted - 2008-07-30 : 16:38:28
|
I think I have it figured out now. If a report uses a SP in database RPT and the initial catalog is RPT then the report does not need to specify FROM RPT..<tablename> as it'll default to the RPT database.So ... Is there a Best Practice concerning referencing database objects? In other words, are there pros and cons to Always specifying the database (e.g. FROM DBname..TBLname)?Thanks,Terry |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-30 : 16:41:44
|
The con is that you can't easily port your database to another instance if you want to use a different database name. So take for example a test environment where you might have a few copies of a production database all on one instance. You can't have duplicate database names, so you've named them prodcopy1, prodcopy2, prodcopy3. In your scenario, you'd have to modify code in order to use these different names. This would be a huge issue in our environment due to the hundreds if not thousands of stored procedures in use.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
|
|