Need help with Thin JDBC connecting Oracle to SQL server.

I am fairly new to JAVA. We have ORACLE 8.1.7 running on Solaris 8. I have a need to
periodically extract data from ORACLE DB and transfer it to SQL Server. I am limited to
moving data from the ORACLE/UNIX environment to SQL Server side.
From what I have read, Server-side Thin driver should work.
1) Are there any issues in trying to achieve this with ORACLE running on the UNIX platform?
2) Will the Server-side Thin driver talk to both the DBs ?
3) Is it possible to provide some sample code ?
Thanks in advance,
Solomon

Quattro,
I had complete success in reading from Oracle and writing to SQL Server. First of all let me thank you for all your help. I do have one last request. Its more on optimization than any thing else.
I was trying to optimize my code by grouping both the connections in one place and to keep my reads and inserts together so that I don't commit at the end of each insert etc. I don't seem to have the scope rules under control yet. Could you suggest how to improve this:
import java.sql.*;
public class Test_Combined2 {
public static void main(String args[]) throws SQLException {
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// Connect to the database
// You must put a database name after the @ sign in the connection URL.
// You can use either the fully specified SQL*net syntax or a short cut
// syntax as <host>:<port>:<sid>. The example uses the short cut syntax.
Connection con2 = DriverManager.getConnection ("jdbc:oracle:thin:@Test:1521:PSDEVElOP",
"SOLOMON","SOL1");
// Create a Statement
Statement stmt2 = con2.createStatement ();
String url = "jdbc:microsoft:sqlserver://INTRADEV:1433;DatabaseName=Measure";
Connection con;
String query = "select dataYear, dataMonth, yieldRate from tblYield " ;
Statement stmt;
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.print(e.getMessage());
// Select the ENAME column from the EMP table
ResultSet rset = stmt2.executeQuery ("select year_start, monthofyear, percent_comp " +
" from ps_usm_ytd_yield ");
// Iterate through the result and print the employee names
while (rset.next ()) {
System.out.println (rset.getFloat (3));
int ps_dataYear = rset.getInt(1);
int ps_dataMonth = rset.getInt(2);
float ps_yieldRate = rset.getFloat(3);
try{
con = DriverManager.getConnection (url, "tmpuser","tmppush");
stmt = con.createStatement();
PreparedStatement insertTblYield;
String insertString = "insert into tblYield " +
" values(?, ?, ?)";
//con.setAutoCommit(false);
insertTblYield = con.prepareStatement(insertString);
insertTblYield.setInt(1, ps_dataYear);
insertTblYield.setInt(2, ps_dataMonth);
insertTblYield.setFloat(3, ps_yieldRate);
insertTblYield.executeUpdate();
con.commit();
//con.setAutoCommit(false);
/*ResultSet rs = stmt.executeQuery(query);
System.out.println("dataYear, dataMonth, yieldRate");
while (rs.next()) {
int dataYear = rs.getInt(1);
int dataMonth = rs.getInt(2);
float yieldRate = rs.getFloat(3);
System.out.println(" " + dataYear + ", " + dataMonth + ", " + yieldRate);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.print("SQLException: ");
System.err.println(ex.getMessage());
} //while
stmt2.close();
con2.close();

Similar Messages

  • Need help with Outlook 2013 connecting to Exchange server(2010)

    Hi
    I need help with Outlook 2013 and with my exchange server(2010) email account
    After setting up account initially emails come in and than after an hour or two stop. My OWA is working fine with no issues. I have even created a forward rule in OWA to my GMAIL account whch works fine
    However Outlook 2013 is not syncing messages, have difficulty in sending emails sometimes as it takes too long.  In fact the connection also is intermittent. Even if the task bar shows connected to exchange, it seems that is not the case since new emails
    and any emails I compose dont work.  I have trouble shot the issue with my ISP and email service provide, but they havent resolved the issue  I have also done a TraceRoute and that shows no drops or problems to he exchange server.
    Can someone please help me resolve this matter so I can continue to use Outlook 2013( running Windows 8.1) in both my computers which have the identical problem
    Look forward to a solution soon
    Thanks

    Hi Angela
    Thanks for your message
    To answer your questions, please note the following
    a) My account is set up in Cache Mode( not online mode)
    b) I am the only other user on the account
    c) When the connection to the exchange server is broken, I see upon clicking connection tab that there is no information in the box, and when I press reconnect it starts showing "connecting"
    d) When the connection to the server is there, it shows  connection as "established"
    e) Sorry I dont understand th meaning of CAS array in your environment?  Can you pls explain
    Since yday I have been using Outlook 2010 on desktop and Outlook 2013 on my laptop using Exchange 2013 account.  So far all emails are syncing, and I can send emails from both computers. However, I am concerned that the connection can break-off anytime,
    as it has done that in the past on both outlook versions.  The max time it has worked without any problem is 48 hrs and than after that the same issue of not connection, not syncing and unable to send emails happens
    My ISP has checked and there is no network connectivity issues. My email service provider has trouble shot the issue many times, but to no positive results.  I have also changed the profile a few times, but the intermittent connectivity problem hasn't
    been resolved.
    Can you identify the possible causes and more importantly a working permanent solution please
    Thanks
    Mahesh

  • JDBC connection to Microsoft SQL Server

    How connect to MS SQL 2000 using JDBC from Oracle(java stored procedure) ?
    I can connect to Oracle jdbc:
    create or replace and compile java source named Hello as
    import oracle.jdbc.driver.OracleDriver;
    (C:\oracle\bise1\db\jdbc\lib\classes12.zip\oracle\jdbc\driver)
    But I don't know how to connect to
    Microsoft sql server?
    sorry answer in
    Re: Querying MS SQL Server from PL/SQL with JDBC
    1)download
    Microsoft SQL Server 2005 JDBC Driver 1.2
    2)C:\oracle9i\bin>loadjava -user scott/tiger sqljdbc.jar
    import com.microsoft.sqlserver.jdbc.SQLServerDriver;

    Hello,
    SQL Server Express will go to sleep if idle, this behavior is not configurable.
    When SQL Express transitions from idle to active some of the memory that was released needs to be reclaimed; this results is a slight lag during "startup time" when you're first connecting to SQL Express.
    The other sort of sleep occurs when a database with AUTO_CLOSE unloading itself after a period of inactivity. This can be resolved by setting AUTO_CLOSE to false.
    You can refer to the following blog about more details about this:
    http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx
    You can try to upgrade the SQL Server Express to a non-free version to get rid of this.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Need help with Kerb. jdbc from Linux to MS SQL 2008

    Hello Forum, I am getting an erro when I try to use Kerb. trusted security to connect to sql server.
    4.0 documentation reflects it's absolutely possible.
    Not only that, I have ms odbc installed on the same box and it provides Kerbers (not ntlm) connection to sql server. But java with jdbc reject doing it.
    Here is the message:
    com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:5836ac6c-6d2e-42e4-8c6d-8b89bc0be5c9
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
            at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:140)
            at com.microsoft.sqlserver.jdbc.KerbAuthentication.GenerateClientContext(KerbAuthentication.java:268)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2691)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
            at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
            at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
            at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
            at java.sql.DriverManager.getConnection(DriverManager.java:419)
            at java.sql.DriverManager.getConnection(DriverManager.java:367)
            at connectURL.main(connectURL.java:53)
    Caused by: javax.security.auth.login.LoginException: unable to find LoginModule class: com.sun.security.auth.module.Krb5LoginModule
            at javax.security.auth.login.LoginContext.invoke(LoginContext.java:834)
            at javax.security.auth.login.LoginContext.access$000(LoginContext.java:209)
            at javax.security.auth.login.LoginContext$4.run(LoginContext.java:709)
            at java.security.AccessController.doPrivileged(AccessController.java:327)
            at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:706)
            at javax.security.auth.login.LoginContext.login(LoginContext.java:603)
            at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:133)
    1] Client side:
    Which OS platform are you running on? (Linux)
    Which JVM are you running on? (IBM J9 VM (build 2.6, JRE 1.6.0 Linux amd64-64
    What is the connection URL in you app? (jdbc:sqlserver://abcde24243.somebank.COM:15001;databaseName=master;integratedSecurity=true;authenticationScheme=JavaKerberos)
    If client fails to connect, what is the client error messages? (see above)
    Is the client remote or local to the SQL server machine? [Remote | Local]
    Is your client computer in the same domain as the Server computer? (Same domain | Different domains | WorkGroup)
    [2] Server side:
    What is the MS SQL version? [ SQL Sever 2008]
    Does the server start successfully? [YES ] If not what is the error messages in the SQL server ERRORLOG?
    If SQL Server is a named instance, is the SQL browser enabled? [NO]
    What is the account that the SQL Server is running under?[Domain Account]
    Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? [YES ]
    Do you make firewall exception for SQL Browser UDP port 1434? In SQL2000, you still need to make firewall exception for UDP port 1434 in order to support named instance.[YES | NO | not applicable ]
    I currently can login from client using ms odbc sqlcmd (linux) version with trusted Kerberos connection.
    which tells me there is no problem with firewall.
    Tips:
    If you are executing a complex statement query or stored procedure, please use execute() instead of executeQuery().
    If you are using JDBC transactions, do not mix them with T-SQL transactions.
    Last but not least:
    gene

    Saeed,
    Not being versed in JAVA, I'm not sure what you're telling me. Can you tell me if this looks good? BTW, I did find out that JDBC is installed on the server as part of Coldfusion and this is what I was told:
    macromedia.jdbc.oracle.OracleDriver is 3.50
    macromedia.jdbc.db2.DB2Driver is 3.50
    macromedia.jdbc.informix.InformixDriver is 3.50
    macromedia.jdbc.sequelink.SequeLinkDriver is 5.4
    macromedia.jdbc.sqlserver.SQLServerDriver is 3.50
    macromedia.jdbc.sybase.SybaseDriver is 3.50
    Below is what I think will work, but I know it won't because of the semi colons. Can you help me fix it?
    I've the things that I think need changing are in bold.
    Thanks!
    ======
    private void dbInit()
    dbUrl = "jdbc:odbc:DRIVER={SQL Server};Database="DATADEV";Server=VS032.INTERNAL.COM:3533;", "web_user";
    try
    Class.forName("macromedia.jdbc.sqlserver.SQLServerDriver ");
    catch(Exception eDriver)
    failedDialog("Driver failed!", eDriver.getMessage());
    private void dbOpen()
    if(paramServerIP.indexOf("datadev") >= 0)
    dbPswd = "password";
    else
    dbPswd = "password";
    try
    dbCon = DriverManager.getConnection(dbUrl, paramDbUserStr,
    dbPswd);
    dbStmt = dbCon.createStatement();
    dbStmt.setEscapeProcessing(true);
    catch(Exception eDbOpen)
    failedDialog("Failed to open db connection!",
    eDbOpen.getMessage());
    private void dbClose()
    try
    dbStmt.close();
    dbCon.close();
    catch(Exception eDbClose)
    failedDialog("Failed to close db connection!",
    eDbClose.getMessage());
    }

  • Need help with thinkvantage access connection

    Here a log file with new access connection:
    Connection status:  Disconnected
    Cause:  Driver disconnected while associating.
    Error code:  229378
    Recommended actions:
    Verify that the encryption settings (WEP/TKIP/AES) specified in this profile match those expected by the wireless network.
    Verify that the wireless adapter in your computer has not been restricted from accessing the radio channels being used by the wireless network.
    If the problem persists, contact your network administrator and provide the troubleshooting information below.
    Adapter Details
    Adapter name  11a/b/g Wireless LAN Mini PCI Express Adapter                  
    Adapter type  Wireless LAN                                                   
    Adapter speed  54.0 Mbps                                                      
    Driver/Firmware version  7.6.0.96/ N/A                                                  
    Adapter status  Enabled                                                        
    Connection Status  Disconnected                                                   
    Disable unused cards?  Yes                                                            
    TCP/IP Settings
    DHCP enabled?  Yes                                                            
    Append parent suffixes of the primary DNS suffix?  Yes                                                            
    Register connection's DNS suffix in registration?  Yes                                                            
    Register connection's DNS suffix in DNS registration?  Yes                                                            
    Enable LMHOSTS Lookup?  No                                                             
    NetBIOS setting  "Default"                                                      
    Wireless Settings
    Network name (SSID)  linksys                                                        
    Connection type  Access point                                                   
    Wireless mode  Auto                                                           
    Security encryption  None                                                           
    System Information
    System model  7732CTO                                                        
    BIOS version  7LETB7WW (2.17 )                                               
    Operating system version  Windows Vista,  Service pack 2                                 
    Access connections version  5.31                                                           
    Access Point scan list
    Network name (SSID)              Wireless mode  MAC address                   Signal strength Channel
    linksys                          802.11g        00:1C:10:54:65:B6              24%            11
    Global Settings
    Network
     Allow all users of this system to switch to any existing location profile  -> No
     Allow the wireless LAN radio to be turned off when inactive  -> No
     Allow selection of location profiles with Fn+F5 On Screen Display menu  -> Yes
     Enable autodeletion of unused profiles  -> Yes
    Notifications
     Show ThinkVantage Access Connections status icon in task tray  -> No
     Show wireless status icon in task tray  -> No
     Display the progress indicator window when a profile is being applied  -> Yes
    Preferences
     Enable sound effects  -> Yes
     Do not show balloon tips from the Access Connections system tray icon  -> Yes
     Show WiMAX page as default on Main GUI  -> No
    Automatic location profile switching list
     Include Ethernet connections in automatic switching and prompt me to save Ethernet ports  -> Yes
     When no other connections are available, connect through Wireless WAN or WiMAX  -> No
    Wireless priority list
    Selection    Priority     Location profile name                                            Connection order                 Connection details             
    No                  1     linksys                                                          Wireless LAN                     SSID: linksys                  
    Log File
    Debug Log is enabled
    It didn't happen when I use old version. Can anybody help me?

    Are you getting any error message while connecting to ds..?
    Are you able to go online on wired computer...?
    Are you able to go online on any wireless computer on your network..?
    Open the router setup page and under the wireless tab,Change the Channel width to 20MHz only and Channel to 11-2.462GHz and click on save settings...Under the Advanced Wireless Settings...Change the Beacon Interval to 75,Change the Fragmentation Threshold to 2304,Change the RTS Threshold to 2304 and Click on Save Settings... 
    Now,check.

  • Need help in DB2 JDBC connection from JDeveloper extension

    Hi,
    I am using JDeveloper extension to build my application. Here in the preferences, I have a UI in which I need to specify DB2 database connection parameters for establishing JDBC connection. After copying the required driver jar and license jar to the extension folder and specifying the CLASSPATH in extension.xml file, I am able to get the DB Connection. But the issue here is, I do not want the user to copy the driver jars to the extension path and neither to hardcode the driver CLASSPATH in extension.xml. Instead, if the user loads the driver jar in the CLASSPATH using command line, after launching JDev plug-in, I need to still be able to connect to the DB2 JDBC which is not happening. I am getting the error which says "Missing class com.ibm.db2.jcc.DB2Driver". I have ensured that the CLASSPTH is set for the driver and licensing jars for DB2. How can I get rid of this error without specifying the classpath in extension.xml file.
    Thanks,
    Sudha.
    Edited by: sudha.singh on Dec 13, 2010 1:08 AM
    Edited by: sudha.singh on Dec 13, 2010 1:08 AM

    drivers for DB2 for the JDBC adapter.
    1. db2jcc.jar
    2. db2_license_cu.jar
    3. db2_license_cisuz.jar
    Driver = com.ibm.db2.jcc.DB2Driver
    URL = jdbc:db2://<hostname>:5021/<dbname>:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvjcdif.htm
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc/doc/t0010264.htm

  • Error connection Oracle to SQL Server using tg4msql, HELP Please....

    Hi, my name is Gregory,
    I am a newbie in oracle forum here, and need some help from the database guru here...
    I am trying to create the database link from Oracle database to SQL Server.
    here are the information:
    host name of OracleDB = a3500
    host name/Ip of SQL Server = 172.16.1.58
    SQL Server database name = CKS_VSSD
    i had create the new initntchsql.ora file under tg4msql\admin folder, and i also had create the new listener.
    here is the file contains
    ############ initntchsql.ora ###################
    HS_FDS_CONNECT_INFO="SERVER=172.16.1.58;DATABASE=CKS_VSSD"
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    ############ listener.ora ######################
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (ADDRESS LIST=
    (ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\ora92)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = orclems)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = orclems)
    (SID_DESC =
    (GLOBAL_DBNAME = cps4)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = cps4)
    (SID_DESC =
    (PROGRAM = tg4msql)
    (SID_NAME = NTCHSQL)
    (ORACLE_HOME = C:\Oracle\Ora92)
    #################### tnsnames.ora #################
    NTCHSQL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = a3500)(PORT = 1521))
    (CONNECT_DATA =
    (SID = NTCHSQL)
    (HS = OK)
    and i had created databaselink named ntchsql
    then i select statement:
    select * from vssd50@ntchsql
    and error occured:
    ORA-02068: Following severe error from NTCHSQL
    ORA-28511: lost RPC connection to heterogenous remote agent using SID=%s
    ORA-28509: unable to establish a connection to non-Oracle system
    did i missed something on the configuration?
    oya... i also see other thread that said i have to comment
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    from sqlnet.ora file, and i did that, and the error still the same...
    can somebody help me?

    sorry my fault hehehee....
    here is the lsnrctl stat
    LSNRCTL> stat
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))(ADDRE
    SS LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 9.2.0.4.0 - Produc
    tion
    Start Date 16-FEB-2006 15:30:24
    Uptime 0 days 0 hr. 26 min. 57 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File C:\oracle\ora92\network\admin\listener.ora
    Listener Log File C:\oracle\ora92\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=1521))(ADDRESS LIST=(ADD
    RESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc))(ADDRESS L
    IST=(ADDRESS=(PROTOCOL=TCP)(HOST=a3500)(PORT=1521))))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=8080))(Presentation=HTTP
    )(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=a3500)(PORT=2100))(Presentation=FTP)
    (Session=RAW))
    Services Summary...
    Service "NTCHSQL" has 1 instance(s).
    Instance "NTCHSQL", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "cps4" has 2 instance(s).
    Instance "cps4", status UNKNOWN, has 1 handler(s) for this service...
    Instance "cps4", status READY, has 1 handler(s) for this service...
    Service "cps4XDB" has 1 instance(s).
    Instance "cps4", status READY, has 1 handler(s) for this service...
    Service "orclems" has 1 instance(s).
    Instance "orclems", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    thanks for helping.... :-)

  • Help with copying SP List data to SQL Server

    I need to read some data from a SP list and copy it to a table in SQL Server.
    Visual Studio  BIDS 2013. SharePoint 2010. Planning to migrate to 2013 this year. I tried to use the
    SP Data source/destination adapter with SSIS, but learned that I can't with Visual Studio 2013. I'm really looking for any way to read data from a SP list and import it into a SQL database (SQL 2014). Haven't found anything online that has worked for me the
    way they say it should (such as OData connection in SSIS). Maybe it's version issues.
    Does anyone have a solid step-by step to do this? I am not a C# developer...

    Hi,
    According to your description, my understanding is that you want to read SharePoint list data and copy it to SQL Server table.
    Hatim's option is a way to achieve it manually.
    If you want to do it automatically, I suggest you can create a console application to read SharePoint list using CAML Query and Client Object Model, Then use SqlConnection object to connect database, then you can insert record using SqlCommand object.
    Here are some detailed code demos for your reference:
    http://www.codeproject.com/Articles/399156/SharePoint-Client-Object-Model-Introduction
    https://msdn.microsoft.com/en-us/library/ms233812.aspx
    Thanks
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • Need help trouble shooting Database Gateway for MS SQL Server setup, getting ORA-28546 error

    Dear All,
    I am trying to setup Oracle Database Gateway for MS SQL Server(I don't have admin access to the MS SQL Server).  When I try to test the dblink connection, I get the following error.
    I issued select * from dual@xyz;
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=dg4msql)))
    ORA-02063: preceding 2 lines from xyz
    28546. 0000 -  "connection initialization failed, probable Net8 admin error"
    My setup is the following.
    1. Oracle 11gR2 running on Oracle Linux 6, the same version gateway is installed on the same server, but different home directory.
    2. Oracle DB home directory is /u01/app/oracle/product/11.2.0/dbhome_1, gateway home directory is /u01/gateway.
    3. I use the same listener.ora file for both the db and the gateway.
    4. the contents of my listener.ora, tnsnames.ora and the initdg4msql.ora are below.
    /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          #(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
          (ADDRESS = (PROTOCOL = TCP)(HOST = db.abc.com.tw)(PORT = 1522))
    mssql =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME=db.abc.com.tw)
          (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
          (SID_NAME=orcl)
    SID_LIST_mssql =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME=dg4msql)
          (ENVS=LD_LIBRARY_PATH=/u01/gateway/dg4msql/driver/lib:/u01/gateway/lib)
          (PROGRAM_NAME=/u01/gateway/bin/dg4msql)
    /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = db.abc.com.tw)(PORT = 1522))
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = db.abc.com.tw)(PORT = 1522))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.abc.com.tw)
    dg4msql  =
      (DESCRIPTION=
        (ADDRESS=(PROTOCOL=TCP) (HOST=localhost)(PORT = 1521))
        (CONNECT_DATA=(SID=dg4msql))
        (HS=OK)
    /u01/gateway/dg4msql/admin/initdg4msql.ora
    HS_FDS_CONNECT_INFO=[192.168.0.1]:1433//XIETEST
    # alternate connect format is hostname/serverinstance/databasename
    HS_FDS_TRACE_LEVEL=255
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    dblink was created using statement below.
    CREATE DATABASE LINK "xyz.abc.COM.TW"
    CONNECT TO SA IDENTIFIED BY
    USING 'dg4msql';
    Couple more things, that I have done to check the work above.
    [oracle@db admin]$ ping 192.168.0.1
    PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
    64 bytes from 192.168.0.1: icmp_seq=1 ttl=61 time=7.61 ms
    64 bytes from 192.168.0.1: icmp_seq=2 ttl=61 time=7.41 ms
    ^C
    --- 192.168.0.1 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1818ms
    rtt min/avg/max/mdev = 7.417/7.516/7.615/0.099 ms
    [oracle@db admin]$ tnsping dg4msql
    TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2013 10:53:11
    Copyright (c) 1997, 2009, Oracle.  All rights reserved.
    Used parameter files:
    /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP) (HOST=localhost)(PORT = 1521)) (CONNECT_DATA=(SID=dg4msql)) (HS=OK))
    OK (0 msec)
    [oracle@db admin]$ lsnrctl status mssql
    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2013 10:54:23
    Copyright (c) 1991, 2009, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     mssql
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                11-SEP-2013 10:09:46
    Uptime                    0 days 0 hr. 44 min. 37 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/db/mssql/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "dg4msql" has 1 instance(s).
      Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    Obviously, I would like to get this setup to work, but I also have couple other questions regarding this setup.
    1. When installing the gateway, it asks to run the root.sh script.  the root.sh script as for the following.
    Enter the full pathname of the local bin directory: [/usr/local/bin]:
    The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
    [n]: n
    The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
    [n]: n
    The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
    [n]: n
    is the above answer correct?
    Thanks for reading.

    Dear Klaus,
    I did start a new SQL*PLUS session
    The output of  /u01/gateway/bin/dg4msql is
    [oracle@db log]$ /u01/gateway/bin/dg4msql
    Oracle Corporation --- WEDNESDAY SEP 11 2013 14:45:06.604
    Heterogeneous Agent Release 11.2.0.1.0 - 64bit Production  Built with
       Oracle Database Gateway for MSSQL
    The output of env is
    HOSTNAME=db.abc.com.tw
    SHELL=/bin/bash
    TERM=xterm
    HISTSIZE=1000
    ORACLE_UNQNAME=orcl
    TMPDIR=/tmp
    QTDIR=/usr/lib64/qt-3.3
    QTINC=/usr/lib64/qt-3.3/include
    USER=oracle
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib:/lib:/usr/lib
    LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
    ORACLE_SID=orcl
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOSTNAME=db.abc.com.tw
    MAIL=/var/spool/mail/oracle
    PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
    PWD=/home/oracle
    LANG=en_US.UTF-8
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    HISTCONTROL=ignoredups
    SHLVL=1
    HOME=/home/oracle
    TMP=/tmp
    LOGNAME=oracle
    QTLIB=/usr/lib64/qt-3.3/lib
    CVS_RSH=ssh
    CLASSPATH=/u01/app/oracle/product/11.2.0/dbhome_1/jlib:/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/jlib
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    G_BROKEN_FILENAMES=1
    _=/bin/env

  • Help with a select statement from a SQL Server within a DTS !!

    Hello Gurus!
    I help with the script bellow, when I run it within DTS (in SQL Sever 2000), I got the error Invalid number/or not a valid month.
    Please bellow with the WHERE CLASUE '08/01/2001' AND '03/09/2002'
    And in the other hand I change this forma to '01-AUG-01' AND
    '03-MAR-2002', the DTS start and run witha successful messages, but it does not returns row, which is wrong.
    Somebady please help!
    Thanks Gurus!
    GET Total ANIs with Trafic By Area Code
    select
         substr(b.ct_num, 0,3) as Area_Codes,
         COUNT(DISTINCT B.CT_NUM) AS ANIS
    from
         wasabi.v_trans A,
         wasabi.V_Sur_Universal B,
         wasabi.V_Sub C,
         wasabi.V_Trans_Typ D
    where
         D.Trans_typ = A.Trans_Typ AND
         A.Sur_ID = B.Sur_ID AND
         C.Sub_ID = A.Sub_ID AND
         a.trans_stat != 'X' AND     
         a.Trans_DTTM >= '08/01/2001'AND
         a.Trans_DTTM < '03/09/2002 AND
         B.AMA3 = 'PHONE1'
         AND C.SUB_ID not in (100117)
    GROUP BY
         substr(b.ct_num, 0,3)
    ORDER BY
         Area_Codes

    I think that you need a "to_date" function eg
    change '08/01/2001' to to_date('08/01/2001','dd/mm/yyyy')

  • Need help with Apple TV connected to a Bose system

    I have a new Apple TV that I have installed with a Bose Lifestyle 28 home theater system connected by an optical cable.   The TV is also connected to a Directv box with the Directv box being connected to the Bose system via an Optical cable.  I get Dolby 5.1 when watching the Directv but when I put a movie from Netflix on the Apple TV, I get a message on the Bose:  PCM 2.0.  Does anyone have any ideas as to why I don't get Dolby 5.1 on this setup?

    DVI
    Some users with DVI have managed to get their TV's to work with DVI-HDMI cables. DVI carries no audio, so alternative connections need to be explored to enable audio. DVI doesn't necessarily support HDCP as well as other standards used by HDMI (which may or may not be an issue)
    Analogue
    There are hardware converters that will convert HDMI to various other types of output, however there are some issues with doing so that you should be aware of.
    HDCP
    HDCP compliant converters will not allow you to watch HDCP protected content such as that from the iTunes Store. Non compliant converters exist but we cannot discuss them under the Terms of Use for these communities.
    Resolution and aspect ratio
    I'm not aware of any converters that will scale the output from the Apple TV, any TV or projector which is used will need to be widescreen and support resolutions of 720p (Apple TV 2), 720p/1080p (Apple TV 3)
    DAC
    DAC (Example Only - Not a recommendation or suggestion that this is suitable in your circumstances)

  • I need help with Adobe Momentum Connect. Am I in the right place?

    I am trying to log on to an Adobe momentum Connect meeting. I am the host. When I click on the URL for the meeting the screen gets stuck in a never-ending screen saying "Loading Adobe Connect" I can enter the meeting with other computers but not my Vista laptop. Do I need to do something different to be able to gain access using my Vista laptop?

    Never heard of it, but try here... Connect General Discussion in the Connect forum.

  • Need help with foscam cameras connecting to AirPort Extreme N

    Greetings,
    I could really use some help from the AirPort gurus! I have an AirPort Extreme N base station, with firmware 7.4.2. I purchased a couple of Foscam FI8908W pan and tilt cameras. I am trying to get them to work on my home network, but cannot figure it out. Personally I think it might have something to do with port forwarding, but hec I just don't know. I have tried searching for answers, but came up empty. Here is a copy of the manual for anyone if interested <http://idisk.mac.com/wheelchairguy-Public>. I have been using VMware with XP to try and setup the camera, but the camera is not found with the IP Cam setup software. I thought I might be able to directly connect to my computer with an Ethernet cable, but no go there either. Also no go with an ethernet cable plugged to the camera into the base station. I just have no idea where or what I am doing wrong. If anyone can help me, I would be very grateful.
    Thanks,
    Mark

    Hi OneCog,
    We're also have broadband connected to TimeWarner. When I first got the camera I tried the same thing and had the same problem. I never read the docs and assume plug and play. So I just plugged the ethernet cable from my laptop to the camera directly and of course my laptop was connected wirelessly to the internet. It doesn't work that easily and don't worry about the cable modem, you never have to touch it's settings.
    I went to the http://foscam.us website and found these instructions that actually worked:
    Foscam IP Camera Instructions
    Software Insallation:
    Install from the Cd the IPCamSetup.exe file OR
    Or download the IPcamsetup.exe file from the website Foscam.us
    a) Go to the website Foscam.us
    b) Click the tool & support section (top middle section)
    c) Click on Download IP Camera Tools (for FI8908W or FI8904W)
    d) Click on IPCamSetup.rar (bottom left corner)
    e) Click on IPCamSetup.exe
    You should now have an IP Camera Tools Icon
    Hardware Installation:
    Plug the Ethernet network cable(grey wire) into the camera then into the router
    Plug the power adapter (black wire)into the camera and then into the power outlet
    Opening the Camera:
    Once` plugged in correctly, double click on the icon IP Camera Tools
    The Camera’s IP address will appear, double click on it to open the camera
    (If “subnet doesn’t match” appears , double click on it and check the box ’Obtain IP from DHCP server’ then click on OK)
    Login to the Camera:
    User: admin
    Password: (leave it blank)
    Click Login button
    NOTE: Press the first Login button if using internet Explorer or other browsers OR
    Press the second Login button if using Firefox, o r Google Chrome
    Test to see if working:
    Click on “Live Video”
    Connecting Camera to Wireless:
    Type your router Ip address unto your browser( press enter)
    (Don’t know your router IP address? SEE: Finding your router IP address)
    You may have to login or give your password. Do so.
    Under the word Wireless(on left) find ‘Channel and SSID’
    Click on ‘Channel and SSID’ write down(on paper) the SSID name
    Click on ‘Security” and write down Security type, Authentication, Encryption Technique and Pre-shared Key information
    Login back to the camera
    Double click on Ip camera tools
    Double click on camera’s Ip address
    User: admin
    Password: ( leave blank)
    Click the correct Login button for your browser
    Click on ‘Device Management’or ‘For Administrator’
    Click on ‘Wireless Lan Settings’
    Type in your SSID, Authentication Encryption technique and Pre-shared key info that you wrote down
    Press Submit
    Then wait 30 seconds
    Disconnect ethernnet network cable from the camera
    Disconnect the power plug from the camera
    Reconnect the power plug to the camera ( do not reconnect the network cable wire)
    wait till camera stops moving
    Login back to the camera
    a)Double click on Ip camera tools
    b)Double click on camera’s Ip address
    c)User: admin
    d)Password: ( leave blank)
    e)Click the correct Login button for your browser
    15. Chec k to see if camera is working by clicking on to ‘Live video’
    Connecting your Camera to the Internet
    Write down the local IP address of your camera
    (To find this address open IP Camera Tools)( it will display the IP address of the camera as htpp://[YourCamerasLocalIPAddress])
    Write down your router’s external internet IP address
    ( The easiest way to find this would be to Google “What is my IP address” and go to the first link which pops up and that is usually whatismyipaddress.com)
    Log in to your wireless router
    To do this you must enter the IP address of your router into your browser(enter)
    and then enter the username and password when prompted.
    ( If you are unsure of the ip address or username and password of your router, SEE Finding your Router IP Address )
    Directing incoming connections on your external IP address to your cameras local IP address
    a)Go through the options( on left side) find ‘DMZ’
    b)Click on DMZ
    c)set the DMZ IP address (also called “private”/”local” IP address”) to your cameras
    local IP address(by changing the last component of the number to the last or last
    two digits of your cameras IP address)
    d)Select enable option
    e)Save by clicking ‘Apply Changes’
    OR If you have more than one camera
    a)click on “Virtual Server” or “Port Forwarding”
    b) set the inbound port to 80 and the outbound port to 80
    c) Save by clicking ‘Apply Changes’
    Test it to see if you set it up correctly
    open a browser and enter your external internet ip address into the address bar and press enter
    You should arrive at your camera’s login screen if you successfully connected the camera to the internet
    NOTE: Please keep in mind that the camera’s IP address and the Internet’s external IP address can change at any time. Check and make sure that the IP addresses haven’t changed. If they have changed, use the new IP addresses.
    Finding Your Routers IP Address: (Internal)
    Refer to your router’s manual OR
    Retrieve your Routers Ip Address from Ip Camera Tool software
    Double Click on your IP Camera Tool Icon
    Then left click once on your Camera’s IP address
    Right click on it and choose ‘Network Configuration’
    The ‘Gateway’ number is your router Ip address ( write it down) OR
    view a list of default router IP addresses, usernames and passwords
    by Google searching “default router IP addresses”
    and clicking on the PDF titled “List of default Router Admin Passwords and Default Router IP” at: http://www.answersthatwork.com/DownloadArea/ATW_Library/Networking/Network__4-List_of_default_Router_Admin_Passwords_an d_IPaddresses.pdf
    Go to ‘find’ and type in the brand name of your router (press enter)
    Write down your routers IP address
    Message was edited by: dollarbrand

  • Need help with a printer connected to a windows home server

    I have a Windows Home Server that has a Brother laser printer connected to it via a USB cable. The printer driver is installed on the WHS and on each PC. My PCs on the network find the printer and can print to it with no problems. But, with my MBA, I'm having issues. I can see the printer as part of the server when installing/setting it up on the MBA and found the Ma printer driver from Brother and installed it on MBA. However, print jobs I send it never print out. What did I do wrong?

    Your MBA should be able to detect the printer and locate the driver, install it and mount the printer. I have an HP5180 color all in one, which I have connected to my Windows PC, and my MBA sees it and prints to it just fine. Have you looked to see if Brother has a Mac driver for it?

  • Need help with roaming user profiles, home folder on server - symptoms after Windows reinstall on workstation

    Hello. I have deployed roaming user profiles in our home office. We are using Windows Server 2012 on our datacenter computer, which has a partition with all our home directories. All was working beautifully for quite some time.
    I re-installed Windows 8.1 Pro on my laptop. I am able to log in to my profile from the new installation.
    The problem that has started happening seems to be some sort of permission problem with my home directory, but I am not sure how to go about diagnosing it. I haven't changed anything in the policies or remote profiles.
    The symptoms:
    When I try to run an installation program from my documents/downloads/desktop (remote) folders, UAC asks for the administrative credentials as expected, and then I am asked to enter my user credentials. If I do so, I sometimes get a message about duplicate
    connections to a share, and the installation program does not execute. "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or
    shared resource and try again." I am confused, because I am entering credentials for the same user name as the one I am logged in with.
    To work around, I have to copy the executable to a folder on my workstation hard drive and run it from there.
    Another symptom is when I download anything from the internet, chrome will reflect a "Failed - Download error" message with the download. If I re-attempt the same download several times, eventually it will succeed. This appears to be due to my
    downloads folder being on the remote computer.
    I am looking for any guidance on how to remedy these symptoms. I suspect there must be a setting I have forgotten to change in the local computer, because nothing has changed on the server since it was operating properly.
    Thank you for your time.

    Hi Exintrovert,
    Thanks for posting here.
    According to your discription above, you can check the microsoft artical as below:
    https://support.microsoft.com/en-us/kb/938120/
    Would you please have a try the work around in the artical and then let us know the update?
    Looking forward to your feedback.
    Best Regards,
    Elaine 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

Maybe you are looking for

  • Pass the value of a variable in a KM Option

    Hi Gurus, We have developped a LKM using existing DBlinks to extract data. Since we are not allowed to created DBlinks ourselves on the source DBs, we have added an option in the KM to specify the name of the DBlink that should be used. It worked wel

  • Does anyone know of a reliable game controller for the iMac?

    Thanks.

  • Quicktime won't play MPEG-4

    Hello, am I missing something, as I have Quicktime Pro and i want to play a clip with the following codecs: codec: MPEG-4 Video, AMR Narrowband, MPEG-4 SDSM, MPEG-4 ODSM channel count: 1 I get the sound, but image is pixalated. Do I have to tweak or

  • Installer build wants wrong runtime engine

    LabVIEW 8.6 Windows XP Pro When I build the installer for my application, it wants me to have available the install disk from November 2007. Expanding the list for that disk, I find that it wants the runtime engine for version 7.1.1. If I remove NI-D

  • Resetting problems

    i just bought a new ipod touch and want to give my old 8gb 1st. generation ipod touch to a friend. im trying to get it back to its factory settings and clear off my old stuff so he can start over from scratch. using itunes, im trying to restore facto