June 15, 2009 at 4:33 am
i have 2 sql 2005 server, SQL a and SQL b , SQL a is the production server and sql b is the mirror server. i want use the db on mirror server for reporting. I create one snapshot on the mirror sql and its replace every 5 min .
DROP DATABASE XXX and
CREATE DATABASE XXX_SNP ON
( NAME = ElSystemNet, FILENAME = 'C:\MESSQLDB\XXX_SNP.ss' )
AS SNAPSHOT OF XXX;
GO
its schedule every 5 min.
one user run your report on XXX db, some times if the user run the repor its say " login failed " because the snapshot drop the old XXX db.
how can i use snapshot db as report db that refresh every 5 min ?
June 15, 2009 at 7:18 pm
My first question is, does the snapshot really need to be that current? If there are specific reports that require data to be that close to real-time, then perhaps those reports should be run against the production database, not a snapshot off the mirror database. Doing reporting that way makes sense, particularly if the most, or nearly most, current data isn't a requirement.
If you have to drop and recreate the snapshot every 5 minutes, then users may have to deal with the occasional failed login while the snapshot is recreated.
June 15, 2009 at 10:03 pm
Hi,
I agree with Lynn if we need Point in time data then this methedology is not good. Either you can run your reports with Production server or I must say you can use Transactional Replication and Publish tables which are used for reporting or you can use Log Shiping where Seconday Server is in Ready only mode (but in that as well while applying the TLogs it will kick out existing connections).
So the curx is
Either divers reports to Production Server
or
Use Transactional Replication.
Regards
GURSETHI
June 15, 2009 at 11:26 pm
Lynn Pettis (6/15/2009)
My first question is, does the snapshot really need to be that current? If there are specific reports that require data to be that close to real-time, then perhaps those reports should be run against the production database, not a snapshot off the mirror database. Doing reporting that way makes sense, particularly if the most, or nearly most, current data isn't a requirement.If you have to drop and recreate the snapshot every 5 minutes, then users may have to deal with the occasional failed login while the snapshot is recreated.
thx for answer,
i cant user the production server for reporting because i have performance problem on the product server. maybe is my methodology is worng.
Better question, how can i use mirror db just for reporting ?
June 16, 2009 at 1:23 am
The question that needs to be answered first is how current MUST the data be for reporting? If it must be as current as possible, then this is not the solution you need, and perhaps you do need to look at transactional replication to a secondary server for reporting.
June 16, 2009 at 3:01 am
if i use transactional replication , is the db online on the sec server ?
June 16, 2009 at 5:42 am
Hi,
Yes the secondary server will be online and you can use that as on OLAP server which can be used for reporting purpose. The changes from primary to Secondary are tracked under 2PC (2 phase commit)
Under Tran Repl there are 2 variants
Based on the sort of autonomy that you want to give to your secondary server, you can have
1.Transaction replication
2. Transaction replication with updatable subscription
For the first one you can update data on the secondary but those changes will not affect the Primary
With the second option the changes on the secondary server will update the Primary Server as well
Thanks,
Mani
June 16, 2009 at 7:19 am
You still have not answered the main question, how current does the data need to be for reporting purposes? Do the users really need up to the minute reporting from the reporting database?
Please stop and answer these questions, if not for us for yourself, and then go forward with developing a solution to meet the business requirements.
June 16, 2009 at 7:30 am
the db must be refresh every 5 min with the production db
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply