Replaying trace on different server/dbid | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Replaying trace on different server/dbid

Hi all, I tried to replay the trace I captured from Production database on another server’s copy of that database, for obvious reasons. When y0ou replay the trace all the transactions are really beinbg reapplied, so I just made a copy of the production databse on dev server. Anyway, since database id is not replacable in the trace, my replay was erroring out. I had to manually reapply the transactions. Is it possible to specify which database I want to apply the replay to? Tnx in advance.
What was the error while playing the trace in this case?
http://www.informit.com/articles/article.asp?p=454000&seqNum=4 fyi. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
Well, it was just that the trace didn’t find the correct database, since the DBID is diffecrent and is impossible to edit:<br /><br />error:<br />No matching connection to execute this on. Will create one automatically.<br />then it just doesn’t find the objects since it defaults to master rather than specific database.[<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />!]<br /><br /><br /><br /><br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by satya</i><br /><br />What was the error while playing the trace in this case?<br /<a target="_blank" href=http://www.informit.com/articles/article.asp?p=454000&seqNum=4>http://www.informit.com/articles/article.asp?p=454000&seqNum=4</a> fyi.<br /><hr noshade size="1"><b>Satya SKJ</b><br />Microsoft SQL Server MVP<br /><br /><br />Contributing Editor & Forums Moderator<br /<a target="_blank" href=http://www.SQL-Server-Performance.Com>http://www.SQL-Server-Performance.Com</a><br /><center><font color="teal"><font size="1">This posting is provided AS IS with no rights for the sake of <i>knowledge sharing.</i></font id="size1"></font id="teal"></center><br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Can you drop and recreate the database according to the sequence of dbid from sysdatabases on dev. server? Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
I could create an empty one and DTS all the objects into it, but…how do I specify the dbid in the database create statement?
As this is a dev.server I would go with updating sysdatabases (which is not recommended but no other go). Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
thanks
]]>