No random command in Oracle PL/SQL ???????

Hi,
Is there command for random in PL/SQL ?
Thxs
Monica
null

The following is an example of using dbms_random, simulating dice rolling.
declare
i integer;
s varchar2(200);
t varchar2(200);
begin
dbms_random.initialize(13);
--dbms_random.seed(13);
for i in 1..33 loop
s:=dbms_random.random;
s:=substr(s, length(s)-1, length(s)) mod 6 + 1;
t:=dbms_random.random;
t:=substr(t, length(t)-1, length(t)) mod 6 + 1;
if s>t then
dbms_output.put_line(s| |', '| |t);
else
dbms_output.put_line(t| |', '| |s);
end if;
end loop;
dbms_random.terminate;
end;
null

Similar Messages

  • Invoke and Execute Unix command from Oracle PL/SQL

    Dear All,
    I am currently working in the development of multi user application in ORACLE.
    My problem is,
    I have to remove a temporary file created in unix server when a particular condition is satisfied in a PL/SQL proccedure.
    I searched for this and got solution to use DBMS_PIPE package.
    Can you help me how to pack the content 'rm file_name' from different users working in different sessions and how to execute. Can you please explain me how the server manages calls from different sessions and replies to individual sessions.
    Thanks in advance,
    Shenbaga.

    Well if doesn't raise an exception it succeeded. Is that sufficient acknowledgement?
    Cheers, APC

  • How to get the correct sql command in oracle?

    Hi sir,
    i am using this query in sql that is :
    SELECT C.*,ISNULL(P.Comp_Name,'') + ' (' + ISNULL(P.Comp_ID,'') + ')' Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID Where C.Comp_ID='004'
    so i am getting in parent column value like this: "PARIS GROUP (001)"
    but the same command i converted in sql developer that is:
    SELECT C.* ,NVL(P.Comp_Name, ' ') || ' (' || NVL(P.Comp_ID, ' ') || ')' as Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID WHERE C.Comp_ID ='004'
    but not getting in parent column value its coming only ( )
    help me.
    thanks

    Welcome to Oracle.
    It has manuals.
    http://tahiti.oracle.com/
    Choose your version, which you continue to keep a mystery
    E.g.
    http://www.oracle.com/pls/db112/homepage
    Including Oracle SQL syntax
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/toc.htm
    Which you will find useful since Oracle does not run Microsoft SQL as you continue to find over and over again.
    And there is a 2 day getting started as a developer guide, which you appear to desperately need,
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm
    If you have any specific questions about anything you read in there, come back in a couple of days after you have finished reading them.

  • How do I write this SQL command in Oracle

    Hi all
    I wriote this SQ L statement in Ms SQL Server. How do I write this sql command in Oracle?
    ALTER VIEW dbo.ConsumptionAS SELECT TOP 100 PERCENT ID,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200711' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Nov2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200712' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Dec2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200801' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jan2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200802' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Feb2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200803' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Mar2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200804' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Apr2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200805' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS May2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200806' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jun2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200807' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jul2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200808' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS Aug2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200809' AND NbrDaysUsed != 0 THEN (QtyUsed NbrDaysUsed) * 748.05 ELSE 0 END)) AS Sep2008
    FROM dbo.MasterConsumption WHERE YEAR_MONTH >= '200710' AND YEAR_MONTH <= '200809' GROUP BY ID ORDER BY ID
    I am very interested in this part:
    SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007
    thanks
    Edited by: user631364 on Oct 27, 2008 8:25 AM
    Edited by: user631364 on Oct 27, 2008 8:26 AM
    Edited by: user631364 on Oct 27, 2008 8:27 AM

    Thank you!!
    Now let me aslk the second part of my question.
    This sql command:
    ALTER VIEW dbo.ConsumptionAS SELECT TOP 100 PERCENT ID,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200711' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Nov2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200712' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Dec2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200801' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jan2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200802' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Feb2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200803' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Mar2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200804' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Apr2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200805' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS May2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200806' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jun2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200807' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jul2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200808' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS Aug2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200809' AND NbrDaysUsed != 0 THEN (QtyUsed NbrDaysUsed) * 748.05 ELSE 0 END)) AS Sep2008
    FROM dbo.MasterConsumption WHERE YEAR_MONTH >= '200710' AND YEAR_MONTH <= '200809' GROUP BY ID ORDER BY ID
    was created with this query in SQL Server and then I saved it in a store procedure, that I scheduled to run montlhy
    SET ANSI_NULLS ON
    DECLARE @SQLString NVARCHAR(4000)
    /* Build the SQL string once.*/
    SET @SQLString = 'ALTER VIEW dbo.Consumption AS SELECT TOP 100 PERCENT ID, CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = ' +
    "'" + dbo.CONLastMonth_fn(getdate(), month(getdate()) - 12) +
    "'" +
    ' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS ' +
    dbo.CONMonthInEnglish(getdate(), month(getdate()) - 12) +
    … (GOES FROM current month -12 to current month -1)
    , CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = ' +
    "'" + dbo.CONLastMonth_fn(getdate(), month(getdate()) - 1) +"'" +
    ' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS ' +
    dbo.CONMonthInEnglish(getdate(), month(getdate()) - 1) +
    ' FROM dbo.MasterConsumption WHERE YEAR_MONTH >= ' +
    "'" + dbo.CONLastMonth_fn (getdate(), month(getdate())-12 ) +"'" +
    ' AND YEAR_MONTH <= ' +
    "'" + dbo.CONLastMonth_fn (getdate(), month(getdate())-1 ) +"'" +
    ' GROUP BY ID ORDER BY ID '
    EXEC sp_executesql @SQLString
    Is that something that can be done in Oracle in the same way?
    Do you use another approach?
    please advice
    Edited by: user631364 on Oct 27, 2008 10:19 AM
    Edited by: user631364 on Oct 27, 2008 10:21 AM
    Edited by: user631364 on Oct 27, 2008 10:21 AM
    Edited by: user631364 on Oct 27, 2008 10:22 AM
    Edited by: user631364 on Oct 27, 2008 10:23 AM
    Edited by: user631364 on Oct 27, 2008 10:23 AM
    Edited by: user631364 on Oct 27, 2008 10:24 AM

  • How execute pl/sql command from Oracle ADF Business Components

    can't find examples for how execute pl/sql command from Oracle ADF Business Components and how call pl/sql package procedure from ADF Business Components.
    insert,update,delete rows in view object instance cache is good but if i must do some complex operations while insert,update,delete rows..it's more better for me to call
    pl/sql procedure from oracle db.Am i wrong ????

    Roman,
    this should be similar to how it worked in JDeveloper 9.0.3. hava a look at <JDev903 Home>\BC4J\samples\StoredProc for a code example.
    Frank

  • SQL commands of Oracle

    Help needed, guys! Could anyone tell me where to find full list and description of SQL commands of Oracle?

    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm

  • Connecting Oracle using SQL Plus in command window through LDAP settings?

    Hi
    Just like to know if it is possible to connect Oracle using SQL Plus with connection type as LDAP.
    Generally we connect to Oracle in cmd window as
    username/password@DBServiceName
    Similarly is it possible to connect Oracle using SQL plus cmd window using LDAP configuration settings.
    Eg:-
    If my LDAP server is oid:123:456
    Context is: cn=OracleContext,dc=abcdefgh,dc=com
    DBService is: xyz
    Regards
    jc

    Specify the -L command line option to SQL*Plus, i.e.:
    sqlplus -L username/password@db @blah.sql
    (this will prevent the second prompt for username/password if the initial login is unsuccessful for any reason, like an invalid password).

  • Re: the similar decode sql command (in Oracle) in ABAP

    Dear ABAP Expert,
    Could you let me know where there is a similar decode command in Oracle in ABAP?
    Thanks.
    Arthur

    Hi,
    You can specify case statement between SELECT and ENDSELECT. However this may lead to performance problems. Please take care.
    Example:-
    SELECT FIELD1 into LOC_FIELD FROM TAB.
      CASE LOC_FIELD.
        WHEN 'ABC'.
          WRITE: 'ABC'.
        WHEN OTHERS.
          WRITE: 'REST'.
      ENDCASE.
    ENDSELECT.
    Thanks and Best Regards,
    Dinesh.

  • Error Connecting to TFS 2013 from Oracle PL/SQL using MSSCCI

    Hi,
    previously we were able to connect to TFS 2008 through MSSCCI.
    we have MSSCCI 2013 provider, Teamexplorer 2013 andVersion Control Interface installed.
    While trying to connect to TFS 2013 from ORacle PL/SQL Developer 10.5 through MSSCCI ; there is an error coming up when we enter the server url ... it is allowing us only until <tfs home url> without collection...
    "The request failed with the error message
    <head><title>Document moved></title></head>
    <body><h1>Object Model</h1>This document may be found<aHREF=/<Collectionname>/Services/v1.0/ServerStatus.asmx>">http://<tfshome
    url>/<Collectionname>/Services/v1.0/ServerStatus.asmx> But the plugin picks it up automatically.. Am i correct?
    How to resolve the above error?
    Thank you
    Su

    Hi Su, 
    Thanks for your post.
    How do you manually build  your PL/SQL/Oracle projects?
    TFS Build invoke MSBuild command to build project/solution on build agent machine by default. If these projects can be built using MSBuild command line manually, then we can use TFS Build(default build process template) to build these projects.
    If these projects need be built using another complier, and this compiler support run the command line to invoke it, so you can add the InvokeProcess activity(execute the command line) to invoke this compiler to build these projects in build process template,
    then create build definition using this customized build process template.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Oracle to SQL server connection - not working

    Hi Friends,
    OS version : R Linux EL5
    Oracle version : 10.2.0.4
    i had followed http://www.databasejournal.com/features/oracle/article.php/10893_3442661_2/Making-a-Connection-from-Oracle-to-SQL-Server.htm document and modified tnsnames.ora, listener.ora files in HS directory.
    when i tried to start new listener, its throwing following error
    *+[oracle@viadbscph802v admin]$ lsnrctl start LISTENERMSCRM_CONFIGDSN+*
    LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 30-MAR-2010 08:35:08*
    Copyright (c) 1991, 2007, Oracle.  All rights reserved.*
    Starting /opt/oracle/protas/product/10.2.0/db/bin/tnslsnr: please wait...*
    TNSLSNR for Linux: Version 10.2.0.4.0 - Production*
    System parameter file is /opt/oracle/protas/product/10.2.0/db/network/admin/listener.ora*
    Log messages written to /opt/oracle/protas/product/10.2.0/db/network/log/listenermscrm_configdsn.log*
    TNS-01151: Missing listener name, LISTENERMSCRM_CONFIGDSN, in LISTENER.ORA*
    Listener failed to start. See the error message(s) above...*
    my listener.ora entry is as below
    *+[oracle@viadbscph802v admin]$ more listener.ora+*
    +# This is a sample listener.ora that contains the NET8 parameters that are+
    +# needed to connect to an HS Agent+
    LISTENERMSCRM_CONFIGDSN =*
    +(ADDRESS_LIST=+
    +(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))+
    +(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))+
    SID_LIST_LISTENER=*
    +(SID_LIST=+
    +(SID_DESC=+
    +(SID_NAME=MSCRM_CONFIGDSN)+
    +(ORACLE_HOME=/opt/oracle/protas/product/10.2.0/db)+
    +(PROGRAM=hsodbc)+
    +)+
    +)+
    +#CONNECT_TIMEOUT_LISTENER = 0+
    when i do tnsping, it is showing following error
    *+[oracle@viadbscph802v admin]$ tnsping mscrm_configdsn+*
    TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 30-MAR-2010 08:49:32*
    Copyright (c) 1997,  2007, Oracle.  All rights reserved.*
    Used parameter files:*
    TNS-03505: Failed to resolve name*
    my tnsnames.ora entry is as below
    *+[oracle@viadbscph802v admin]$ more tnsnames.ora+*
    +# This is a sample tnsnames.ora that contains the NET8 parameters that are+
    +# needed to connect to an HS Agent+
    +#hsagent  =+
    +#  (DESCRIPTION=+
    +#    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))+
    +#    (CONNECT_DATA=(SID=hsagent))+
    +#    (HS=)+
    +#  )+
    MSCRM_CONFIGDSN  =*
    +(DESCRIPTION=+
    +(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))+
    +(CONNECT_DATA=(SID=MSCRM_CONFIGDSN))+
    +(HS=OK)+
    +)+
    my GLOBAL_NAMES is set to flase
    Please help me in resolving this problem.
    i have a doubt, should we have oracle client software to be installed on machine which is running sql server?
    thanks in advance

    [oracle@viadbscph802v admin]$ lsnrctl status LISTENERMSCRM_CONFIGDSN
    LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 30-MAR-2010 14:38:32
    Copyright (c) 1991, 2007, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=viadbscph802v)(PORT=1522))
    STATUS of the LISTENER
    Alias LISTENERMSCRM_CONFIGDSN
    Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
    Start Date 30-MAR-2010 12:41:17
    Uptime 0 days 1 hr. 57 min. 15 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /opt/oracle/protas/product/10.2.0/db/network/admin/listener.ora
    Listener Log File /opt/oracle/protas/product/10.2.0/db/network/log/listenermscrm_configdsn.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=viadbscph802v.no.via.as)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    Services Summary...
    Service "MSCRM_CONFIGDSN" has 1 instance(s).
    Instance "MSCRM_CONFIGDSN", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    [oracle@viadbscph802v admin]$ tnsping MSCRM_CONFIGDSN
    TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 30-MAR-2010 14:38:40
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522)) (CONNECT_DATA=(SID=MSCRM_CONFIGDSN)) (HS=OK))
    OK (0 msec)
    below are listener.ora and tnsnames.ora entries
    LISTENERMSCRM_CONFIGDSN =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=viadbscph802v)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    SID_LIST_LISTENERMSCRM_CONFIGDSN =
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=MSCRM_CONFIGDSN)
    (ORACLE_HOME = /opt/oracle/protas/product/10.2.0/db/)
    (PROGRAM=hsodbc)
    MSCRM_CONFIGDSN =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MSCRM_CONFIGDSN))
    (HS=OK)
    )

  • To convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL

    Hi, Is it possible to convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL. If you have any info, PL do let me know. Thanks in advance.
    EG :
    /* SMG Stored Procedures */
    /* DB2 Stored Procedure: OrganisationExists */
    /* Linkage: SIMPLE (no NULLs permitted) */
    /* Load module name: SMGEC00 */
    /* Purpose: DELETE FROM SSE_LOOKUP_MAP */
    /* to run. */
    /* Parameters: argvÝ1¨ short - return error code - OUT */
    /* argvÝ2¨ char - return error message - OUT */
    /* argvÝ3¨ char - BLEID - IN */
    /* Reason for edit Date Who */
    /* Initial version 09/04/03 Arockia */
    #pragma runopts(plist(os))
    #include <stdlib.h>
    #include <string.h>
    void main (int argc, char *argvݨ)                                             
    EXEC SQL INCLUDE SQLCA;
    EXEC SQL BEGIN DECLARE SECTION;
    char bleid??(12??);
    EXEC SQL END DECLARE SECTION;
    /* Set defaults for error code (argvÝ1¨) and error message (argvÝ2¨) */
    strcpy(argv??(2??)," ");
    *(int *)argv??(1??) = 0;
    strcpy(bleid,argv??(3??));
    EXEC SQL
    DELETE FROM SSE_LOOKUP_MAP
    WHERE BLEID = :bleid;
    /* Set error code to record status of last SQL command */
    *(int *)argv??(1??) = SQLCODE;
    return;

    For this program, you could do some thing like:
    SQL> CREATE TABLE sse_lookup_map(BLEID varchar2(10));
    Table created.
    SQL> CREATE or replace PROCEDURE test(p_bleid_in IN varchar2)
      2  AS
      3  BEGIN
      4  DELETE FROM sse_lookup_map
      5  WHERE BLEID = p_bleid_in;
      6  END;
      7  /
    Procedure created.
    SQL> ed
    Wrote file afiedt.buf
      1* INSERT INTO sse_lookup_map values('test1')
    SQL> /
    1 row created.
    SQL> ed
    Wrote file afiedt.buf
      1* INSERT INTO sse_lookup_map values('test2')
    SQL> /
    1 row created.
    SQL> SELECT * FROM sse_lookup_map;
    BLEID
    test1
    test2
    2 rows selected.
    SQL> EXEC test('test1')
    PL/SQL procedure successfully completed.
    SQL>  SELECT * FROM sse_lookup_map;
    BLEID
    test2
    1 row selected.
    SQL>

  • Errors in impdp command on oracle 10g database

    Hi,
    could you plz help me to solve below errors which are coming while doing import with impdp command in oracle 10g 10.1.0.4.0 os: Red Hat Enterprise Linux ES release 4
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Job "DCA"."SYS_IMPORT_SCHEMA_01" stopped due to fatal error at 15:31
    i tried to restart job but the following errors coming
    UDI-00008: operation generated ORACLE error 39078
    ORA-39078: unable to dequeue message for agent KUPC$A_1_20081111155728 from queue "KUPC$C_1_20081111155728"
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 2356
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3261
    ORA-06512: at line 1
    thanks in advance

    NAME TYPE VALUE
    streams_pool_size big integer 0
    sga_target big integer 200M
    what could be the value for avoiding errors! thanks in advance

  • Errors in impdp command on oracle 10g database-urget help needed

    Hi,
    could you plz help me to solve below errors which are coming while doing import with impdp command in oracle 10g 10.1.0.4.0 os: Red Hat Enterprise Linux ES release 4
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Job "DCA"."SYS_IMPORT_SCHEMA_01" stopped due to fatal error at 15:31
    i tried to restart job but the following errors coming
    UDI-00008: operation generated ORACLE error 39078
    ORA-39078: unable to dequeue message for agent KUPC$A_1_20081111155728 from queue "KUPC$C_1_20081111155728"
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 2356
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3261
    ORA-06512: at line 1
    thanks in advance

    Can you check Metalink Note 376022.1? Your STREAMS_POOL_SIZE parameter may be too small.
    If you don't have Metalink access, try this :
    sql> alter system set STREAMS_POOL_SIZE=100M scope=spfile;
    sql> shutdown immediate
    sql> startup
    Note : the Portal Applications forum may not be the appropriate forum for this datapump issue. Try one of the database forums as you'll have a wider audience there.

  • Connecting from Oracle to SQL Server

    Hi
    I am now tring to connect from oracle to sql server using database link.
    Created database link
    but when connecting to remote db getting the floowing error
    select * from region@mysqlserverdsn
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from MYSQLSERVERDSN
    Can anyone help
    My Listener File
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc1)
    (SID_DESC =
    (GLOBAL_DBNAME = ORCL.DOMAIN.COM)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (SID_NAME = orcl)
    (SID_DESC =
    (GLOBAL_DBNAME = NORTHWIND.DOMAIN.COM)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (SID_NAME = MYSQLSERVERDSN)
    (PROGRAM=hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST=
         (ADDRESS = (PROTOCOL = TCP)(HOST = SALIHKM.DOMAIN.COM)(PORT = 1522))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    My Tnsnames Entry
    MYSQLSERVERDSN =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(PORT=1522))
    (CONNECT_DATA=(SID=MYSQLSERVERDSN))
    (HS=OK)
    Lsnrctl is working fine.
    c:\>lsnrctl start
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 18-MAY-2006 18:53
    :13
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    System parameter file is D:\oracle\product\10.2.0\db_1\network\admin\listener.or
    a
    Log messages written to D:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SALIHKM.DOMAIN.COM)(POR
    T=1522)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SALIHKM.DOMAIN.COM)(POR
    T=1522)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 18-MAY-2006 18:53:16
    Uptime 0 days 0 hr. 0 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File D:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File D:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SALIHKM.DOMAIN.COM)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
    Services Summary...
    Service "NORTHWIND.DOMAIN.COM" has 1 instance(s).
    Instance "MYSQLSERVERDSN", status UNKNOWN, has 1 handler(s) for this service..
    Service "ORCL.DOMAIN.COM" has 1 instance(s).
    Instance "orcl", 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...
    The command completed successfully
    But Tnsping show no listener
    C:\>tnsping MYSQLSERVERDSN
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 18-MAY-2
    006 18:56:27
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(P
    ORT=1522)) (CONNECT_DATA=(SID=MYSQLSERVERDSN)) (HS=OK))
    TNS-12541: TNS:no listener
    Services
    C:\>lsnrctl services
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 18-MAY-2006 19:00
    :04
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SALIHKM.DOMAIN.COM)(POR
    T=1522)))
    Services Summary...
    Service "NORTHWIND.DOMAIN.COM" has 1 instance(s).
    Instance "MYSQLSERVERDSN", status UNKNOWN, has 1 handler(s) for this service..
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "ORCL.DOMAIN.COM" has 1 instance(s).
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:1 refused:0 state:ready
    LOCAL SERVER
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: SALIHKM, pid: 2080>
    (ADDRESS=(PROTOCOL=tcp)(HOST=SALIHKM.DOMAIN.COM)(PORT=1070))
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:1 refused:0 state:ready
    LOCAL SERVER
    The command completed successfully
    I am very much confused with this situation.
    Thanks & Regards
    Salih Km

    Hi ,
    Thanks for your reply.
    Contents of my initMYSQLSERVERDSN.ora file is
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO = MYSQLSERVERDSN
    HS_FDS_TRACE_LEVEL = 0
    HS_FDS_TRACE_FILE_NAME = hsmsql.trc
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    set ODBCINI=c:\WINDOWS\ODBC.INI
    SALIHKM.DOMAIN.COM is my system in which Oracle Test DB is Installed.
    SQL Server is in another location.
    In Tnsnames i specified ip address.
    One more doubt.
    I am using 10g Release 2 demo version.
    whether it will support Hetrogeneous Services?
    How to know whether a database supports HS or not?
    Thanks & Regards
    Salih Km

  • Oracle 10gR2 64bit  odbc  from oracle to sql server  Win 2008 EE 64bits

    Hi, I am having trouble with a 10gR2 64bits creation of odbc from oracle to sql server, I have follow several instruction with no luck at all. My OS is windows 2008 EE 64bits on the oracle and sql server server.
    This is what I have done
    1. in the $oracle_home/hs/admin directory
    inithsodbc.ora
    # HS init parameters
    HS_FDS_CONNECT_INFO = hsodbc
    HS_FDS_TRACE_LEVEL = off
    2. in the $oracle_home/network/admin
    # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    (SID_DESC=
    (SID_NAME=hsodbc)
    (ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
    (PROGRAM=C:\oracle\product\10.2.0\db_1\hs\hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    And the tnsname.ora
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    PRUEBA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = prueba)
    hsodbc =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1521))
    (CONNECT_DATA=(SID=hsodbc))
    (HS=OK)
    I create the odbc connection an test it , the result is TEST PASSED
    4. The i create a database link on my database
    CREATE PUBLIC DATABASE LINK XYZ
    CONNECT TO "sysdba" IDENTIFIED BY "masterkey"
    USING 'hsodbc';
    5 execute a select
    SQL> select * from dual@XYZ;
    select * from dual@XYZ
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from XYZ
    6. When I check the listener log i'm getting this error
    25-MAR-2011 11:48:40 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169870592)) * status * 0
    25-MAR-2011 11:48:47 * (CONNECT_DATA=(SID=hsodbc)(CID=(PROGRAM=)(HOST=PRO)(USER=PRO\Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=49329)) * establish * hsodbc * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    Edited by: user626125 on Mar 26, 2011 11:39 AM
    Edited by: user626125 on Apr 12, 2011 2:49 PM

    Heterogeneous Connectivity

Maybe you are looking for

  • How to make a good quality 8 Giga DVD out of a Project in AVI of 14 Gigas?

    I have a film in a proyect made with a miniDV camera in my old Premiere 6.5   It has 68 minutes and after exporting it with the Microsoft DV AVI compressor in 100 % quality and not compressing the audio, it  ended in an AVI of 14 Gigas. I would like

  • Error while executing the DEBMAS06 idoc - (

    Hi, We are trying to create customers using LSMW with IDOC processing. The basic type used is DEBMAS06. In test execution, an error occurs while processing the partner function tab. The error is "Data is incomplete; check". The message number is F212

  • HowTo: iTunes+Quicktime on Windows Vista x86

    This was fun. Some of you may have noticed that the iTunes + Quicktime installer may not work on Windows Vista Beta 2 (x86). Well, there's an easy work around: Install Quicktime 7 Standalone first, then install iTunes. Problem solved -- iPod works. '

  • Using variables to build table names

    <p><font face="arial,helvetica,sans-serif" size="3">Hi, I'm trying to build a report that I can easily adapt for different tables. For instance I have tables;</font></p><p><font face="arial,helvetica,sans-serif" size="3">cl_fra1_dynamic (France)</fon

  • Music library larger then 64GB

    My music library is 120GB The actual files are on a WD 2TB hard disk connected to my pc via usb. I want to use this library with my ipad (instead of my pc) Can this be done? How? ipad does not have enough space... Thx for your advice Shuki