{"id":280878,"date":"2016-11-13T15:45:03","date_gmt":"2016-11-13T12:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280878"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280878","title":{"rendered":"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 SAP R\/3 \u0432 Oracle Database \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SAP Java Connector"},"content":{"rendered":"<p>\u0412 <a href=\"https:\/\/habrahabr.ru\/post\/127364\/\">\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437<\/a> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0432\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 Oracle Database \u0438 SAP. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0437\u044f\u0442\u044b\u0435 \u0438\u0437 SAP, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 select. \u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0421\u043e\u0437\u0434\u0430\u043d \u043e\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u043a SAP JCo \u0438\u043b\u0438 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432. <\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e SAP JCo \u0432\u044b\u0434\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u043b\u0430\u0442\u0438\u0442. \u0410 Oracle Database \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 java \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0435\u0435 \u0441\u0442\u0440\u043e\u043a \u0432 Oracle Database, sap_table.tps   <\/p>\n<pre><code class=\"sql\">drop type sap_rows; \/ drop type sap_row; \/ create or replace type sap_row as object(p1 varchar(30), p2 varchar(30), p3 varchar(30), p4 varchar(30), p5 varchar(30), dt varchar(20)) \/ create or replace type sap_rows as table of sap_row \/ <\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 SAP \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0432 select, art0int_sap.java:  <\/p>\n<pre><code class=\"java\">package com.art0int;  import java.util.*; import java.io.*; import java.math.*; import java.util.Calendar; import java.text.SimpleDateFormat; import java.sql.*;  import oracle.sql.*; import oracle.jdbc.driver.OracleDriver;  import java.util.HashMap; import java.util.Properties;  import com.sap.conn.jco.AbapException; import com.sap.conn.jco.JCoContext; import com.sap.conn.jco.JCoDestination; import com.sap.conn.jco.JCoDestinationManager; import com.sap.conn.jco.JCoException; import com.sap.conn.jco.JCoField; import com.sap.conn.jco.JCoFunction; import com.sap.conn.jco.JCoFunctionTemplate; import com.sap.conn.jco.JCoStructure; import com.sap.conn.jco.JCoTable; import com.sap.conn.jco.ext.DataProviderException; import com.sap.conn.jco.ext.DestinationDataEventListener; import com.sap.conn.jco.ext.DestinationDataProvider;  public class SAP_TABLE {  \/\/\u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438     static Vector vrows; \/\/\u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c SAP     static MyDestinationDataProvider myProvider = null;  \/\/\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 SAP \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c select     public static oracle.sql.ARRAY SQL_sap_rows (BigDecimal nrows) throws SQLException {          Connection conn = new OracleDriver().defaultConnection();  \/\/\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0435\u0435 \u0441\u0442\u0440\u043e\u043a         ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor(&quot;SAP_ROWS&quot;, conn );         StructDescriptor outDesc = StructDescriptor.createDescriptor(&quot;SAP_ROW&quot;, conn);          int nrowsval = nrows.intValue();         vrows = new Vector(nrowsval);         Object[] out_attr = new Object[6];          try {  \t    if (myProvider == null) { \t\tmyProvider = new MyDestinationDataProvider(); \t\ttry { \t\t    com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(myProvider); \t\t} catch(IllegalStateException providerAlreadyRegisteredException) { \t\t    throw new Error(providerAlreadyRegisteredException); \t\t}             }              String destName = &quot;ABAP_AS&quot;;             SAP_TABLE test = new SAP_TABLE(); \t     \/\/\u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 SAP             myProvider.changeProperties(destName, getDestinationPropertiesFromUI()); \t                 JCoDestination dest;             try { \/\/\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f                 dest = JCoDestinationManager.getDestination(destName); \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b                 dest.ping();                 System.out.println(&quot;Destination &quot; + destName + &quot; works&quot;);  \t\tJCoFunction function = dest.getRepository().getFunction(&quot;MY_SAPFUNCTION&quot;); \t\ttry { \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \t\t    function.execute(dest); \t\t} catch(AbapException e) { \t\t    System.out.println(e.toString()); \t\t    return null; \t\t}  \/\/\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \t\tJCoTable out =  function.getTableParameterList().getTable(0); \t\tfor (int i = 0; i &lt; out.getNumRows(); i++) { \t\t    out.setRow(i);  \t\t    out_attr[1-1] = out.getString(1-1); \t\t    out_attr[2-1] = out.getString(2-1); \t\t    out_attr[3-1] = out.getString(3-1); \t\t    out_attr[4-1] = out.getString(4-1); \t\t    out_attr[5-1] = out.getString(5-1); \t\t    out_attr[6-1] = (Object)new String(now()); \t\t    vrows.add((Object)new STRUCT(outDesc, conn, out_attr));                      nrowsval--;                     if (nrowsval==0) break; \t\t}              } catch(JCoException e) {                 e.printStackTrace();                 System.out.println(&quot;Execution on destination &quot; + destName+ &quot; failed&quot;);             }                   } catch(Exception e) {             e.printStackTrace();         }  \/\/\u043e\u0442\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Oracle                 oracle.sql.ARRAY outArray = new oracle.sql.ARRAY(descriptor,conn,vrows.toArray());          return outArray;      }  \/\/\u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0430\u0451\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SAP     static Properties getDestinationPropertiesFromUI() {          Properties connectProperties = new Properties();         connectProperties.setProperty(DestinationDataProvider.JCO_R3NAME, &quot;MY_R3NAME&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, &quot;MY_IP&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, &quot;MY_CLIENTNO&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_USER,   &quot;MY_SAPUSER&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, &quot;MY_SAPPASSWORD&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  &quot;MY_SYSNR&quot;);         connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   &quot;en&quot;);         return connectProperties;     }  \/\/\u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 SAP     static class MyDestinationDataProvider implements DestinationDataProvider     {         private DestinationDataEventListener eL;         private HashMap&lt;String, Properties&gt; secureDBStorage = new HashMap&lt;String, Properties&gt;();                  public Properties getDestinationProperties(String destinationName)         {             try             {                 Properties p = secureDBStorage.get(destinationName);                  if(p!=null)                 {                     if(p.isEmpty())                         throw new DataProviderException(DataProviderException.Reason.INVALID_CONFIGURATION, &quot;destination configuration is incorrect&quot;, null);                      return p;                 }                                  return null;             }             catch(RuntimeException re)             {                 throw new DataProviderException(DataProviderException.Reason.INTERNAL_ERROR, re);             }         }          public void setDestinationDataEventListener(DestinationDataEventListener eventListener)         {             this.eL = eventListener;         }          public boolean supportsEvents()         {             return true;         }          void changeProperties(String destName, Properties properties)         {             synchronized(secureDBStorage)             {                 if(properties==null)                 {                     if(secureDBStorage.remove(destName)!=null)                         eL.deleted(destName);                 }                 else                 {                     secureDBStorage.put(destName, properties);                     eL.updated(destName);                 }             }         }     }  \/\/\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f     public static final String DATE_FORMAT_NOW = &quot;yyyy-MM-dd HH:mm:ss&quot;;      public static String now() {         Calendar cal = Calendar.getInstance();         SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);         return sdf.format(cal.getTime());      }  } <\/code><\/pre>\n<p>  \u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430 java \u0432 Oracle Database, sap_table.js   <\/p>\n<pre><code class=\"sql\">create or replace and compile java source named sap_table as @art0int_sap.java \/ <\/code><\/pre>\n<p>  \u041e\u0431\u0435\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u0432 java \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Oracle Database, SAP_TABLE.spc  <\/p>\n<pre><code class=\"sql\">create or replace package SAP_TABLE is  function get_java_property(prop in varchar2)     return varchar2 is     language java name 'java.lang.System.getProperty(java.lang.String) return java.lang.String';  function sap_rows_table(nrows in number)     return sap_rows     IS LANGUAGE JAVA     name 'com.art0int.SAP_TABLE.SQL_sap_rows(java.math.BigDecimal) return oracle.sql.ARRAY';  end SAP_TABLE; \/ <\/code><\/pre>\n<p>  \u0418 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0451 \u0441\u043e\u0431\u0435\u0440\u0451\u0442 \u0432\u043e\u0435\u0434\u0438\u043d\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0434\u0430\u0447\u0443 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 sapjco3.  <\/p>\n<pre><code class=\"bash\">export ORACLE_SID=MYDB  sqlplus '\/ as sysdba' &lt;&lt;EOF  drop user sapacc cascade; \/  create user sapacc identified by &quot;psapacc&quot; default tablespace users temporary tablespace temp profile monitor; grant connect,resource to sapacc;  exec dbms_java.grant_permission('SAPACC', 'SYS:java.net.SocketPermission', 'MY_IP:MY_PORT', 'connect,resolve' ); exec dbms_java.grant_permission('SAPACC', 'SYS:java.io.FilePermission', '.', 'read' );  --\u0437\u0434\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Oracle Database, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0432\u044b\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a, \u0437\u0430\u0442\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c --select seq, kind, grantee, name, enabled from dba_java_policy where name like '%java.lang.RuntimePermission%'; --98 RESTRICT PUBLIC 0:java.lang.RuntimePermission#loadLibrary.* ENABLED exec dbms_java.disable_permission(98); exec dbms_java.grant_permission('SAPACC', 'SYS:java.lang.RuntimePermission', 'loadLibrary.sapjco3', '' ); exec dbms_java.enable_permission(98);  EOF  #\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 dropjava -user sapacc\/psapacc -verbose sapjco3.jar loadjava -user sapacc\/psapacc -order -resolve -verbose -resolver &quot;((* sapacc) (* PUBLIC) (* -))&quot; sapjco3.jar  sqlplus -S \/nolog &lt;&lt;EOF connect sapacc\/psapacc set pagesize 1000 set linesize 160  @sap_table.tps show errors @sap_table.js show errors @SAP_TABLE.spc show errors EOF  export NLS_LANG=American_America.UTF8 sqlplus -S \/nolog&lt;&lt;EOF connect sapacc\/psapacc set serveroutput on call dbms_java.set_output(1000000);  set linesize 160 set pagesize 1000 set feedback off  col p1 for a5 col p2 for a3 col p3 for a3 col p4 for a5 col p5 for a25 col dt for a25  select  sapacc.SAP_TABLE.get_java_property('java.library.path') as java_library_path ,sapacc.SAP_TABLE.get_java_property('java.version') as java_version from dual;  select * from table(sapacc.SAP_TABLE.sap_rows_table(15)) order by dt;  exit; EOF  <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SAP Java Connector \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 java.library.path \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/315108\/\"> https:\/\/habrahabr.ru\/post\/315108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 <a href=\"https:\/\/habrahabr.ru\/post\/127364\/\">\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437<\/a> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0432\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 Oracle Database \u0438 SAP. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0437\u044f\u0442\u044b\u0435 \u0438\u0437 SAP, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 select. \u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0421\u043e\u0437\u0434\u0430\u043d \u043e\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u043a SAP JCo \u0438\u043b\u0438 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432. <\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e SAP JCo \u0432\u044b\u0434\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u043b\u0430\u0442\u0438\u0442. \u0410 Oracle Database \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 java \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-280878","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280878"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280878\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}