Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000755.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: Creating a Development Schema</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/000754.html" title="Creating Development Schema Repositories" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000756.html" title="Shebang and script interpreters" />
17
18    <!--
19 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
20          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
21          xmlns:dc="http://purl.org/dc/elements/1.1/">
22 <rdf:Description
23     rdf:about="http://defaria.com/blogs/Status/archives/000755.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/119"
25     dc:title="Creating a Development Schema"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000755.html"
27     dc:subject="Broadcom"
28     dc:description="Creating a dev schema is not that difficult. Note you can create a dev schema in the production schema repo or in a dev schema repo. The later is a just a bit safer as it is a bit more..."
29     dc:creator=""
30     dc:date="2012-08-29T21:08:12-06:00" />
31 </rdf:RDF>
32 -->
33
34
35    
36
37    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
38 </head>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
40    <div id="container">
41       <div id="container-inner" class="pkg">
42
43          <div id="banner">
44             <div id="banner-inner" class="pkg">
45                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
46                <h2 id="banner-description">Searchable status reports and work log</h2>
47             </div>
48          </div>
49
50          <div id="pagebody">
51             <div id="pagebody-inner" class="pkg">
52                <div id="alpha">
53                   <div id="alpha-inner" class="pkg">
54
55                      <p class="content-nav">
56                         <a href="http://defaria.com/blogs/Status/archives/000754.html">&laquo; Creating Development Schema Repositories</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000756.html">Shebang and script interpreters &raquo;</a>
59                      </p>
60
61                      <a id="a000755"></a>
62                      <div class="entry" id="entry-755">
63                         <h3 class="entry-header">Creating a Development Schema</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <p>Creating a dev schema is not that difficult. Note you can create a dev schema in the production schema repo or in a dev schema repo. The later is a just a bit safer as it is a bit more isolated.</p>
67
68 <p>To create a dev schema from the CQ Designer, right click on the schema repo and select <b>New: Schema</b>. We are creating a new schema by basing it off of an existing schema. Expand the + sign and select the version that you wish to base your new schema off of. Right now there is only Version 1. Select next and name your schema. I suggest that you use your username (e.g. adefaria) indicating that we are the owner of this dev schema. Enter comments if you like and then <b>Finish</b>.</p>
69
70 <p>After the schema is created it will ask you if you want to associate this with a database. You could select <b>Yes</b> and then go though naming your database and connecting it to an existing user database but chances are you don't have one of those yet. So select <b>No</b> for now. You now have a development schema.</p>
71
72 <h3>Creating a Test Database</h3>
73
74 <p>You must create an empty database on the database server. Use RDP to get a remote desktop there and run the SQL Server Management Studio and connect to the database server engine.</p>
75
76 <p>Next right click on databases and select New Database. Name your database. The convention for test databases is &lt;schemaname&gt;_&lt;id&gt;. For our personal test databases again I'd suggest using your user ID so I will create &lt;schemaname&gt;_adefaria for me.</p>
77
78 <h3>Setting the db_owner and schema owner</h3>
79
80 <p>In MSSQL we need to set the dbowner and the schema for this new database. Expand the folder tree (+) on your newly created database (MobDev_adefaria) then right click on Security and select New: User. Type &lt;dbadmin&gt; in the User Name edit box and then select and copy this string. We'll need it several times more in this process. Paste this into the Login name and Default Schema and then toggle on db_owner in both the Schemas owned by this user and Database role membership boxes then select OK.</p>
81
82 <p>Next right click on Security again and select <b>New: Schema</b>. Paste &lt;dbadmin&gt; into Schema Name and Schema Owner and click OK.</p>
83
84 <p>Now you have an empty database that you can associate with your schema.</p>
85
86 <h3>Associating your new test database with your dev schema</h3>
87
88 <p>Go back to CQ Designer and right click on your development schema again and select <b>Show: User Databases</b>. You should see a list of databases. Right click on an empty area and select <b>Create Database</b>. Seems odd to call it create database when the database has already been created - it really means "take this schema and it's definition of what should be in the user database and apply that definition/schema to my newly created empty database".</p>
89
90 <p>Give this database a Logical Database Name. Alas we only have 5 characters. I just use my initials - apd - short and simple. Add comments if you like. We use MSSQL for the database vendor. Then toggle Database Type to Test Database. We already have a production database in our dev schema repo then select next.</p>
91
92 <p>Now we fill in Physical Database Name with the name of the database (&lt;schemaname&gt;_adefaria) and the Database Server . Then paste that &lt;dbadmin&gt; into Administrator User and Administrator Password (See I told you you'd need it!) then Next and Next again.</p>
93
94 <p>Now we need to expand the adefaria (your dev schema) and select which version you want this new test database to start with. Select Version 1 and Finish.</p>
95
96 <p>Clearquest Designer now goes out and creates all the necessary tables and transfers all of the necessary data, hook scripts, etc. from Version 1 of the dev schema adefaria into your database. Get coffee...</p>
97
98 <p>After the database is created follow the steps at Seeding a test database to seed your test database with some test data.</p>
99                            </div>
100                            <div id="more" class="entry-more">
101                               
102                            </div>
103                         </div>
104                         <p class="entry-footer">
105                            <span class="post-footers">Posted by  on August 29, 2012  9:08 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000755.html">Permalink</a>
106                         </p>
107                      </div>
108
109                      
110                      <div class="trackbacks">
111                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
112                         <div id="trackbacks-info">
113                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/119</p>
114                         </div>
115                         <div class="trackbacks-content">
116                            
117                         </div>
118                      </div>
119                      
120
121                      
122                   </div>
123                </div>
124             </div>
125          </div>
126       </div>
127    </div>
128 </body>
129 </html>