⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch1_admin.htm

📁 Debian中文参考手册,系统介绍了Debian系统
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</td>
<td headers="r38c1 r1c2" align="left" colspan="1" rowspan="1">Example
</td>
<td headers="r38c1 r1c3" align="left" colspan="1" rowspan="1"><code>&#047;usr&#047;dt&#047;lib:&#036;ORACLE&#095;HOME&#047;lib</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r39c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref108" name="sthref108"></a>TEMP and TMPDIR
</td>
<td headers="r39c1 r1c2" align="left" colspan="1" rowspan="1">Function
</td>
<td headers="r39c1 r1c3" align="left" colspan="1" rowspan="1">Specifies the default directory for temporary files; if set, tools that create temporary files create them in this directory.<a id="sthref109" name="sthref109"></a>
</td>
</tr>
<tr align="left" valign="top">
<td id="r40c1" headers="r1c1" align="left" colspan="1" rowspan="1">
<br />
</td>
<td headers="r40c1 r1c2" align="left" colspan="1" rowspan="1">Syntax
</td>
<td headers="r40c1 r1c3" align="left" colspan="1" rowspan="1"><em><code>directory&#095;path</code></em>
</td>
</tr>
<tr align="left" valign="top">
<td id="r41c1" headers="r1c1" align="left" colspan="1" rowspan="1">
<br />
</td>
<td headers="r41c1 r1c2" align="left" colspan="1" rowspan="1">Example
</td>
<td headers="r41c1 r1c3" align="left" colspan="1" rowspan="1"><code>&#047;u02&#047;oracle&#047;tmp</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r42c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref110" name="sthref110"></a>XENVIRONMENT
</td>
<td headers="r42c1 r1c2" align="left" colspan="1" rowspan="1">Function
</td>
<td headers="r42c1 r1c3" align="left" colspan="1" rowspan="1">Specifies a file containing X-Windows system resource definitions. See your X-Windows documentation for more information. <a id="sthref111" name="sthref111"></a>
</td>
</tr></tbody>
</table>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref112" name="sthref112"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Setting a Common Environment<a id="sthref113" name="sthref113"></a>
</font>
</h3>
<p>This section describes how to use the <code>oraenv</code> command to set a common UNIX environment. You can use the <code>coraenv</code> command for the C shell in the same way.
</p>
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref114" name="sthref114"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
oraenv Script File
</font>
</h4>
<p>The <code>oraenv</code> script is created during installation. This script sets environment variables based on the contents of the <code>oratab</code> file and provides:<a id="sthref115" name="sthref115"></a>
</p>
<ul>
<li type="disc">
<p>A central means of updating all user accounts with database changes
</p>
</li>
<li type="disc">
<p>A mechanism for switching between Oracle9<em>i</em> databases specified in the <code>oratab</code> file
</p>
</li>
</ul>
<p>You may find yourself frequently adding and removing databases from your development system or your users may be switching between several different Oracle databases installed on the same system. You can use the <code>oraenv</code> script to ensure that user accounts are updated and to switch between databases.
</p>
<p>The <code>oraenv</code> script is usually called from the user&#039;s <code>.profile</code> file . It is used to set the ORACLE&#095;SID, ORACLE&#095;HOME, and PATH environment variables to include the <code>&#036;ORACLE&#095;HOME&#047;bin</code> directory. When switching between databases, users can run the <code>oraenv</code> script to set these environment variables.
</p>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>See Also:</strong>
</font>
</p><em>Oracle9i Installation Guide Release 2 (9.2.0.1.0)</em> <em>for UNIX Systems</em> for more information on setting a common environment.
</td>
</tr></tbody>
</table><br />
</div>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref116" name="sthref116"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
<a id="sthref117" name="sthref117"></a><a id="sthref118" name="sthref118"></a><a id="sthref119" name="sthref119"></a><a id="sthref120" name="sthref120"></a>Local bin Directory 
</font>
</h4>
<p>The directory that contains the <code>oraenv</code> and <code>dbhome</code> scripts is called the local <code>bin</code> directory. All database users should have read access to this directory. Include the path of the local bin directory in the users&#039; PATH environment variables. If you run the <code>root.sh</code> script after installation, the script prompts you for the path of the local <code>bin</code> directory and automatically copies the <code>oraenv</code> and <code>dbhome</code> scripts to the directory. The default local <code>bin</code> directory is <code>&#047;usr&#047;local&#047;bin</code>. If you do not run the <code>root.sh</code> script, you can manually copy the <code>oraenv</code> and <code>dbhome</code> script from the <code>&#036;ORACLE&#095;HOME&#047;bin</code> directory to your local <code>bin</code> directory.
</p>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref121" name="sthref121"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Switching Between Databases
</font>
</h4>
<p>To switch from one database or database instance to another, call the<strong> </strong><code>oraenv</code> script. Reply to the prompt with the value of the ORACLE&#095;SID environment variable of the database to which you are switching. If the local <code>bin</code> directory is not included in the PATH environment, provide the full path of the <code>oraenv</code> command file. For example:<a id="sthref122" name="sthref122"></a><a id="sthref123" name="sthref123"></a>
</p>
<pre>&#036; . &#047;usr&#047;local&#047;bin&#047;oraenv
ORACLE&#095;SID&#061; &#091;default&#093;? <em>sid</em>

