<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; Oracle</title>
	<atom:link href="http://www.dbainfo.net/category/oracle/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>oracle11g报TNS-12537和ORA-609问题的解决</title>
		<link>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm</link>
		<comments>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm#comments</comments>
		<pubDate>Thu, 01 Dec 2011 06:22:01 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1294</guid>
		<description><![CDATA[在CentOS5.5 x86_64上安装了Oracle11g，版本号为：11.2.0.1.0 但是，在其它客户端上使用sqlplus连接的时候需要等待很长时间才能连接上，有时候报超时的错误。 错误信息为： *********************************************************************** Fatal NI connect error 12537, connecting to: (LOCAL=NO) VERSION INFORMATION: TNS for Linux: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production Time: 30-NOV-2011 14:28:10 Tracing not turned on. Tns error struct: ns main [...]]]></description>
			<content:encoded><![CDATA[<p>在CentOS5.5 x86_64上安装了Oracle11g，版本号为：11.2.0.1.0</p>
<p>但是，在其它客户端上使用sqlplus连接的时候需要等待很长时间才能连接上，有时候报超时的错误。</p>
<p>错误信息为：</p>
<pre>***********************************************************************

Fatal NI connect error 12537, connecting to:
 (LOCAL=NO)

  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
  Time: 30-NOV-2011 14:28:10
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12537

TNS-12537: TNS:connection closed
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
opiodr aborting process unknown ospid (29666) as a result of ORA-609
Wed Nov 30 14:36:24 2011
</pre>
<p><strong>Oracle11g服务器数据库名为：lzf，全局名称为：lzf.dbainfo.net</strong><span id="more-1294"></span></p>
<p><strong>监听listener.ora配置文件内容为：</strong><br />
	[oracle@centos5 lzf]$ cat /u01/oracle/product/11.2/network/admin/listener.ora <br />
	# listener.ora Network Configuration File: /u01/oracle/product/11.2/network/admin/listener.ora<br />
	# Generated by Oracle configuration tools.</p>
<p>	LISTENER =<br />
	&nbsp; (DESCRIPTION_LIST =<br />
	&nbsp;&nbsp;&nbsp; (DESCRIPTION =<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ADDRESS = (PROTOCOL = TCP)(HOST = <span style="font-size:14px;">centos5.5</span>)(PORT = 1521))<br />
	&nbsp;&nbsp;&nbsp; )<br />
	&nbsp; )</p>
<p>	ADR_BASE_LISTENER = /u01/oracle</p>
<p><strong>服务名称配置文件tnsnames.ora 内容为：</strong></p>
<p>[oracle@centos5 lzf]$ cat /u01/oracle/product/11.2/network/admin/tnsnames.ora <br />
	# tnsnames.ora Network Configuration File: /u01/oracle/product/11.2/network/admin/tnsnames.ora<br />
	# Generated by Oracle configuration tools.</p>
<p>	LZF =<br />
	&nbsp; (DESCRIPTION =<br />
	&nbsp;&nbsp;&nbsp; (ADDRESS = (PROTOCOL = TCP)(HOST = <span style="font-size:14px;">centos5.5</span>)(PORT = 1521))<br />
	&nbsp;&nbsp;&nbsp; (CONNECT_DATA =<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SERVER = DEDICATED)<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SERVICE_NAME = lzf.dbainfo.net)<br />
	&nbsp;&nbsp;&nbsp; )<br />
	&nbsp; )</p>
<p><span style="font-size:14px;"><strong>解决方法：<br />
	</strong></span></p>
