Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Referencing Remote Data


Referencing Remote Data

Author
Message
Ed Zann
Ed Zann
Mr or Mrs. 500
Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)Mr or Mrs. 500 (505 reputation)

Group: General Forum Members
Points: 505 Visits: 1391
We have a reporting system that contains monthly snapshots of our core system database. Each snapshot is a database with a naming convention like Snapshot20111231. We frequently have SSRS reports that compare this month vs last month. I use synonyms in the main report query in order to avoid the messiness of constructing a dynamic sql statement. The reports are based on sprocs where the first thing that happens is redefining the synonyms to point to the month end snapshots the user requests via report parameters. It works well. Only drawback I see is the elevated permissions required by the reporting login to drop and recreate the synonyms.



Sigerson
Sigerson
Mr or Mrs. 500
Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)

Group: General Forum Members
Points: 551 Visits: 1232
We frequently have SSRS reports that compare this month vs last month. I use synonyms in the main report query in order to avoid the messiness of constructing a dynamic sql statement. The reports are based on sprocs where the first thing that happens is redefining the synonyms to point to the month end snapshots the user requests via report parameters.



That's a pretty creative solution to managing repetitive files where the date is part of the names. I have a couple of processes to implement this way. Thanks for posting it.

Sigerson

"No pressure, no diamonds." - Thomas Carlyle
kevin.unglesbee
kevin.unglesbee
SSC-Addicted
SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)

Group: General Forum Members
Points: 474 Visits: 242
I like synonyms over views. They can be fully automated for remote servers during a restore process. Since they have a standardized form and their data is in sys.synonyms, they are especially easy to change over. Views have to be scripted to properly change the objects and that's a pain.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search