Connection from Oracle to DB2 LUW and Asian data insertion/selection.

Hello

I have configured the connectivity between Oracle and DB2 LUW, using DG40DBC but my requirement is to see the characters Asian (Chinese, Japanese, etc). Then, when I select the data through DB DB2 link I get of the question marks (?). We need to change the settings in the configuration files to support this language?

Any help is very appreciated!

Thank you
Steve.

Isql instruction is not able to display characters unicode is partly justified. In my (Linux with LANG value UTF8) env it displays Chinese and Japanese characters.

You can also try to use the unicode equivalent to "isql" called "iusql. In addition, please provide the character set of your DB2 database.

Published by: kgronau on January 16, 2012 06:31

Also DG4ODBC displays correctly using your ODBC from above and these DG4ODBC settings:
HS_FDS_SHAREABLE_NAME =/home/odbc64/unixODBC/2.3/lib/libodbc.so
HS_NLS_NCHAR = UCS2
HS_LANGUAGE = AMERICAN_AMERICA. AL32UTF8

For a DB2 database using this character set parameter:
Database code page = 1208
Database of codeset = UTF - 8

Tags: Database

Similar Questions

  • Java class to connect to Oracle Database Express Edition11g and URL

    Can I use Oracle SQL Developer to do or use it as the value of the URL for the host name?

    I'm just starting to learn Java and with it, learn how to use the Oracle Database Express Edition11g and with it the Oracle SQL Developer...

    At this point, I have the Express Edition is installed and the SQL Developer installed and were able to establish a connection and to run a query and get a result.

    I use Eclipse for JAVA.  I have a work of class that performs a query on a database/table in MySQL.

    So now I'm eager to make the same use as the database Oracle Database Express Edition11g engine.

    And this means that two different versions of JAVA that I need to get the right to be able to do.

    The first is the value of the url variable.

    I now like

    String url = "jdbc:oracle:thin:@localhost";

    then

    Class.forName ("oracle.jdbc.OracleDriver");

    and then

    Connection connection = DriverManager.getConnection (url);

    The thing I'm puzzled on is in the URL where I 'localhost' was supposed to be the term generic and not so much as the text, you should use.

    I see in Web sites like 3 connection to Oracle Database XE

    and decrease example 3-2 by specifying the URL of database using the XE Client Setup

    There I see

    JDBC:driver_type: [username/password] @[//]host_name[: port] [XE]]

    And just what is and what is not is explained here.  So what I ended up with was

    String url = "jdbc:oracle:thin:@localhost";

    So if it was just a text to rest for a name I wonder just such a value or name might really where.

    I noticed that view that an app called "Oracle JDeveloper" has been used to create the values.   I don't have such a thing, or at least I don't think I do.

    Do I need?

    I have Oracle SQL DEVELOPER, where I used the following to connect to the database of the XE.

    My choice for Oracle's SQL Developer Help

    Name of connection: Connection1

    User name: Rod

    Password: myOracle11

    Host name: localhost

    Port: 1521, which is the default value

    SID: xe

    Above so I have to host name set to localhost

    Can I use Oracle SQL Developer to do or use it as the value of the URL for the host name?

    1. I do nothing

    2. While wouldn't you say it

    3. no results from the earlier assignment.

    I asked "'can I use Oracle SQL Developer to do or use it as the value of the URL for the host name?" "

    I showed the choice that I used in SQL Developer to connect to the schema.  And I was wondering, now that I had done this case those are the values that I could use in the Java class that I wrote.  The web site in the first post of this thread showed connection but he was using JDeveloper and SQL Developer.

    So I was wondering if the connection that I made using SQL Developer would do the same trick, and if I could use the values I did there.

    I'm happy to announce that YES, The values used to connect using SQL Developer work exactly like JDeveloper.

    So, given that in SQL Developer for Hostname I chose the value "localhost" "Rod" Username and password "myOracle11".

    I did the following JAVA CLASS that worked:

    package VC_2_9;

    Java for COBOL - copyright 1999 Doke & Hardgrave programmer

    import java.sql. *;

    public class DataBaseDemoOracle

    {

    Public Shared Sub main (string args [])

    {

    String CUST_LAST_NAME;

    / * String url = "jdbc:mysql://localhost/visualcafe";                     */

    String url = "JDBC: thin: @localhost';"

    / * String sqlQuery = "SELECT Name, SSNo, address, telephone OF THE customer;    */

    String sqlQuery = "SELECT CUST_LAST_NAME FROM DEMO_CUSTOMERS";

    //                                               |||||||||||||||

    Try

    {

    Class.forName ("oracle.jdbc.OracleDriver");

    Connection connection = DriverManager.getConnection (url, "Rod","myOracle11" ");

    Statement statement = aConnection.createStatement ();

    ResultSet rs = aStatement.executeQuery (sqlQuery);

    Boolean more = rs.next ();

    (more)

    {

    CUST_LAST_NAME = rs.getString (1);

    /* */

    System.out.println ("name:" + CUST_LAST_NAME);

    more = rs.next ();

    }

    RS. Close();

    aStatement.close ();

    aConnection.close ();

    }

    catch (ClassNotFoundException e)

    {System.out.println ("Exception caught" + e) ;}}

    catch (SQLException e)

    {If (e! = null)}

    {System.out.println ("SQLException taking" + e);}

    e = e.getNextException ();

    } / / end of while loop

    } / / end of capture

    } / / main end

    } / / end DataBaseDemoOracle.java

  • Problem with the connection from Oracle to MS Excel - 64 bit

    Hello

    I have problem connecting Excel to oracle 11.2 using DG4ODBC.

    OS - Windows 7 64 bit

    Database version: - Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64 bit

    Created system using ODBC DSN:

    Name of Data Source = test12

    Oracle home path:-D:\app\11g64db\product\11.2.0\dbhome_1

    Contents of the initdg4odbc.ora file:

    # This is an example of initialization file of the agent that contains the HS settings

    # necessary for the database to ODBC gateway

    #

    # HS init parameters

    #

    Test12 = HS_FDS_CONNECT_INFO

    HS_FDS_TRACE_LEVEL = 255

    #

    # Required for the non-Oracle system environment variables

    #

    #set < varenv > = < value >

    Content of listener.ora:

    listener.ora # Network Configuration file: D:\app\11g64db\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora

    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (GLOBAL_DBNAME = live)

    (ORACLE_HOME = D:\app\11g64db\product\11.2.0\dbhome_1)

    (SID_NAME = live)

    )

    (SID_DESC =

    (PROGRAM = dg4odbc)

    (SID_NAME = dg4odbc)

    (ORACLE_HOME = D:\app\11g64db\product\11.2.0\dbhome_1)

    )

    )

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))

    )

    ADR_BASE_LISTENER = D:\app\11g64db

    Content of tnsnames.ora:

    tnsnames.ora # Network Configuration file: D:\app\11g64db\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

    # Generated by Oracle configuration tools.

    excel_test =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp)(HOST=localhost) (PORT = 1521))

    (CONNECT_DATA = (SID = dg4odbc))

    (HS = OK)

    )

    SCREW =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = live)

    )

    )

    Status of the listener

    LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on August 29, 2014 13:56

    : 11

    Copyright (c) 1991, 2013, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=localhost) (PORT = 1521)))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    TNSLSNR for Windows 64-bit version: Version 11.2.0.4.0 - Prod

    ction

    Start date August 29, 2014 13:34:58

    Uptime 0 days 0 h 21 min 12 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Listener parameter File D:\app\11g64db\product\11.2.0\dbhome_1\network\admin\l

    istener.ora

    Listener log file D:\app\11g64db\diag\tnslsnr\Est-Subramanya\listener\al

    ert\log. XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))

    Summary of services...

    Service "dg4odbc" has 1 instance (s).

    "Dg4odbc" instance, status UNKNOWN, has 1 operation for this service...

    Service 'live' has 2 occurrences.

    Instance of "live" status UNKNOWN, has 1 operation for this service...

    Instance of "live" READY State, has 1 operation for this service...

    Service 'visXDB' has 1 instance (s).

    Instance of "live" READY State, has 1 operation for this service...

    The command completed successfully

    DB Link:

    CREATE DATABASE LINK PUBLIC TEST123 USING 'excel_test ';

    error when querying of data:

    Select * from test@test123;

    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:

    ORA-02063: preceding line TEST123

    28500 00000 - "connection between ORACLE and a non-Oracle system has sent this message:

    * Cause: The cause is explained in the forwarded message.

    * Action: See documentation for the non-Oracle of the transmission system

    Message.

    Error on line: 1 column: 20

    Appreciate the help in advance...

    Thank you...

    This problem is solved. It was because of the excel 12.0 version when creating data source in administrative tools.

    Thank you.

  • sqlplus / as sysdba not connect after oracle xe name sid and service change

    Hello

    I changed the SID and Service name of Oracle XE "XE" to "CTR".
    After that, I couldn't connect is no longer at the "sqlplus / as sysdba.
    ERROR:
    ORA-12560: TNS:protocol adapter error

    My tnsnames.ora:
    CTR =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ng-w2405ztfio0d)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CTR)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    )
    )

    My listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (= Extproc PROGRAM)
    )
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (= Extproc PROGRAM)
    )
    (SID_DESC =
    (SID_NAME = CTR)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP) (HOST = ng-w2405ztfio0d)(PORT = 1521))
    )
    )

    DEFAULT_SERVICE_LISTENER = (CTR)

    Help me please
    I thank

    Hello

    Yes, the host is Windows Server 2003.
    I created a new service for the new SID. Followed all the steps to make the change

    How did you create the Oracle database Service? Have you used ORADIM to remove and create the new Instance?

    http://download.Oracle.com/docs/CD/B19306_01/win.102/b14304/create.htm#i1006533

    If you have created the new OracleServicePRTLservice, check who is started correctly.

    Then try a connection as follows from a DOS window:

    set ORACLE_SID=PRTL
    sqlplus / nolog
    connect / as sysdba
    

    Hope this helps.
    Best regards
    Jean Valentine

  • Unable to connect to oracle DB using VBA and you are prompted with the error:-the client components and Oracle network have not been found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or installation of the

    Hello

    It would be helpful to me if someone can give me instructions on setting the version of driver or oracle client required to connect to the the Oracle DB using excel VBA

    My config: -.

    Windows - 8-64 bit

    Excel 2013-32 bit

    The components of the client / I should install, and how to solve the question below...

    I tried the VBA code... but you are prompted with the error message above

    Void Oracle()

    Con Dim As ADODB. Connection

    Dim rs As ADODB. Recordset

    Dim query As String

    The con value = New ADODB. Connection

    Set rs = New ADODB. Recordset

    strCon = "Driver = {Microsoft ODBC for Oracle}"; "." & _

    "CONNECTSTRING = (DESCRIPTION ="& _.

    "(ADDRESS =(PROTOCOL=TCP)"& _

    "(HOST = HostNumber)(PORT=PortNumber))" & _

    "(CONNECT_DATA = (SID = SIDNumber))); UID = username; pwd = password; »

    con. Open (strcon)

    If err. <>Number 0 then

    MsgBox ("Oracle error:" & vbCrLf & err.) Description)

    On the other

    MsgBox ("Oracle DB Connection successful.")

    End If

    End Sub

    I'll replace it with the values of host origin...

    Thanks for the suggestion you till u gave...

    complete solution is in the link below...

    https://itkbs.WordPress.com/2014/07/28/how-to-install-ODBC-driver-for-Oracle-in-Windows-7/

  • Connection from Oracle to Sql Server (64-bit on Windows 2003)

    Hello

    I want to install heterogeneous connectivity between our Oracle 10 g version 10.0.2.0.1 (on 64-bit Windows 2003) to a SQL Server on another computer on the network. I found that HSODBC is removed, and that this is is not supported on 64-bit Windows systems. So, I couldn't make it work obviously.

    It is even possible to set up a heterogeneous connectivity in our situation (using DG4ODBC or something?)
    If so, could someone point me in the right direction on where to start?

    Thank you!

    (I'm not a dba, previous attempt using hsodbc cost me two weeks before finding out that it doesn't even work...)

    Edit:
    Oh, and it is possible to display the Metalink notes as (Metalink Note: 361676.1, is generic connectivity available on The LINUX or Windows 64 - bit Platforms?) without a support contract? Or only customers with a support contract have the right to know that some features are not available?

    Published by: user574699 on March 18, 2009 06:24

    According to your last update, your actions are:
    1.) upgrade Oracle on SERVER1 to 10.2.0.4.0-online Yes
    2.) DG4ODBC is not certified to run on SERVER1, then I should install on SERVER2 tell you? That there is no installed Oracle... ?
    Yes, install it on the server of SQL Server 32-bit.

    The gateway comes with a complete Oracle SQL * Net listener. Just so install the 32-bit to SQL Server and configure the Oracle listener as well as the bridge and the ODBC driver.
    Now on the Oracle database server adds a TNSNAMES file. Entry of ORA that points the listener to the Oracle of the gateway on the SQL Server computer. The link of database within the 10 g, which oracle databased then connects using tnsnames.ora alias in the SQL Server computer that has an active Oracle listener that generates connection DG4ODBC. DG4ODBC executable load DG4ODBC configuration file and connects to SQL Server you have configured.

    The Oracle gateway are very flexible. You don't need to install them on the Oracle database machine. They can be installed independently; even on a 3rd machine if you do not want to touch the SQL Server computer. In this case, the scenario is similar as described above; only difference now is the driver ODBC to connect to a SQL Server computer on a remote host.

  • I was working on a scenario week last on my PC at home. Yesterday, I tried to connect from my computer at work, and I was asked to reset my password before continuing. I did it according to the instructions, but when I have access to history, I found my s

    I was working on a scenario week last on my PC at home. Yesterday, I tried to loggin to my work computer, and I was asked to reset my password before continuing. I did it according to the instructions, but when I was able to access the history, I found that my script is not there. How can I get it back?

    Looks like you worked in the desktop application in the history of offline through your PC at home.

    You can check by logging into the desktop app from your home PC and checking if the word "offline" appears after the name of your account at the top right of the story.

    If that's true then please switch to online mode.

  • Connection to Oracle, Microsoft SqlServer with unixODBC and TDSodbc

    Hello

    I'm working on a requirement to connect from Oracle 11 g DB for Microsoft SQL Server 2008. After serching for the options available on the web I found the follwing link

    Connectivity ODBC - http://www.dbapool.com/Articles/06280701.html using UNIX ODBC and FreeTDS

    I have configured everying as stated in the article, but I'm stuck to test the connection.

    After a few days work, I am able to do successful isql connection but my earpiece and tns behave odd.

    I configured and started the listener called mstest but when I started it says it does not support all served

    Here's my listener.ora


    MSTEST =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST=xxxxx.xxx.xxxx.com) (PORT = 1523))
    )
    )
    )


    SID_LIST_MSTEST
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = usr/oracle/product/11.2.0.2)
    (SID_NAME = mstest)
    (PROGRAM = dg4odbc)-> I changed to dg4odbc hsodbc program since in the 11.2.0.2
    )
    )



    Summary of endpoints listening...
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=xxxx.xxx.xxx.com) (PORT = 1523)))
    The listener supports no services
    The command completed successfully


    any help is very appreciated.

    Thank you
    Steve.

    Edited by: user8927749 January 6, 2012 06:54

    Steve,
    The configuration files look all right, but can do you that there is at least a space at the beginning of each line except the first in each case.
    They lost when you paste in the thread, but please check.
    You can also view the listener log to see if this gives errors or messages about why he has no services?

    Kind regards
    Mike

  • Connection to Microsoft SQL Server 2008 from Oracle 11 g

    Hello

    I'm working on a requirement to connect from Oracle 11 g DB for Microsoft SQL Server 2008. After serching for the options available on the web I found the follwing link

    Connectivity ODBC - http://www.dbapool.com/Articles/06280701.html using UNIX ODBC and FreeTDS

    I have configured everying as stated in the article, but I'm stuck to test the connection.

    Isql both tsql not working and giving the below error.

    locale is "" fr_FR. UTF-8 ".
    locale charset is 'UTF-8 '.
    using the set of characters by default "UTF-8".
    Error 20009 (9 severity):
    Unable to connect: Adaptive Server is unavailable or does not exist
    Operating system error 111, 'connection refused '.
    There was a problem connecting to the server

    $ isql - v mstest
    [S1000] [unixODBC] [FreeTDS] [SQL Server] Unable to connect to the data source
    [S 08, 01] [unixODBC] [FreeTDS] [SQL Server] Impossible to connect: Adaptive Server is unavailable or does not exist
    [ISQL] ERROR: Not impossible not SQLConnect

    Here are my files.

    FreeTDS.conf


    [MSTEST]
    Host = 19.x.x.x
    #instance = xxx
    port = 614xx
    TDS version = 8.0


    ODBC.ini

    [MSTEST]
    Driver = TDS
    Description = MS SQL Test
    Trace = Yes
    Trace file = /tmp/mstest_odbc_ini.log
    Server = 19.x.x.x
    #Servername = xxxx
    Address = 19.x.x.x
    Database = multilingual
    TDS_version = 8.0
    Port = 614xx

    odbcinst.ini

    [TDS]
    Description = FreeTDS driver
    Driver = /usr/local/lib/libtdsodbc.so
    Setup = /usr/local/lib/libtdsodbc.so
    Trace = Yes
    Trace file = /tmp/freetd.log
    FileUsage = 1

    Has anyone tried this before... Any help is very appreciated.

    Thank you
    Steve.

    I tried and it worked. What's in your trace files? You specified two different, both files in / tmp. Journal will be in one of them. Please, view the contents of the log file. In addition, the problem may be with the SQL Server. ODBC 20009 error is "error of numerical value": http://www.wiki-errors.com/err.php?wiki=20009

  • Connect my Sql from Oracle

    Hi all

    I installed Oracle 10.2.0 Linux and My Sql installed in Windows, can someone explain me how to connect from oracle to my sql?

    Thank you
    Prakash S

    Prakash,
    You can use the database for ODBC (DG4ODBC) 11g gateway to connect to MySQL from Oracle.
    See the following notes in My Oracle Support for more details and information-

    Note to master note.1083703.1 for the Oracle Gateway products

    Note.233876.1 Connection Options abroad of banks of data and databases non-Oracle

    Note.466228.1 how DG4ODBC Setup on Linux x 86 32 bit
    Note.561033.1 how to Setup DG4ODBC on 64 bit OS Unix (Linux, Solaris, AIX, HP - UX)
    Note.466225.1 How to Setup DG4ODBC (database gateway for ODBC Oracle) on 32-bit Windows
    Note.1266572.1 How to Setup DG4ODBC (gateway for ODBC Oracle database) on 64-bit Windows operating systems

    Your RDBMS 10.2 should be 10.2.0.4 or 10.2.0.5 use DG4ODBC.

    Kind regards
    Mike

  • DB Link from Oracle to SQL Server error

    Dear friends,

    I need met some select on tables that are in SQL Server 2005 from Oracle 10 g.

    I followed the steps:
    http://www.DBA-Oracle.com/t_heterogeneous_database_connections_sql_server.htm

    I could ping TNS who is successful, but only when I run a select I get this error.

    ERROR on line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Cannot retrieve the text of the message NETWORK/NCR 65535
    ORA-02063: preceding 2 lines of SQLS

    I checked my dsn name is in small caps completely everywhere where it is used (since its proposed in many sites).

    Please guide me.

    I'm looking for really come to a solution.

    Kind regards

    Nith

    similar use to Setup ODBC and datasource
    http://www.databasejournal.com/features/Oracle/article.php/3442661/making-a-connection-from-Oracle-to-SQL-Server.htm
    and then create server link in sql server after testing WLAN with oracle

  • Data migration from Oracle to SQL Server

    Hello

    I have the Oracle database in one or several table, I also blob data, i.e. images are stored, now I want to move that data to the sql server database, which is the best way to do this?

    I would like to test for a migration of the table that contains the image data in the Oracle database and invade the SQL Server table.

    How to test for an Oracle table data to SQL Server migration?

    But the first thing I want to confirm is that if the Image from Oracle DB to SQL Server DB data are possible? is there something must be supported during the migration?

    Thanks in advance.

    Kind regards

    Vishal

    Published by: 968331 on October 31, 2012 02:31

    I think that it is supported. The equivalent data type in sql server is IMAGE/varbinary (max)

    See the bottom of the article for the mapping of data types:

    http://weblogs.sqlteam.com/jamesw/archive/2010/07/28/datatypes-translation-between-Oracle-and-SQL-Server-part-1.aspx

  • Extract data from Oracle into excel file

    Hello

    I have a requirement where in I need to extract data from Oracle into excel file and the worksheet excel name should be 'given '.
    for example. Excel 'AR Data_DDMMYY' file name and the name of the "Data" sheet excel

    I used the UTL_FILE API to extract the data delimited by tabs that you can open in excel, but it's not exactly an excel file as the name of the worksheet is the same as the name of the file.

    I tried to use utl_file.fcopy and frename.

    Is it possible to do it using PLSQL?

    Select * from version of v$.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Example Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    
    --select * from dba_directories
    
    begin
    
    
    f := utl_file.fopen(dir, file_name, 'W');
    
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    
    for i in c
    loop
    
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    
    end loop;
    utl_file.fclose(f);
    
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    
    end;
    Thank you
    Imran

    Hello

    I tried to change the .xlsx to .xls and it gives a note at the opening of the file "the file you are trying to open, abc.xls, is in a different format that it is specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? »

    When you rename the file does not solve your problem.
    Anton Scheffer package generates a file in format xlsx Office 2010. When rename you it with the .xls extension, then Office 2010 will give you the warning that the file format does not match the extension.

    but the requirement has to generate excel 2003 file.

    The xml_spreadsheet package writes a format that was introduced with Office 2003, but you must use .xml as extension in other Office 2010 will give you the same caveat.
    To write the real xls version (binary), you can use Apache POI. You will need to import Java classes in your db and write a PL/SQL wrapper. Or you can use one of the options above, writing the output to a windows server and then use Excel to open and save in the required format.

    You must decide whether it is easier to write the binary xls format or to convince the customer to accept other formats that can be opened with Excel.

    Concerning
    Marcus

  • Public link connected from a sys user database

    people, pls aplogise me if this is a silly question...

    I create a public database link connected through "sys" username (sysdba role) on the source db

    I don't use 'connect to' clause and therefore connected default value 'sys' will be taken for the user connection

    sys users everywhere to the db of the source and target have the same password

    Now, when I query select * from dual@linkname

    of the source database, it does not work... Why?

    Also tried connecting from another user, same problem.

    Error returned:

    SQL > select * from dual@db4_jpnprd;
    Select * from dual@db4_jpnprd
    *
    ERROR on line 1:
    ORA-01017: name of user and password invalid. connection refused
    ORA-02063: preceding the line of DB4_JPNPRD

    Please help... as it's quite urgent... thnx

    A public database link created with only the 'USING' clause and not the "CONNECT to...". IDENTIFIED BY... "provides the same username/password pair (SCOTT/TIGER in your example) exist in the remote database. Username and password must be the same.

  • How to distinguish between couples that comes from my TX CAN oppose and frames which comes from the network?

    HY,

    I have an object can pass data to the specific id.

    I expect to get frame from the network with IDs and similar data.

    How will I know that the data came from the network?

    (If I listen to the data of the CAN Interface, I can't distinguish the data that I convey and between data from the Internet)

    Thanks in advance,

    Aviad

    Since you are using NI-CAN, series 1, which does not support no matter what Self-reception, I assume you are using two ports CAN... make your normal transmission and the other to listen to the frames of the CAN bus?

    If this is the case, the only option I see for you would be to compare the charge received with the load transmitted to detect the images you send. This will only work if you send and receive different payloads, but it's probably something that's generally true. If it is false, then you really have no good option with the 1 series (or even series 2) and NI-CAN.

    We have a different product, OR-XNET, which provides a forum for independent reception (such as series 2 NI-CAN), but when you receive the framework that it contains a flag that indicates if it was received from the network or received through self-reception. It's of course far easier (and probably only guaranteed) way to achieve your goal.

Maybe you are looking for

  • Click force has stopped working

    Hi, I'm on MacBook Pro (15-inch, mid-2015, retina), freshly updated for Sierra, force click has stopped working. I have checked all the options, rebooted the system, still no clear sign of what is the problem. Does anyone have the same problem? How t

  • Update the drop-down menus and jQuery sortable collide with the 16.0.2

    The drop-down menus that are contained in a table sortable jquery act as if they are disabled. By clicking on them, doesn't matter. I can tab in the menu drop down and control it with the arrow keys, but the mouse does nothing. The menus outside of t

  • How to change the DPI for Officejet 4500 Wireless settings

    Printer: HP Officejet 4500 G510n wireless (CN547A) OS: Windows 7 64-bit My DPI settings seem to be too high.  I'm scanning a single page and the file is 21MB in size.  I can't find how to reduce the dpi. Is it possible to do it on this device? Thank

  • Compatible RAM

    I use 4 GB I will modernize 8 GB (ADATA 8 GB DDR3 laptop memory at 1600 MHz AD3S1600W8G11-R) compatible this RAM.laptop it's the model is TMP643-M-32374G32Makk and serial number is [under the direction of privacy]

  • High utilization of the processor after installing the HP printer

    My computer is running Windows XP. When installing recently my computer HP printer failed complete installation on the supplied CD. Then I noticed a dramatic slowdown in the speed of the computer. I uninstalled the HP from the disk and was able to in