<p>将/etc/resolv.conf配置文件中的nameserver注释。</p>
<pre>[root@centos5 ~]# cat /etc/resolv.conf
search domain.org
<span style="font-size:14px;">#nameserver 192.168.1.1
#nameserver 8.8.8.8</span>
</pre>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm">https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm">oracle11g报TNS-12537和ORA-609问题的解决</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/linux-date-count-days-of-month.htm" title="linux使用date计算某个月份的天数">linux使用date计算某个月份的天数</a> (0)</li><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2011-04-28 -- <a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm" title="oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决">oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-12-15 -- <a href="https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm" title="Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm">Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm</a> (0)</li><li>2010-11-25 -- <a href="https://www.dbainfo.net/cross-platform-migrate-device-file-from-linux-to-windows.htm" title="平台数据库迁移linux >windows">平台数据库迁移linux >windows</a> (0)</li><li>2010-10-22 -- <a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm" title="查看Oracle中表所有字段的字节总长度">查看Oracle中表所有字段的字节总长度</a> (0)</li><li>2010-09-28 -- <a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a> (0)</li><li>2010-09-17 -- <a href="https://www.dbainfo.net/java-connect-url-for-oracle-db2-sql-sybase-informix-mysql-pgsql.htm" title="java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL">java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL</a> (0)</li><li>2010-09-09 -- <a href="https://www.dbainfo.net/solaris-remote-ssh-permitrootlogin.htm" title="如何用ROOT用户通过SSH连接到SOLARIS">如何用ROOT用户通过SSH连接到SOLARIS</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</title>
		<link>https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm</link>
		<comments>https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm#comments</comments>
		<pubDate>Thu, 28 Apr 2011 02:23:56 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=883</guid>
		<description><![CDATA[在CentOS5.6上安装oracle10gR2，安装程序进行到86%的时候报下面的错误： INFO: gcc: INFO: /usr/lib/libstdc++.so.5: No such file or directory INFO: INFO: /home/oracle/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2 INFO: make: *** [liborasdkbase] Error 1 INFO: End output from spawned process. INFO: ---------------------------------- INFO: Exception thrown from action: make Exception Name: MakefileException Exception String: Error in invoking target &#39;all_no_orcl ihsodbc&#39; of makefile &#39;/home/oracle/db_1/rdbms/lib/ins_rdbms.mk&#39;. See &#39;/home/oracle/oraInventory/logs/installActions2011-04-28_09-49-27AM.log&#39; for details. [...]]]></description>
			<content:encoded><![CDATA[<p>在CentOS5.6上安装oracle10gR2，安装程序进行到86%的时候报下面的错误：</p>
<blockquote>
<p>INFO: gcc: <br />
		INFO: <span style="color:#f00;"><strong>/usr/lib/libstdc++.so.5: No such file or directory</strong></span><br />
		INFO: </p>
<p>		INFO: /home/oracle/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2</p>
<p>		INFO: make: *** [liborasdkbase] Error 1</p>
<p>		INFO: End output from spawned process.<br />
		INFO: ----------------------------------<br />
		INFO: Exception thrown from action: make<br />
		Exception Name: MakefileException<br />
		Exception String: <span style="color:#f00;"><strong>Error in invoking target &#39;all_no_orcl ihsodbc&#39; of makefile &#39;/home/oracle/db_1/rdbms/lib/ins_rdbms.mk&#39;.</strong></span> See &#39;/home/oracle/oraInventory/logs/installActions2011-04-28_09-49-27AM.log&#39; for details.<br />
		Exception Severity: 1</p>
</blockquote>
<p>
	这个错误是和编译有关的，检查日志发现果然缺少了一个C的类库：<br />
	INFO: /usr/lib/libstdc++.so.5: No such file or directory<span id="more-883"></span></p>
<p><strong>问题分析：</strong></p>
<blockquote>
<p>[root@CentOS5 ~]# ls /usr/lib/libstdc*<br />
		<strong>/usr/lib/libstdc++.so.6&nbsp; /usr/lib/libstdc++.so.6.0.8</strong></p>
<p>[root@CentOS5 ~]# rpm -qf /usr/lib/libstdc++.so.6<br />
		<strong>libstdc++-4.1.2-50.el5</strong></p>
</blockquote>
<p>因为此OS为最新版的CentOS5.6，默认安装了高版本的libstdc++。oracle10g的安装程序需要早期的版本libstdc++.so.5。</p>
<p>
	<strong>解决办法：</strong><br />
	1、在CentOS5.6的DVD光盘中找到compat-libstdc++-33-3.2.3-61.i386.rpm包，安装补丁包：</p>
<blockquote>
<p>[root@CentOS5 ~]# rpm -Uvh /mnt/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm<br />
		warning: /mnt/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897<br />
		Preparing...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################################### [100%]<br />
		&nbsp;&nbsp; 1:compat-libstdc++-33&nbsp;&nbsp;&nbsp; ########################################### [100%]</p>
</blockquote>
<p>
	2、回到安装界面，点击重试，继续安装。。。</p>
<p>&nbsp;</p>
<p><strong>验证类库所在的包：<br />
	</strong></p>
<p>[root@CentOS5 ~]# ls -l /usr/lib/libstdc*<br />
	lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp; 18 Apr 28 10:03 /usr/lib/libstdc++.so.5 -&gt; libstdc++.so.5.0.7<br />
	-rwxr-xr-x 1 root root 733168 Jan&nbsp; 9&nbsp; 2007 /usr/lib/libstdc++.so.5.0.7<br />
	lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp; 18 Apr 21 18:21 /usr/lib/libstdc++.so.6 -&gt; libstdc++.so.6.0.8<br />
	-rwxr-xr-x 1 root root 936908 Mar&nbsp; 6 23:11 /usr/lib/libstdc++.so.6.0.8<br />
	[root@CentOS5 ~]# <strong>rpm -qf /usr/lib/libstdc++.so.5.0.7 </strong><br />
	<strong>compat-libstdc++-33-3.2.3-61</strong></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm">https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm">oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm" title="oracle11g报TNS-12537和ORA-609问题的解决">oracle11g报TNS-12537和ORA-609问题的解决</a> (0)</li><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-10-22 -- <a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm" title="查看Oracle中表所有字段的字节总长度">查看Oracle中表所有字段的字节总长度</a> (0)</li><li>2010-09-28 -- <a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a> (0)</li><li>2010-09-17 -- <a href="https://www.dbainfo.net/java-connect-url-for-oracle-db2-sql-sybase-informix-mysql-pgsql.htm" title="java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL">java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL</a> (0)</li><li>2010-08-29 -- <a href="https://www.dbainfo.net/access-sqlserver-from-oracle-by-transgate.htm" title="从oracle内访问sqlserver2005的数据时一个错误">从oracle内访问sqlserver2005的数据时一个错误</a> (0)</li><li>2010-08-10 -- <a href="https://www.dbainfo.net/oracle10g-create-database-manually.htm" title="手动创建oracle 10g数据库的命令语法">手动创建oracle 10g数据库的命令语法</a> (0)</li><li>2010-08-10 -- <a href="https://www.dbainfo.net/oracle10g-create-database-manully-ora-02778.htm" title="手动创建oracle数据库时报错：ORA-02778">手动创建oracle数据库时报错：ORA-02778</a> (0)</li><li>2010-07-28 -- <a href="https://www.dbainfo.net/orace-base-command-learning.htm" title="Oracle基本操作命令学习">Oracle基本操作命令学习</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>从sybase向oracle导入时间类型的数据</title>
		<link>https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm</link>
		<comments>https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm#comments</comments>
		<pubDate>Thu, 23 Dec 2010 02:20:55 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[ASE]]></category>
		<category><![CDATA[BCP]]></category>
		<category><![CDATA[date]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/%e4%bb%8esybase%e5%90%91oracle%e5%af%bc%e5%85%a5%e6%97%b6%e9%97%b4%e7%b1%bb%e5%9e%8b%e7%9a%84%e6%95%b0%e6%8d%ae.htm</guid>
		<description><![CDATA[例：有表 --sybase create table t_test( mydate datetime) go --oracle create t_test(mydate date) 方法1：在sybase侧建立视图，然后从导出视图(此方法舍弃了毫秒部分) create view v_test as select convert(varchar(10),pst_exec_stime,111)+&#39; &#39;+convert(varchar(9),pst_exec_stime,8) mydate from t_test go format文件如下(c:\test.fmt) 10.0 1 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SYBCHAR&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 20&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#34;\t&#34;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; my_date 命令 C:\&#62;bcp testdb..v_test out c:\test.dat -f c:\test.fmt &#8211;Uusername &#8211;Ppassword &#8211;Ssybser Oracle导入control文件如下（c:\test.ctl） Load data Infile &#34;c:\test.dat&#34; Badfile &#34;c:\test.bad&#34; Append into table t_test [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 12px;"><span style="font-family: 宋体;">例：有表 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">--sybase</span><span style="font-family: 宋体;"> </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">create table t_test(</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">mydate datetime</span></span><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">go</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">--oracle</span><span style="font-family: 宋体;"> </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">create t_test(</span></span><span style="font-family: Century;">mydate date</span><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></p>
</blockquote>
<p><span style="font-size: 14px;"><strong><span style="font-family: 宋体;">方法</span><span style="font-family: Century;">1</span><span style="font-family: 宋体;">：在</span><span style="font-family: Century;">sybase</span><span style="font-family: 宋体;">侧建立视图，然后从导出视图</span><span style="font-family: Century;">(</span><span style="font-family: 宋体;">此方法舍弃了毫秒部分</span><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></strong></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">create view v_test as </span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">select </span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">convert(varchar(10),pst_exec_stime,111)+&#39; &#39;+convert(varchar(9),pst_exec_stime,8) mydate</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">from t_test</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">go<span id="more-627"></span></span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">format</span><span style="font-family: 宋体;">文件如下</span><span style="font-family: Century;">(c:\test.fmt)</span><span style="font-family: 宋体;"> </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">10.0</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">1</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYBCHAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\t&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my_date</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">命令 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">C:\&gt;<strong>bcp testdb..v_test out c:\test.dat -f c:\test.fmt &ndash;Uusername &ndash;Ppassword &ndash;Ssybser </strong></span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Oracle</span><span style="font-family: 宋体;">导入</span><span style="font-family: Century;">control</span><span style="font-family: 宋体;">文件如下（</span><span style="font-family: Century;">c:\test.ctl</span><span style="font-family: 宋体;">） </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Load data</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Infile &quot;c:\test.dat&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Badfile &quot;c:\test.bad&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Append into table t_test</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Fields terminated by</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">\t</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">(</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Mydate &quot;yyyy/mm/dd hh24:mi:ss&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">命令 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">C:\&gt;<strong>sqlldr <a href="mailto:username/password@sid"><span style="color: blue; text-decoration: underline;">username/password@sid</span></a> control=&quot;c:\test.ctl&quot; log=&quot;test.log&quot;</strong></span><span style="font-family: 宋体;"> </span></span></p>
<p><strong><span style="font-size: 14px;"><span style="font-family: 宋体;">方法</span><span style="font-family: Century;">2</span><span style="font-family: 宋体;">：和方法</span><span style="font-family: Century;">1</span><span style="font-family: 宋体;">类似不过不用建视图（此方法舍弃了毫秒部分） </span></span></strong></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">format</span><span style="font-family: 宋体;">文件如下</span><span style="font-family: Century;">(c:\test.fmt)</span><span style="font-family: 宋体;"> </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">10.0</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">1</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYBCHAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\t&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my_date</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">命令 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">C:\&gt;<strong>bcp testdb..t_test out c:\test.dat -f c:\test.fmt &ndash;Uusername &ndash;Ppassword &ndash;Ssybser </strong></span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Oracle</span><span style="font-family: 宋体;">导入</span><span style="font-family: Century;">control</span><span style="font-family: 宋体;">文件如下（</span><span style="font-family: Century;">c:\test.ctl</span><span style="font-family: 宋体;">） </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Load data</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Infile &quot;c:\test.dat&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Badfile &quot;c:\test.bad&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Append into table t_test</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Fields terminated by</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">\t</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">(</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Mydate &quot;DECODE(:mydate,NULL,TO_DATE(&#39;&#39;,&#39;MM-DD-YYYY&#39;),TO_DATE(SUBSTRB(:mydate,1,instrb(:mydate,&#39;:&#39;,-1)-1)||&#39; &#39;|| SUBSTRB(:mydate,-2),,&#39;Mon dd yyyy hh:mi:ss PM&#39;))&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">命令 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">C:\&gt;<strong>sqlldr <a href="mailto:username/password@sid"><span style="color: blue; text-decoration: underline;">username/password@sid</span></a> control=&quot;c:\test.ctl&quot; log=&quot;test.log&quot;</strong></span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">如果</span><span style="font-family: Century;">sybase</span><span style="font-family: 宋体;">和</span><span style="font-family: Century;">oracle</span><span style="font-family: 宋体;">的语言不一致，即导入的</span><span style="font-family: Century;">am/pm</span><span style="font-family: 宋体;">保留字为上午</span><span style="font-family: Century;">/</span><span style="font-family: 宋体;">下午什么的可以在</span><span style="font-family: Century;">sqlldr</span><span style="font-family: 宋体;">之前执行如下命令，转换成和</span><span style="font-family: Century;">sybase</span><span style="font-family: 宋体;">一致的语言 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">C:\&gt;set NLS_LANG=American(</span><span style="font-family: 宋体;">美国语</span><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></span></p>
<p><strong><span style="font-size: 14px;"><span style="font-family: 宋体;">方法</span><span style="font-family: Century;">3</span><span style="font-family: 宋体;">：</span><span style="font-family: Century;">9i</span><span style="font-family: 宋体;">以上版本适用，在方法</span><span style="font-family: Century;">2</span><span style="font-family: 宋体;">的基础上进行改动即可（此方法保留毫秒部分） </span></span></strong></p>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">将方法</span><span style="font-family: Century;">2</span><span style="font-family: 宋体;">的</span><span style="font-family: Century;">Oracle</span><span style="font-family: 宋体;">导入</span><span style="font-family: Century;">control</span><span style="font-family: 宋体;">文件修改如下（</span><span style="font-family: Century;">c:\test.ctl</span><span style="font-family: 宋体;">） </span></span></p>
<blockquote>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Load data</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Infile &quot;c:\test.dat&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Badfile &quot;c:\test.bad&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Append into table t_test</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Fields terminated by</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">\t</span><span style="font-family: 宋体;">&#39;</span><span style="font-family: Century;">(</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">Mydate timestamp &quot;MON DD YYYY HH:MI:SS:FF3AM&quot;</span><span style="font-family: 宋体;"> </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: Century;">)</span><span style="font-family: 宋体;"> </span></span></p>
</blockquote>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">其他同方法</span><span style="font-family: Century;">2 </span></span></p>
<p><span style="font-size: 12px;"><span style="font-family: 宋体;">转自：</span><span style="font-family: Century;">http://hi.baidu.com/teemzhang/blog/item/bc709a8625b9503a66096e0f.html</span></span></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm">https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm">从sybase向oracle导入时间类型的数据</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2010-11-09 -- <a href="https://www.dbainfo.net/sybase-ase-current-date-last_day.htm" title="Sybase ASE v15.x中查询本月最后一天的日期的3种实现方法">Sybase ASE v15.x中查询本月最后一天的日期的3种实现方法</a> (0)</li><li>2019-04-12 -- <a href="https://www.dbainfo.net/sybase-ase-asa-recovery-service.htm" title="Sybase ASE及SQL Anywhere数据库修复专家">Sybase ASE及SQL Anywhere数据库修复专家</a> (0)</li><li>2015-01-16 -- <a href="https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm" title="master数据库配置区域(configuration area)损坏的一种修复方法">master数据库配置区域(configuration area)损坏的一种修复方法</a> (1)</li><li>2014-10-10 -- <a href="https://www.dbainfo.net/ase-object-name-length-limit.htm" title="ASE对象名称长度限制">ASE对象名称长度限制</a> (0)</li><li>2014-06-09 -- <a href="https://www.dbainfo.net/count_all_tables_rowcount.htm" title="统计用户数据库内所有表的行数">统计用户数据库内所有表的行数</a> (0)</li><li>2013-11-19 -- <a href="https://www.dbainfo.net/showplan_html_format.htm" title="以HTML格式显示ASE查询计划">以HTML格式显示ASE查询计划</a> (0)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation5.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 5、安装后的配置工作">Sybase ASE 15.0.3 for windows平台安装文档 – 5、安装后的配置工作</a> (1)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation4.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 4、安装Sybase数据库服务">Sybase ASE 15.0.3 for windows平台安装文档 – 4、安装Sybase数据库服务</a> (0)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation3.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 3、升级到 Sybase 15.0.3 ESD #3">Sybase ASE 15.0.3 for windows平台安装文档 – 3、升级到 Sybase 15.0.3 ESD #3</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm</title>
		<link>https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm</link>
		<comments>https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm#comments</comments>
		<pubDate>Wed, 15 Dec 2010 03:18:56 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[libXp]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=601</guid>
		<description><![CDATA[在运行./runInstaller时出现的错误 错误一： /tmp/OraInstall2007-12-30_02-16-11PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open&#160; shared object file: No such file or directory occurred. 原因是：缺少支持打印的图形化动态链接库libXp.so.6 这个错误是由于缺少系统安装包，在RHEL5以前的版本，可以安装xorg-x11-deprecated-libs包即可，这个安装包可以在系统光盘第三张盘中找到（对于redhat as4.2以前，redhat as4.4是在第四张安装光盘） 我下载的文件如下： xorg-x11-deprecated-libs-6.8.2-31.i386.rpm &#160; 我用的是redhat 5，在5中 被libXp-1.0.0-8.i386.rpm替代了，所以从安装盘中找到这个文件， rpm&#160; -Uvh&#160;&#160; libXp-1.0.0-8.i386.rpm 再./runInstaller就没有问题，可以启动图形界面了。 转自：http://shuhui018125.blog.163.com/blog/static/7711050201062203346193/ 本文链接地址：https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm； 本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载； 转载务必注明原始出处 : Sybase数据库技术，数据库恢复专家； 对《Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm》有何疑问或见解，请在本文下方发表； 对网站还有其他问题或建议，请提交在留言板，谢谢！ 相关文章2011-12-01 -- oracle11g报TNS-12537和ORA-609问题的解决 (0)2011-12-01 -- linux使用date计算某个月份的天数 (0)2010-11-25 -- 平台数据库迁移linux >windows (0)2010-09-09 -- 如何用ROOT用户通过SSH连接到SOLARIS (0)2010-08-16 -- linux下光盘的挂载使用 [...]]]></description>
			<content:encoded><![CDATA[<div class="bct fc05 fc11 nbw-blog ztag js-fs2">
<p style="text-indent: 2em;"><strong>在运行./runInstaller时出现的错误</strong></p>
<p style="text-indent: 2em;"><strong>错误一：</strong></p>
<p style="text-indent: 2em;">/tmp/OraInstall2007-12-30_02-16-11PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open&nbsp; shared object file: No such file or directory occurred.</p>
<p style="text-indent: 2em;">原因是：缺少支持打印的图形化动态链接库libXp.so.6</p>
<p style="text-indent: 2em;">这个错误是由于缺少系统安装包，在RHEL5以前的版本，可以安装xorg-x11-deprecated-libs包即可，这个安装包可以在系统光盘第三张盘中找到（对于redhat as4.2以前，redhat as4.4是在第四张安装光盘）</p>
<p style="text-indent: 2em;">我下载的文件如下：</p>
<p style="text-indent: 2em;">xorg-x11-deprecated-libs-6.8.2-31.i386.rpm</p>
<p style="text-indent: 2em;">&nbsp;</p>
<p style="text-indent: 2em;">我用的是redhat 5，在5中<strong><font face="Verdana" size="2"> 被libXp-1.0.0-8.i386.rpm替代了，所以从安装盘中找到这个文件，</font></strong></p>
<p style="text-indent: 2em;"><strong><font face="Verdana" size="2">rpm&nbsp; -Uvh&nbsp;&nbsp; libXp-1.0.0-8.i386.rpm</font></strong></p>
<p style="text-indent: 2em;"><strong><font face="Verdana" size="2">再./runInstaller就没有问题，可以启动图形界面了。</font></strong></p>
<p style="text-indent: 2em;">转自：http://shuhui018125.blog.163.com/blog/static/7711050201062203346193/</p>
</div>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm">https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm">Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm" title="oracle11g报TNS-12537和ORA-609问题的解决">oracle11g报TNS-12537和ORA-609问题的解决</a> (0)</li><li>2011-12-01 -- <a href="https://www.dbainfo.net/linux-date-count-days-of-month.htm" title="linux使用date计算某个月份的天数">linux使用date计算某个月份的天数</a> (0)</li><li>2010-11-25 -- <a href="https://www.dbainfo.net/cross-platform-migrate-device-file-from-linux-to-windows.htm" title="平台数据库迁移linux >windows">平台数据库迁移linux >windows</a> (0)</li><li>2010-09-09 -- <a href="https://www.dbainfo.net/solaris-remote-ssh-permitrootlogin.htm" title="如何用ROOT用户通过SSH连接到SOLARIS">如何用ROOT用户通过SSH连接到SOLARIS</a> (0)</li><li>2010-08-16 -- <a href="https://www.dbainfo.net/linux-mount-cdrom.htm" title="linux下光盘的挂载使用">linux下光盘的挂载使用</a> (2)</li><li>2009-12-18 -- <a href="https://www.dbainfo.net/install-sybase-at-linux5-4el.htm" title="在linux5.4enterprise下安装sybase成功">在linux5.4enterprise下安装sybase成功</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>查看Oracle中表所有字段的字节总长度</title>
		<link>https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm</link>
		<comments>https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm#comments</comments>
		<pubDate>Fri, 22 Oct 2010 06:45:01 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[空间]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=367</guid>
		<description><![CDATA[在上一篇文章中，查看表中列属性的SQL语句 查看Oracle中表的简要列属性信息。利用上面的SQL语句，可以改进出来统计表所占物理存储空间大小的语句。 在Oracle中number数字类型所占的空间，计算公式为： number(p,s) 占用的字节数为： floor( ( p + 1&#160; ) / 2 ) + 1 &#160; select object_name,sum(decode(data_type,&#39;NUMBER&#39;,floor((col_length+1)/2) + 1,col_length)) table_size from &#160; (select object_name,column_name,data_type,decode(data_precision,NULL,data_length,data_precision) col_length &#160;&#160;&#160; from &#160;&#160;&#160;&#160;&#160; (select o.name object_name,c.column_name column_name,c.data_type,c.data_length,c.data_precision,c.data_scale &#160;&#160;&#160;&#160;&#160;&#160;&#160; from sys.tab$ t,dba_tab_cols c,sys.obj$ o,sys.user$ u &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; where o.obj#=t.obj# &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; and o.name=c.table_name &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; and c.owner=u.name &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; and o.owner#=u.user# &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; and [...]]]></description>
			<content:encoded><![CDATA[<p>在上一篇文章中，<a href="../view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a></p>
<p>
	查看Oracle中表的简要列属性信息。利用上面的SQL语句，可以改进出来统计表所占物理存储空间大小的语句。</p>
<p>在Oracle中number数字类型所占的空间，计算公式为：</p>
<p>number(p,s) 占用的字节数为： floor( ( p + 1&nbsp; ) / 2 ) + 1</p>
<p>&nbsp;</p>
<blockquote>
<p>select object_name,sum(decode(data_type,&#39;NUMBER&#39;,floor((col_length+1)/2) + 1,col_length)) table_size<br />
		from <br />
		&nbsp; (select object_name,column_name,data_type,decode(data_precision,NULL,data_length,data_precision) col_length<br />
		&nbsp;&nbsp;&nbsp; from <br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select o.name object_name,c.column_name column_name,c.data_type,c.data_length,c.data_precision,c.data_scale <br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from sys.tab$ t,dba_tab_cols c,sys.obj$ o,sys.user$ u<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where o.obj#=t.obj#<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and o.name=c.table_name<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and c.owner=u.name<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and o.owner#=u.user#<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and u.name=&#39;SCOTT&#39;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*and o.name=&#39;EMP&#39;*/<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) tab_cols <br />
		&nbsp;&nbsp; ) col_len<br />
		group by object_name;</p>
</blockquote>
<p>&nbsp;</p>
<p>
	上面的SQL语句统计用户scott的所有表占用的物理空间的字节数。</p>
<p>&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;-<br />
	&mdash;- 本文为andkylee个人原创，请在尊重作者劳动成果的前提下进行转载；<br />
	&mdash;- 转载务必注明原始出处 :<a href="../" target="_blank" title="http://www.dbainfo.net"> http://www.dbainfo.net</a><br />
	&mdash;- 关键字：oracle table storage 表字段 占用空间大小<br />
	&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;-</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm">https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm">查看Oracle中表所有字段的字节总长度</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012-10-19 -- <a href="https://www.dbainfo.net/ase-segment-spaceusage.htm" title="统计ASE数据库空间剩余率">统计ASE数据库空间剩余率</a> (2)</li><li>2011-12-01 -- <a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm" title="oracle11g报TNS-12537和ORA-609问题的解决">oracle11g报TNS-12537和ORA-609问题的解决</a> (0)</li><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2011-08-25 -- <a href="https://www.dbainfo.net/get-free-space-of-device-and-database-allocation-prior-to-ase12-5.htm" title="ASE15.x之前版本中查看设备剩余空间以及设备上数据库分配信息的存储过程">ASE15.x之前版本中查看设备剩余空间以及设备上数据库分配信息的存储过程</a> (0)</li><li>2011-04-28 -- <a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm" title="oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决">oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</a> (0)</li><li>2011-03-21 -- <a href="https://www.dbainfo.net/sybase-ase-sp_spaceused-error-1151.htm" title="执行过程sp_spaceused的时候报error:1151">执行过程sp_spaceused的时候报error:1151</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-09-28 -- <a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a> (0)</li><li>2010-09-17 -- <a href="https://www.dbainfo.net/java-connect-url-for-oracle-db2-sql-sybase-informix-mysql-pgsql.htm" title="java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL">java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL</a> (0)</li><li>2010-09-15 -- <a href="https://www.dbainfo.net/sql-server-database-all-tables-space-order-desc.htm" title="统计SQL SERVER数据库内所有表占用空间并排序">统计SQL SERVER数据库内所有表占用空间并排序</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>查看表中列属性的SQL语句</title>
		<link>https://www.dbainfo.net/view-table-column-properties-ddl.htm</link>
		<comments>https://www.dbainfo.net/view-table-column-properties-ddl.htm#comments</comments>
		<pubDate>Tue, 28 Sep 2010 10:01:07 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sp_desc]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=341</guid>
		<description><![CDATA[在sqlplus中，desc后面跟上表名，能够显示简要的表创建语法。 下面的SQL语句能够实现类似sqlplus中desc的类似的功能。 select o.obj#,o.name object_name,c.column_id,c.column_name,c.data_type,c.data_length,c.data_precision,c.data_scale,c.nullable from sys.tab$ t,dba_tab_cols c,sys.obj$ o,sys.user$ u where o.obj#=t.obj# &#160; and o.name=c.table_name &#160; and c.owner=u.name &#160; and o.owner#=u.user# &#160; and u.name=&#39;SCOTT&#39; &#160; and o.name=&#39;EMP&#39; order by obj#,column_id&#160; ; 其实，利用oracle自带的DBMS_METADATA包能够很简单的得到对象的DDL语法。 其它第三方工具也能得到对象DDL，比如： TOAD,pl/sql developer等。 比如： SELECT DBMS_METADATA.get_ddl (&#39;TABLE&#39;, table_name, owner) FROM all_tables WHERE owner = &#39;&#38;owner&#39; AND table_name = &#39;&#38;NAME&#39; &#160; 另外： SQL&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>在sqlplus中，desc后面跟上表名，能够显示简要的表创建语法。</p>
<p>下面的SQL语句能够实现类似sqlplus中desc的类似的功能。</p>
<blockquote>
<p>select o.obj#,o.name object_name,c.column_id,c.column_name,c.data_type,c.data_length,c.data_precision,c.data_scale,c.nullable<br />
		from sys.tab$ t,dba_tab_cols c,sys.obj$ o,sys.user$ u<br />
		where o.obj#=t.obj#<br />
		&nbsp; and o.name=c.table_name<br />
		&nbsp; and c.owner=u.name<br />
		&nbsp; and o.owner#=u.user#<br />
		&nbsp; and u.name=&#39;SCOTT&#39;<br />
		&nbsp; and o.name=&#39;EMP&#39;<br />
		order by obj#,column_id&nbsp; <br />
		;</p>
<p>		<span id="more-341"></span></p>
</blockquote>
<p>其实，利用oracle自带的DBMS_METADATA包能够很简单的得到对象的DDL语法。 其它第三方工具也能得到对象DDL，比如： TOAD,pl/sql developer等。</p>
<p>比如：</p>
<blockquote>
<p>SELECT DBMS_METADATA.get_ddl (&#39;TABLE&#39;, table_name, owner)<br />
		FROM all_tables<br />
		WHERE owner = &#39;&amp;owner&#39; AND table_name = &#39;&amp;NAME&#39;</p>
</blockquote>
<p>&nbsp;</p>
<p>另外：</p>
<blockquote>
<p>SQL&gt; select to_number(&#39;1a&#39;,&#39;xx&#39;),to_char(26,&#39;xx&#39;) from dual;</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26&nbsp; 1a</p>
<p>		SQL&gt; <br />
		&nbsp;</p>
</blockquote>
<p>这是oracle中的十进制和十六进制转化的语句。</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm">https://www.dbainfo.net/view-table-column-properties-ddl.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm">查看表中列属性的SQL语句</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm" title="oracle11g报TNS-12537和ORA-609问题的解决">oracle11g报TNS-12537和ORA-609问题的解决</a> (0)</li><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2011-04-28 -- <a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm" title="oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决">oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-10-22 -- <a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm" title="查看Oracle中表所有字段的字节总长度">查看Oracle中表所有字段的字节总长度</a> (0)</li><li>2010-10-12 -- <a href="https://www.dbainfo.net/sybase-ase-sameas-sqlplus-desc-sp_desc.htm" title="Sybase ASE中实现类似oracle的sqlplus中desc命令来简要显示表结构的存储过程">Sybase ASE中实现类似oracle的sqlplus中desc命令来简要显示表结构的存储过程</a> (0)</li><li>2010-09-17 -- <a href="https://www.dbainfo.net/java-connect-url-for-oracle-db2-sql-sybase-informix-mysql-pgsql.htm" title="java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL">java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL</a> (0)</li><li>2010-08-29 -- <a href="https://www.dbainfo.net/access-sqlserver-from-oracle-by-transgate.htm" title="从oracle内访问sqlserver2005的数据时一个错误">从oracle内访问sqlserver2005的数据时一个错误</a> (0)</li><li>2010-08-10 -- <a href="https://www.dbainfo.net/oracle10g-create-database-manually.htm" title="手动创建oracle 10g数据库的命令语法">手动创建oracle 10g数据库的命令语法</a> (0)</li><li>2010-08-10 -- <a href="https://www.dbainfo.net/oracle10g-create-database-manully-ora-02778.htm" title="手动创建oracle数据库时报错：ORA-02778">手动创建oracle数据库时报错：ORA-02778</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/view-table-column-properties-ddl.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
