久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='DEdol'><style id='DEdol'><dir id='DEdol'><q id='DEdol'></q></dir></style></legend>
      • <bdo id='DEdol'></bdo><ul id='DEdol'></ul>
      1. <small id='DEdol'></small><noframes id='DEdol'>

        <tfoot id='DEdol'></tfoot>

        <i id='DEdol'><tr id='DEdol'><dt id='DEdol'><q id='DEdol'><span id='DEdol'><b id='DEdol'><form id='DEdol'><ins id='DEdol'></ins><ul id='DEdol'></ul><sub id='DEdol'></sub></form><legend id='DEdol'></legend><bdo id='DEdol'><pre id='DEdol'><center id='DEdol'></center></pre></bdo></b><th id='DEdol'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DEdol'><tfoot id='DEdol'></tfoot><dl id='DEdol'><fieldset id='DEdol'></fieldset></dl></div>

        如何使用 tnsname 從 Ant 連接到 Oracle 數(shù)據(jù)庫?

        How can I connect to an Oracle database from Ant using the tnsname?(如何使用 tnsname 從 Ant 連接到 Oracle 數(shù)據(jù)庫?)

          <i id='fLKw2'><tr id='fLKw2'><dt id='fLKw2'><q id='fLKw2'><span id='fLKw2'><b id='fLKw2'><form id='fLKw2'><ins id='fLKw2'></ins><ul id='fLKw2'></ul><sub id='fLKw2'></sub></form><legend id='fLKw2'></legend><bdo id='fLKw2'><pre id='fLKw2'><center id='fLKw2'></center></pre></bdo></b><th id='fLKw2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fLKw2'><tfoot id='fLKw2'></tfoot><dl id='fLKw2'><fieldset id='fLKw2'></fieldset></dl></div>

            1. <small id='fLKw2'></small><noframes id='fLKw2'>

                <tbody id='fLKw2'></tbody>
              <tfoot id='fLKw2'></tfoot>
                <bdo id='fLKw2'></bdo><ul id='fLKw2'></ul>

                <legend id='fLKw2'><style id='fLKw2'><dir id='fLKw2'><q id='fLKw2'></q></dir></style></legend>
                • 本文介紹了如何使用 tnsname 從 Ant 連接到 Oracle 數(shù)據(jù)庫?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在尋找類似于 Ant sql 任務的東西,但它將接受以下格式的 JDBC url:

                  I am looking for something similar to the Ant sql task but that will accept a JDBC url of the format:

                  jdbc:oracle:thin:@TNS_NAME

                  jdbc:oracle:thin:@TNS_NAME

                  一種可能的方法似乎是編寫我自己的 Ant 任務,該任務使用 OracleDataSource 創(chuàng)建連接,但有沒有辦法在 Ant 中直接執(zhí)行此操作?

                  One possible approach seems to be to write my own Ant task that uses an OracleDataSource to create the Connection, but is there a way to do this straight in Ant?

                  感謝您到目前為止的答復.如果我詳細說明我遇到的錯誤,希望能有所幫助.

                  Thanks for the responses so far guys. I hope it helps if I elaborate a bit more on the error I'm getting.

                  我的 Ant 任務如下所示:

                  My Ant task looks as follows:

                  <target name="MyTarget" >
                      <property name="oracle.net.tns_admin" value="/opt/oracle/product/10.2.0.1/NETWORK/ADMIN" />
                      <property name="jdbc.driver" value="ojdbc5.jar" />
                      <property name="jdbc.i18n.support" value="orai18n.jar" />
                      <property name="jdbc.driver.class" value="oracle.jdbc.OracleDriver" />
                      <path id="sql.class.path">
                          <pathelement location="${jdbc.driver}" />
                          <pathelement location="${jdbc.i18n.support}" />
                      </path>
                  
                      <sql driver="${jdbc.driver.class}" url="jdbc:oracle:thin:@THE_TNS_NAME" userid="USER" password="PASSWORD" classpathref="sql.class.path" >
                          <![CDATA[
                          #SOME ARBITRARY SQL HERE
                          ]]>
                      </sql>
                  </target>
                  

                  失敗并出現(xiàn)錯誤:

                  java.sql.SQLException: Io 異常:指定了未知主機

                  java.sql.SQLException: Io exception: Unknown host specified

                  用 "jdbc:oracle:thin:@HOST:PORT:INSTANCE" 替換 url 工作正常,我也可以 tnsping 上面使用的 tns 名稱,所以我知道它是有效的.

                  Replacing the url with "jdbc:oracle:thin:@HOST:PORT:INSTANCE" works fine, and I can also tnsping the tns name used above, so I know it's valid.

                  推薦答案

                  今天剛開始工作,偶然發(fā)現(xiàn)了缺失的部分.TNS 位置需要設置為系統(tǒng)屬性,如下所示:Oracle 瘦 JDBC 到 TNS 名稱

                  Was just working with this today and stumbled upon the missing piece. The TNS location needs to be set as a system property as indicated here: Oracle thin JDBC to TNS name

                  要建立到 TNS 別名 (tnsname) 的 Oracle 瘦 JDBC 連接,確保將 oracle.net.tns_admin 系統(tǒng)屬性傳遞給 JVM.它的值應該是你的 tnsnames.ora 文件所在的目錄位于.之后,您可以只傳遞 TNS 別名來代替JDBC URL 中的主機名.

                  To establish an Oracle thin JDBC connection to a TNS alias (tnsname), make sure you pass the oracle.net.tns_admin system property to the JVM. Its value should be the directory in which your tnsnames.ora file is located. After that, you can just pass the TNS alias in place of the host name in the JDBC URL.

                  例如如果您只是嘗試連接到 jdbc:oracle:thin:@MYDB,在你的 tnsnames.ora 文件中,你會得到一個帶有詳細信息的 SQLExceptionIo 異常消息:指定了未知主機.如果你啟動 JVM使用 -Doracle.net.tns_admin=/oracle/10g/NETWORK/ADMIN,或使用System.setProperty(String,String) 啟動后,連接將成功建立.

                  E.g. if you simply try to connect to jdbc:oracle:thin:@MYDB, which is in your tnsnames.ora file, you’ll get an SQLException with a detail message of Io exception: Unknown host specified. If you fire up the JVM with a -Doracle.net.tns_admin=/oracle/10g/NETWORK/ADMIN, or use System.setProperty(String,String) after startup, the connection will be established successfully.

                  這樣做后,我能夠單獨使用 TNS 別名成功連接.

                  After doing this I was able to successfully connect using the TNS alias alone.

                  這篇關于如何使用 tnsname 從 Ant 連接到 Oracle 數(shù)據(jù)庫?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發(fā)生錯誤 沒有合適的驅動程序)
                  In Apache Spark 2.0.0, is it possible to fetch a query from an external database (rather than grab the whole table)?(在 Apache Spark 2.0.0 中,是否可以從外部數(shù)據(jù)庫獲取查詢(而不是獲取整個表)?) - IT屋-程序員軟件開
                  Spark giving Null Pointer Exception while performing jdbc save(Spark在執(zhí)行jdbc保存時給出空指針異常)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  No suitable driver found for jdbc in Spark(在 Spark 中找不到適合 jdbc 的驅動程序)
                    <legend id='4eBuA'><style id='4eBuA'><dir id='4eBuA'><q id='4eBuA'></q></dir></style></legend>

                      <tbody id='4eBuA'></tbody>
                    <i id='4eBuA'><tr id='4eBuA'><dt id='4eBuA'><q id='4eBuA'><span id='4eBuA'><b id='4eBuA'><form id='4eBuA'><ins id='4eBuA'></ins><ul id='4eBuA'></ul><sub id='4eBuA'></sub></form><legend id='4eBuA'></legend><bdo id='4eBuA'><pre id='4eBuA'><center id='4eBuA'></center></pre></bdo></b><th id='4eBuA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4eBuA'><tfoot id='4eBuA'></tfoot><dl id='4eBuA'><fieldset id='4eBuA'></fieldset></dl></div>
                  • <tfoot id='4eBuA'></tfoot>
                      <bdo id='4eBuA'></bdo><ul id='4eBuA'></ul>

                      <small id='4eBuA'></small><noframes id='4eBuA'>

                          1. 主站蜘蛛池模板: 欧美成人一区二区 | 亚洲伊人久久综合 | 99这里只有精品视频 | 日韩精品一区二区三区中文在线 | 日韩免费av一区二区 | 日韩一级电影免费观看 | 精品国产一级 | 日韩三级免费网站 | 日韩高清中文字幕 | 久久91精品久久久久久9鸭 | 欧美成人专区 | 久久久精品久久 | 国产精品国产a级 | 九色.com | 久久精品视频网站 | 国产精品一区三区 | 亚洲国产专区 | 亚洲精品免费视频 | 欧美性猛片aaaaaaa做受 | 久久久久久国产精品免费 | 色播久久| 欧美成人综合 | 欧美日韩精品免费 | 国产91在线播放精品91 | 国产清纯白嫩初高生在线播放视频 | 免费久久久 | 精品一区二区三区入口 | 亚洲视频一区在线观看 | 色.com| 极品久久| 综合伊人 | 黄色免费网站在线看 | 国产超碰人人爽人人做人人爱 | 麻豆精品国产免费 | 人人干视频在线 | 6996成人影院网在线播放 | 91精品国产色综合久久不卡98 | 日本视频在线 | 亚洲36d大奶网 | 久久精品国产亚洲 | 激情福利视频 |