SQL Server Performance

Replaying trace on different server/dbid

Discussion in 'SQL Server 2005 Performance Tuning for DBAs' started by sql_machine, Aug 28, 2006.

  1. sql_machine New Member

    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.
  2. satya Moderator

  3. sql_machine New Member

    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">
  4. satya Moderator

    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.
  5. sql_machine New Member

    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?
  6. satya Moderator

    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.
  7. sql_machine New Member

Share This Page