Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2007_05_20.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: May 20, 2007 - May 26, 2007 Archives</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/week_2007_05_06.html" title="May  6, 2007 - May 12, 2007" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2007_06_10.html" title="June 10, 2007 - June 16, 2007" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2007_05_06.html">&laquo; May  6, 2007 - May 12, 2007</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2007_06_10.html">June 10, 2007 - June 16, 2007 &raquo;</a>
38                      </p>
39                      
40                      
41                      <!--
42 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
43          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
44          xmlns:dc="http://purl.org/dc/elements/1.1/">
45 <rdf:Description
46     rdf:about="http://defaria.com/blogs/Status/archives/week_2007_05_20.html#entry-000643"
47     trackback:ping="http://defaria.com/mt/mt-tb.cgi/31"
48     dc:title="GPDB 2.0"
49     dc:identifier="http://defaria.com/blogs/Status/archives/week_2007_05_20.html#entry-000643"
50     dc:subject="GPDB"
51     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..."
52     dc:creator=""
53     dc:date="2007-05-22T15:52:32-06:00" />
54 </rdf:RDF>
55 -->
56
57
58                      <h2 class="date-header">May 22, 2007</h2>
59                      <a id="a000643"></a>
60                      <div class="entry" id="entry-643">
61                         <h3 class="entry-header">GPDB 2.0</h3>
62                         <div class="entry-content">
63                            <div class="entry-body">
64                               <ul>
65   <li>Sent email to Donna describing how to work with GPDB 2.0</li>
66
67   <li>Implemented Aliases</li>
68
69   <li>Changed project search to go off of new view for project aliases</li>
70
71   <li>Fixed bug in displaying of DesignSync information for projects</li>
72 </ul>
73                               
74                               <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>
75
76 <p>Also (attached) is your syncGPDBAddDSProj.pl script ported to use GPDB 2.0.</p>
77
78 <h3>Alternate Database</h3>
79
80 <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>
81
82 <blockquote>
83   <p><i>gpdb_login (username, password, db)</i></p>
84
85   <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>
86 </blockquote>
87
88 <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>
89
90 <div class=code><pre>
91 $ export GPDB_ACTIVE_DB=OracleDevelopment
92 $ ./myscript.pl
93 </pre></div>
94
95 <h3>Where to pick up the GPDB API</h3>
96
97 <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>
98
99 <div class=code><pre>
100 # Standard CDOE modules (Modules of the month!)
101 use lib "/apps/perl/modules-0609/lib";
102
103 # Perl/Oracle libraries
104 use lib "/apps/oracle/perl/10.2.0.1.0/lib";
105
106 #use lib "/apps/cmpackages/perl/lib/site_perl/5.8.0";
107 use lib "/web/gpdb/cgi-bin";
108
109 use GPDB::gpdb;
110 </pre></div>
111
112 <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>
113
114 <h3>GPDB now authenticates to the enterprise LDAP</h3>
115
116 <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>
117
118 <h3>Did somebody ask for aliases?</h3>
119
120 <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
121 Project</a>). Additionally the Project: Search screen will search for projects based on name and alias.</p>
122
123 <h3>Oracle/Linux issues</h3>
124
125 <p>We are still kinda of working out how to access Oracle on Linux through Perl.</p>
126
127 <h3>syncGPDBAddDSProj.pl script</h3>
128
129 <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>
130
131 <div class=code><pre>
132 $ ./syncGPDBAddDSProj.pl -f Dallas -p 10000 -a &lt;userid&gt; -w &lt;password&gt; \
133 &gt; -n andrew_defaria -g ASIC -c /tmp -s drteeth.dal.design.ti.com
134 </pre></div>
135
136 <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>
137                               
138                               <p class="entry-footer">
139                                  <span class="post-footers">Posted by  at  3:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000643.html">Permalink</a>
140                                  
141                                  | <a href="http://defaria.com/blogs/Status/archives/000643.html#trackback">TrackBacks (0)</a>
142                               </p>
143                            </div>
144                         </div>
145                      </div>
146                      
147                   </div>
148                </div>
149             </div>
150          </div>
151       </div>
152    </div>
153 </body>
154 </html>