</pre>
</div class="sect3">
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref124" name="sthref124"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Setting and Exporting the Value of a Variable in a Current Session
</font>
</h3>
<p>Use the <code>env</code> command to show the environment variable values that have been exported to the environment. The Bourne shell and Korn shell can set values without exporting them.
</p>
<p>For the Bourne or Korn shell, enter:
</p>
<pre>&#036; ORACLE&#095;SID&#061;<em>test</em>
&#036; export ORACLE&#095;SID<br />
</pre>
<p>For the C shell, enter:
</p>
<pre>&#037; setenv ORACLE&#095;SID <em>test</em>
</pre>
<p>In the preceding examples, <em><code>test</code></em> is the value of the ORACLE&#095;SID environment variable.
</p>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref125" name="sthref125"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Setting the System Time<a id="sthref126" name="sthref126"></a>
</font>
</h3>
<p>The TZ environment variable sets the time zone. It enables you to adjust the clock for daylight saving time changes or different time zones. The adjusted time is used to time-stamp files, produce the output of the <code>date</code> command, and obtain the current SYSDATE.<a id="sthref127" name="sthref127"></a>
</p>
<p>Oracle Corporation recommends that you do not change your personal TZ value. Using different values of TZ such as GMT&#043;24 might change the date a transaction is recorded. This changed date affects Oracle applications that use SYSDATE, such as Oracle Financials. To avoid this problem, use sequence numbers to order a table instead of date columns.
</p>
</div class="sect2">
</div class="sect1"><a id="CHDBGDDE" name="CHDBGDDE"></a>
<div class="sect1"><a id="sthref128" name="sthref128"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">LD&#095;PRELOAD Environment Variable for Loading Shared Libraries (HP Only)
</font>
</h2>
<p>If you are developing Oracle9<em>i</em> applications on HP that use shared libraries and function calls, users of your application must set the LD&#095;PRELOAD environment variable. 
</p>
<p>Because they require less memory, many programs use shared libraries. In most cases, the <code>dld.sl</code> 64-bit HP-UX dynamic loader is invoked automatically when applications using shared libraries start. At run time, the dynamic loader implicitly attaches all shared libraries linked with the program to the process. This includes the HP-UX thread-local storage (TLS) libraries. Programs can also use the <code>shl&#095;load()</code> HP-UX function call to:
</p>
<ul>
<li type="disc">
<p>Explicitly access the 64-bit HP-UX dynamic loader 
</p>
</li>
<li type="disc">
<p>Attach a shared library to a process at run time
</p>
</li>
<li type="disc">
<p>Calculate the addresses of symbols defined within shared libraries
</p>
</li>
<li type="disc">
<p>Detach the library when finished
</p>
</li>
</ul>
<p>In laboratory tests, errors occur when an application uses the <code>shl&#095;load()</code> function call to attach a shared library that directly or indirectly contains HP-UX TLS libraries. These errors include Oracle shared libraries which are currently linked with the <code>libpthread.sl</code> and <code>libcl.sl</code> HP-UX TLS libraries, for example <code>libclntsh.sl</code>. 
</p>
<p>In the following example, the <code>prog.c</code> program calls the <code>shl&#095;load()</code> function to load the <code>libclntsh.sl</code> library: 
</p>
<pre>shl&#095;load(<em>"Oracle&#095;home&#095;directory</em>&#047;rdbms&#047;lib&#047;libclntsh.sl", BIND&#095;IMMMEDIATE &#124; BIND&#095;VERBOSE &#124; DYNAMIC&#095;PATH &#124; 0L); 

</pre>
<p>When the program is executed, it generates the following errors: 
</p>
<pre>&#047;usr&#047;lib&#047;pa20&#095;64&#047;dld.sl: Cannot dlopen load module &#039;&#047;usr&#047;lib&#047;pa20&#095;64&#047;libpthread.1&#039; because it contains thread specific data. 

&#047;usr&#047;lib&#047;pa20&#095;64&#047;dld.sl: Cannot dlopen load module &#039;&#047;usr&#047;lib&#047;pa20&#095;64&#047;libcl.2&#039; because it contains thread specific data. 

</pre>
<p>The new LD&#095;PRELOAD environment variable resolves these errors. 
</p>
<p>To prevent errors occurring when an application uses the <code>shl&#095;load()</code> function call to attach a shared library that directly or indirectly contains HP-UX TLS libraries, perform the following steps: 
</p>
<ol type="1" start="1">
<li>
<p>Set the value of the LD&#095;PRELOAD environment variable to include a colon-separated or whitespace-separated list of the TLS libraries that your program uses, for example:
</p>
<pre>&#036; export LD&#095;PRELOAD&#061;&#047;usr&#047;lib&#047;pa20&#095;64&#047;libpthread.1:&#047;usr&#047;lib&#047;pa20&#095;64&#047;libcl.2

</pre>
<p>The dynamic loader treats the libraries specified by the LD&#095;PRELOAD variable as the first libraries in the link line and pre-loads these libraries implicitly at application startup. 
</p>
</li>
<li>
<p>Enter the following command to execute your program, where <em><code>prog</code></em> is the name of your program:
</p>
<pre>&#036; <em>prog</em> 

</pre>
<p>The errors shown on the previous page should not appear.
</p>
</li>
<li>
<p>Unset the LD&#095;PRELOAD variable to prevent memory overheads:
</p>
<pre>&#036; unset LD&#095;PRELOAD

</pre>
</li>
</ol>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>See Also:</strong>
</font>
</p>Your HP-UX system documentation for more information on the LD&#095;PRELOAD environment variable.
</td>
</tr></tbody>
</table><br />
</div>
</div class="sect1"><a id="i80314" name="i80314"></a>
<div class="sect1">
<!--
infolevel=all
infotype=general
--><a id="sthref129" name="sthref129"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Relinking Executables<a id="sthref130" name="sthref130"></a>
</font>
</h2>
<p>You can manually relink your product executables using a relink shell script located in the <code>&#036;ORACLE&#095;HOME&#047;bin</code> directory. Relinking is necessary after applying any operating system patches or after an operating system upgrade.
</p>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -