﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Jeff's Java Home-随笔分类-DataBase</title><link>http://www.blogjava.net/liucunjie/category/8093.html</link><description>Jeff's Java Home</description><language>zh-cn</language><lastBuildDate>Sat, 03 Mar 2007 04:32:20 GMT</lastBuildDate><pubDate>Sat, 03 Mar 2007 04:32:20 GMT</pubDate><ttl>60</ttl><item><title>Export_Access_2_Oracle(把数据从Access 导入到Oracle里)</title><link>http://www.blogjava.net/liucunjie/archive/2006/03/04/33635.html</link><dc:creator>Jeff's Java Home</dc:creator><author>Jeff's Java Home</author><pubDate>Sat, 04 Mar 2006 14:17:00 GMT</pubDate><guid>http://www.blogjava.net/liucunjie/archive/2006/03/04/33635.html</guid><wfw:comment>http://www.blogjava.net/liucunjie/comments/33635.html</wfw:comment><comments>http://www.blogjava.net/liucunjie/archive/2006/03/04/33635.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liucunjie/comments/commentRss/33635.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liucunjie/services/trackbacks/33635.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>1)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>Open Access to have all the tables ready.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><B style="mso-bidi-font-weight: normal">Please note</B>:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>the tables must be all upper case, like <B style="mso-bidi-font-weight: normal">CUST_PRM</B>, not like cust_prm.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>2)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>Select a table and right mouse click on it.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Then a menu bar shows up.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>In the menu bar, select and click on the “<B style="mso-bidi-font-weight: normal">Export</B>” menu.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:line id=_x0000_s1026 style="Z-INDEX: 1; LEFT: 0px; POSITION: absolute; TEXT-ALIGN: left; flip: x" to="351pt,160.8pt" from="126pt,79.8pt"><v:stroke endarrow="block"></v:stroke></v:line><SPAN lang=EN-US><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>3)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>In the popped up File Selection window, select the value “<B style="mso-bidi-font-weight: normal">ODBC Databases()</B>” in the “<B style="mso-bidi-font-weight: normal">Save As Type</B>” field.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN>Please see picture below:</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><v:line id=_x0000_s1027 style="Z-INDEX: 2; LEFT: 0px; POSITION: absolute; TEXT-ALIGN: left; flip: x" to="486pt,261pt" from="225pt,243pt"><v:stroke endarrow="block"></v:stroke></v:line><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>4)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>Then in the “Export” dialog, the table name defaults to the same table name in Access.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Do not change it.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>You simply click on <B style="mso-bidi-font-weight: normal">OK</B> button.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>5)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>In the “Select Data Source” window, click on the “<B style="mso-bidi-font-weight: normal">Machine Data Source</B>” TAB.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Then select your oracle database, such as “<B style="mso-bidi-font-weight: normal">prm</B>”.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>Then click on <B style="mso-bidi-font-weight: normal">OK</B> button.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><v:oval id=_x0000_s1028 style="MARGIN-TOP: -9pt; Z-INDEX: 3; LEFT: 0px; MARGIN-LEFT: 1in; WIDTH: 153pt; POSITION: absolute; HEIGHT: 81pt; TEXT-ALIGN: left" filled="f"></v:oval><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>6)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>Then in the “Oracle ODBC Driver Connect” window, type in the password and then click on <B style="mso-bidi-font-weight: normal">OK</B> button.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>Wait until the data is replicated into Oracle.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>7)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>Open a DOS prompt, and type “<B style="mso-bidi-font-weight: normal">sqlplus u1/p1</B>”.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Here, u1 and p1 are my username/password of my PRM database.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>You should use your own database username and password.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>8)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>After login into sqlplus, type “<B style="mso-bidi-font-weight: normal">select * from TAB;</B>”, you will see your table created.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>9)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>In sqlplus, type command “desc <B style="mso-bidi-font-weight: normal">CUST_PRM;</B>”</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US>10)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN><SPAN lang=EN-US>In sqlplus, type command “select * from <B style="mso-bidi-font-weight: normal">CUST_PRM;</B>”<BR><BR>注意在导入之前一定确保Oracle里没有相同的表<BR><BR>不好意思，图显示不出来，请下载Document吧</SPAN></P><img src ="http://www.blogjava.net/liucunjie/aggbug/33635.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liucunjie/" target="_blank">Jeff's Java Home</a> 2006-03-04 22:17 <a href="http://www.blogjava.net/liucunjie/archive/2006/03/04/33635.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>