Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000643.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: GPDB 2.0</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/000642.html" title="CC Defaults report" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000644.html" title="First productive day" />
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/000643.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/31"
25     dc:title="GPDB 2.0"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000643.html"
27     dc:subject="GPDB"
28     dc:description=" Sent email to Donna describing how to work with GPDB 2.0 Implemented Aliases Changed project search to go off of new view for project aliases Fixed bug in displaying of DesignSync information for projects..."
29     dc:creator=""
30     dc:date="2007-05-22T15:52:32-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/000642.html">&laquo; CC Defaults report</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000644.html">First productive day &raquo;</a>
59                      </p>
60
61                      <a id="a000643"></a>
62                      <div class="entry" id="entry-643">
63                         <h3 class="entry-header">GPDB 2.0</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <ul>
67   <li>Sent email to Donna describing how to work with GPDB 2.0</li>
68
69   <li>Implemented Aliases</li>
70
71   <li>Changed project search to go off of new view for project aliases</li>
72
73   <li>Fixed bug in displaying of DesignSync information for projects</li>
74 </ul>
75                            </div>
76                            <div id="more" class="entry-more">
77                               <p>This email is to describe to you how to use the new GPDB API. For the most part, for the functions you had been calling, the interface should be identical. Sometimes you'll need to change the hash that you pass in as the Perl module uses Perl hash's name/value pairs as a direct relationship to the field names and values in the database. So if you use a hash key that doesn't correspond to a database field name then it won't work.</p>
78
79 <p>Also (attached) is your syncGPDBAddDSProj.pl script ported to use GPDB 2.0.</p>
80
81 <h3>Alternate Database</h3>
82
83 <p>Note that until GPDB 2.0 is released we have GPDB 1.0 in production. The GPDB API has been augmented to allow you to specify an alternate database. The gpdb_login call supports an additional parameter to specify which database to open:</p>
84
85 <blockquote>
86   <p><i>gpdb_login (username, password, db)</i></p>
87
88   <p>The gpdb_login() method takes a username and non-encrypted password as parameters and returns a user authentication string. Additionally an optional db parameter can be passed in. Default is "Oracle" and represents the production database. Use "OracleDevelopment" to access the test database. The authentication string make look like "::browse" or "readonly::browse" if (1) the username is not found in the gpdb user table or (2) the password does not match the user's enterprise password. This could be the desired effect as often the tool may be run by individuals that only need "browse" access for reference.</p>
89 </blockquote>
90
91 <p>While gpdb_login supports this extra parameter I don't think you'll often use it. Instead you can specify which database to use in an environment variable GPDB_ACTIVE_DB:</p>
92
93 <div class=code><pre>
94 $ export GPDB_ACTIVE_DB=OracleDevelopment
95 $ ./myscript.pl
96 </pre></div>
97
98 <h3>Where to pick up the GPDB API</h3>
99
100 <p>Again, because we have GPDB 1.0 in production we cannot push out the GPDB 2.0 API (Perl Modules) to the same locations as GPDB 1.0 API. As such you will need to temporarily point to them at an alternate location. Here's a full set of Perl use statements needed:</p>
101
102 <div class=code><pre>
103 # Standard CDOE modules (Modules of the month!)
104 use lib "/apps/perl/modules-0609/lib";
105
106 # Perl/Oracle libraries
107 use lib "/apps/oracle/perl/10.2.0.1.0/lib";
108
109 #use lib "/apps/cmpackages/perl/lib/site_perl/5.8.0";
110 use lib "/web/gpdb/cgi-bin";
111
112 use GPDB::gpdb;
113 </pre></div>
114
115 <p>When the GPDB API 2.0 gets released we can use the /apps/cmpackages/perl/lib/site_perl/5.8.0 and remove the /web/gpdb/cgi-bin use statement.</p>
116
117 <h3>GPDB now authenticates to the enterprise LDAP</h3>
118
119 <p>GPDB logins now use your AXID and your enterprise password! If this is incorrect then you will only be granted read access. If you specify a proper AXID and enterprise password you will authenticate. GPDB then checks with its users table to see if you have been granted administrative, thus read/write, access. There is also a GPDB administrative user that can be used for long running, cron like scripts.</p>
120
121 <h3>Did somebody ask for aliases?</h3>
122
123 <p>I've implemented a rudimentary form of aliases since you were so interested in them. Aliases are global (and alias of "foo" related to a project "bar" at all sites). You can add or delete aliases on the Update Project screen (e.g. <a href="http://gpdb.design.ti.com/cgi-bin/gpdb-devel.pl?db=OracleDevelopment&amp;operation=showProject&amp;projectName=faraday&amp;siteName=Dallas">faraday
124 Project</a>). Additionally the Project: Search screen will search for projects based on name and alias.</p>
125
126 <h3>Oracle/Linux issues</h3>
127
128 <p>We are still kinda of working out how to access Oracle on Linux through Perl.</p>
129
130 <h3>syncGPDBAddDSProj.pl script</h3>
131
132 <p>I've ported this script (attached) to GPDB 2.0. Note the comments in the code about changed required for GPDB 2.0. Here is a command line execution:</p>
133
134 <div class=code><pre>
135 $ ./syncGPDBAddDSProj.pl -f Dallas -p 10000 -a &lt;userid&gt; -w &lt;password&gt; \
136 &gt; -n andrew_defaria -g ASIC -c /tmp -s drteeth.dal.design.ti.com
137 </pre></div>
138
139 <p>And you can see the project added <a href="http://gpdb.design.ti.com/cgi-bin/gpdb-devel.pl?db=OracleDevelopment&amp;operation=showProject&amp;projectName=andrew_defaria&amp;siteName=Dallas">here</a>.</p>
140                            </div>
141                         </div>
142                         <p class="entry-footer">
143                            <span class="post-footers">Posted by  on May 22, 2007  3:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000643.html">Permalink</a>
144                         </p>
145                      </div>
146
147                      
148                      <div class="trackbacks">
149                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
150                         <div id="trackbacks-info">
151                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/31</p>
152                         </div>
153                         <div class="trackbacks-content">
154                            
155                         </div>
156                      </div>
157                      
158
159                      
160                   </div>
161                </div>
162             </div>
163          </div>
164       </div>
165    </div>
166 </body>
167 </html>