Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000446.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: PQA Clearquest</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000445.html" title="SJ VOB Move" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000447.html" title="PQA Clearquest" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000445.html">&laquo; SJ VOB Move</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000447.html">PQA Clearquest &raquo;</a>
44                      </p>
45
46                      <a id="a000446"></a>
47                      <div class="entry" id="entry-446">
48                         <h3 class="entry-header">PQA Clearquest</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Hooked up new PQA schema database and data database</li>
53
54   <li>Starting to code merge routines</li>
55
56   <li>Created PQA Schedule (See below)</li>
57 </ul>
58                            </div>
59                            <div id="more" class="entry-more">
60                               <h3>Moving MS/SQL Databases</h3>
61
62 <p>Moving a MS/SQL Database from one host to another involves a bit of tweaking to get the new system to recognize that it has a new database. I will attempt to detail here what needs to be done. </p>
63
64 <p>In order to import Clearquest databases to a new MS SQL Database Server:</p>
65
66 <ol>
67   <li>Place imported datafile onto new machine.</li>
68
69   <li>Start the MS SQL Server Enterprise Manager (C:\Windows\system32\mmc.exe /s "C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.msc")</li>
70
71   <li>Expand tree until you see "(local)" then "Databases". Right click on Database and select New Database to create an empty new database. Name the database appropriately. On the Data Files tab we changed the default path of C:\Program Files\Microsoft SQL Server\MSSQL\data\&lt;database name&gt;.mdf to a more approriate place. Also check the Transaction Log tab to adust path.</li>
72
73   <li>Restore database by right clicked on the new database you created and selecting All Tasks: Restore Database. Under Restore select From Device then click Add then find the restored db file. Under Options change the paths for Move to physical file name.</li>
74
75   <li>For Clearquest Schema databases only (You may need to restart the SQL Server Enterprise Manager after the above restore of the database): Since Clearquest uses a database to hold the schema and that schema points to known user databases, importing a Clearquest schema will have entries that point over to <b>projection</b> databases! These need to change:
76
77     <ul>
78       <li>In SQL Sever Enterprise Manager locate your imported schema database and double click on Tables.</li>
79
80       <li>Find master_dbs, right click on master_dbs and select Open Table: Return All Rows.</li>
81
82       <li>Change the server column to the name of the new server</li>
83
84       <li>Select Run (the ! symbol in the toolbar)</li>
85     </ul>
86
87   <li>Folllow instructions at <a href="http://support.microsoft.com/default.aspx?scid=kb;%5bLN%5d;Q240872">How to resolve permission issues when you move a database between servers that are running SQL Server</a> for fixing permissions problems.</li>
88
89   <li>Import user databases. Note the fix above regarding master_dbs:server is <b>not</b> required for user databases</li>
90 </ol>
91
92 <h3>Merge Routines and Connecting to Multiple Schemas</h3>
93
94 <p>With two schema databases I was having problems with my Perl script connecting to the databases. In the past I had:
95
96 <div class="code"><pre>
97       ## Internal variables ##
98       my $session;
99       my $login           = "admin";
100       my $password    = "*****";
101       my $masterdb    = ""; # Don't need a masterdb (Using default?)
102       my $db_name;
103     ...
104       sub StartSession {
105         $db_name = shift;
106
107         $session = CQPerlExt::CQSession_Build ();
108
109         $session->UserLogon ($login, $password, $db_name, $masterdb);
110       } # StartSession
111 </pre></div>
112
113 <p>Now when I run this in the presence of two schema databases I get:</p>
114
115 <div class=box>
116     The database "MASTR" belonging to master database "2002.05.00" is an invalid name. Enter the correct name of a ClearQuest user database. at c:/Program Files/Rational/ClearQuest/lib/CQPerlExt.pm line 3713.
117 </div>
118
119 <p>I think I need to specify the proper $ masterdb name but I don't know what that might be... Hmmm... Seems that $masterdb is really just the Connection name that you'd see when you start Clearquest Designer or Clearquest Client and there are multiple schemas to choose from. That's odd because that could be potentially anything as the user could rename it. However if I use PQA_Old on p4test (which is what I named the old schema connection) then it works.</p>
120
121 <p>OK, more work on this tomorrow. I have already defined the new defect record in my Perl module. I just have to start coding the merge routines now...</p>
122
123 <h3>PQA Schedule</h3>
124
125 <p>The following is a rough estimate of the work needed to be completed to get to the point where we are ready to convert the live production databases</p>
126
127 <ul>
128   <li> Restore new Schema DB and Data DB (<font color="#999">1 Day</font>)</li>
129
130   <li> Investigate record/field mappings (<font color="#999">2 Days</font>)</li>
131
132   <li>Determine order fo record additions (<font color="#999">1 Day</font>)</li>
133
134   <li>Investigate requirements for adding of records to Clearquest (<font color="#999">2 Days</font>)</li>
135
136   <li>Code/Test merge procedures (<font color="#999">3 Day</font>)</li>
137
138   <li>Test conversion on <b>p4test</b> (<font color="#999">4 Days</font>)</li>
139 </ul>
140
141 <p><b>Total:</b> 13 Days</p>
142                            </div>
143                         </div>
144                         <p class="entry-footer">
145                            <span class="post-footers">Posted by  on October 10, 2005 12:11 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000446.html">Permalink</a>
146                         </p>
147                      </div>
148
149                      
150
151                      
152                   </div>
153                </div>
154             </div>
155          </div>
156       </div>
157    </div>
158 </body>
159 </html>