DBMS Output---Server Output on for PL/SQL

I am trying to run some PL/SQL against our Test Database. There are some command lines for...
dbms_output.put_line
Within Oracle SQL Developer, I am doing View ==> Dbms Output and choosing the connection accordingly but I still don't see the dbms_output.put_line commands being displayed.
Am I doing something wrong here??? Do I need to issue any commands within Oracle SQL Developer in order to see the dbms_output.put_line messages output???
I appreciate your review and am hopeful for a feedback. Thanks in advance.
PSULionRP

I was having the same problem on 3.0.04.34
You need to open the 'view' menu and click on 'dbms output'. You should get a dbms output window at the bottom of the worksheet. You then need to add the connection (for some reason this is not done automaticallly). Now try running your code.
I hope that helps.

Similar Messages

  • DBMS Output stops working intermitantly

    Hi,
    Version 1.5.1
    When I am creating a PL/SQL script in SQL Developer I like to check the results in DBMS Output. The problem I am experiencing is it returns the results to the DBMS Output pane some of the time and then for some of the time it does,nt. I cannot work out why it stops working. Some of the time creating a new work sheet is successful.
    Has anyone else experienced this problem. It is a little frustrating when it stops working, especially when you are in the middle of writing and testing scripts.
    I have had this experience with every version of SQL Developer I have used.
    Ben

    Ben,
    Hitting the DBMS Output enable button in SQL Developer effectively performs the same as the "set serveroutput on size <buffer size>" or "dbms_output.enable(<buffer size>);" commands. As I understand it, if you are only ever going to run your code through the SQL Worksheet, then using the DBMS Output enable button means you don't need the dbms_output.enable call.
    The Poll slider is how frequently that DBMS Output tab checks to see if there is any DBMS Output to display - the tooltip shows "Poll frequency max 15s". I have no idea what the minimum frequency is.
    I don't know why it still isn't working - after closing all but one worksheet, have you confirmed that the DBMS Output tab shows "set serveroutput on"? If not, I would suggest you disable DBMS Output (should show "set serveroutput off") and then re-enable it (should show "set serveroutput on").
    As a bit of background that might help clarify what is going on, without the set serveroutput on or dbms_output.enable or enabling DBMS Output through SQL Developer, calls to dbms_output.put_line (for example) are effectively ignored and the text is not saved. After a set serveroutput on or dbms_output.enable (without enabling DBMS Output through SQL Developer) calls to dbms_output.put_line are recorded but not displayed (they are only cached). After enabling DBMS Output through SQL Developer, the worksheet then polls the DBMS Output cache with the frequency defined by the slider and displays the results if any. The difference between SQL Developer and SQL Plus is that in SQL Plus the set serveroutput on also switches on the polling (done after every statement completes rather than on a frequency basis).
    theFurryOne

  • Cannot establish connection - JDBC driver for MS SQL server 2000

    Hi,
    We are facing problems in connecting to SQL server 2000.
    We have installed the latest version of the driver from followin link and following
    https://websmp108.sap-ag.de/msplatforms    > SQL Server > JDBC Driver for MS SQL Server (Version 3.70.10)
    We have given the following entries in our communication channel:
    JDBC Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Connection:  jdbc:sqlserver://<SQLserver IP>:1433;databaseName=production_info
    Please let us know the procedure to find if the JDBC driver for SQL 2000 is installed from our SAP XI.
    ERROR DETAILS:
    Error during database connection to the database URL 'jdbc:sqlserver://<SQLserverIP>:1433;databaseName=production_info' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://<SQLserverIP>:1433;databaseName=production_info': SAPClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver'
    Please help.
    Regards,
    Rehan

    Hi Chris,
    We have used the same because we have downloaded the driver from following location
    https://websmp108.sap-ag.de/msplatforms ;   > SQL Server > JDBC Driver for MS SQL Server (Version 3.70.10)
    I have tried with both "com.microsoft.jdbc.sqlserver.SQLServerDriver"; and "com.microsoft.sqlserver.jdbc.SQLServerDriver";, but still I am facing the same error.
    Service market place has given the driver as "JDBC Driver for MS SQL Server (Version 3.70.10)", is there a way to find out if it is for 2000 or 2005?
    Thanks for your reply.
    Regards,
    Rehan

  • WebLogic Server 7.0 and MS SQL Server 2000

    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

    Hi. This is very odd. Would you please try a simple standalone program,
    such as below? Tell me what it does in both environments.
    Joe
    import java.sql.*;
    import java.util.*;
    public class foo
    public Connection connection;
    public static void main(String args[])
    throws Exception
    Connection c = null;
    try
    Properties properties = new Properties();
    properties.put("user", "sa"); // change for your properties...
    properties.put("password", "");
    properties.put("server", "QA75");
    Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    c = DriverManager.getConnection("jdbc:weblogic:mssqlserver4", properties);
    System.out.println("got a connection.");
    catch(Exception exception1)
    exception1.printStackTrace();
    finally
    if (c != null)
    try { c.close(); } catch(Exception ex) {}
    Koen Van hamme wrote:
    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

  • 4.0 EA2 - Server Output Requires DBMS Output Connection to be Enable

    In 3.2.2, I was able to set SERVEROUTPUT in the SQL window to view server output without first enabling the connection in the DBMS Output window.  4.0 EA1 required the connection to be enabled.  4.0 EA2 still appears to require this.  Which behavior is the expected behavior, 3.2.2 or 4.0?
    Thanks

    I'm noticing the same - server output doesn't show in the script output panel unless I have the dbms output panel enabled for the connection.
    set serveroutput on
    run a dbms_output commmand - nothing shows in script output (except anonymous block completed)
    open dbms output view and enable for db and output now shows in both.
    Interestingly - if I run multiple dbms_outputs, the first time I run a command after opening the dbms output panel I see all the previous dbms output results.
    I'm on a mac, which may be the difference

  • 4.1EA2 User-Defined-Report strips CRLF when using PL/SQL DBMS Output

    Hi,
    I have a report with a child report.
    That child report uses pl/sql to print to the screen. (dbms output)
    When i use the procedure manually it prints fine.
    When i copy this output to a text editor i can see the CRLF in there.
    If i call the same procedure tru the reports section of SQLDeveloper the output is stripped of any CRLF characters.
    This is causing it to be useless for me: i am using it to generate code and it all appears as one big line on the screen.
    Copying this to a text editor indeed shows all CRLFs gone.
    Is this intentional or a bug ?

    Jeff,
    Thnx for the answer.
    I don't have a problem writing html in my code being a former webdeveloper with experience in apex as well.
    The problem is that the option presents itself as a standard plsql dbmsoutput, which suggests identical output as a dbmsoutput pane in sqldeveloper.
    From your answer i gather it really is supposed to do html formatting.
    Your "solution" of inserting br tags would be fine if it weren't for the fact that when i do a copy of the output in this report pane sqldeveloper strips away the br tags but doesn't replace them with crlf's.
    And since the crlfs that were in the output are also stripped in this result pane i get a single line of text when i copy over a page of text from the result pane into a normal texteditor.
    As such it behaves differently then say a browser when i copy a page of text from the browser and paste it in a text editor. There i see the crlfs that were present in the original source.
    Is there a listing somewhere that explains what tags are supported?
    Or CSS ?
    Does it support stuff like white-space: pre ?
    I understand the usefullness of a html-aware plsql dbmsoutput output option in the reports list of a user-defined report.
    However i would like to use this opportunity to advocate to include , as an extra option or tick box etc., an option to just display the output as the normal dbmsoutput pane displays it.
    That is without extra formatting.
    I like the idea of being able to click in the table section above and to have bottom pane generate the appropriate code as output.
    That  use-case can not happen right now since it formats as html (and not even the correct way) or, when going along with this route, strips everything to a single line of text when copying the data from the result pane.
    rgrds mike

  • DBMS Output - Oracle SQL Developer 3.0 Early Adopter 2 (3.0.02.83)

    The DBMS output is not working in 3.0.02.83. Whenever i turn on the DBMS Output for a DB connection nothing happens. I run the same script in older versions and it works. The script could be as simple as a small anonymous block with a print statement (dbms_output.put_line)

    Currently it's broken but you have a workaround
    30EA2 dbms_output.put_line not working
    Hope it helps,
    Dani

  • Export-csv only generating the output only for single server

    Hi Team,
    From the below script I'm unable to generate the single output file for all the condition. The script only giving the last server output, It's skipping the all the other servers in the file.
    $ScriptBlock = {
        param
            $Server,
            $ExportCSV
    $Counters= import-csv "G:\testcounter.csv"
    foreach($Counter in $Counters)
    $ObjectName=$Counter.ObjectName
    $CounterName=$Counter.CounterName
    $InstanceName=$Counter.InstanceName
    $Result=Get-Counter -Counter "\\$server\$ObjectName($InstanceName)\$CounterName"
        $CounterSamples = $Result | % {$_.CounterSamples}
        $MasterArray = @()
        foreach ($CounterSample in $CounterSamples)
            $TempArray = @()
            $TempArray = "" | Select Server, ObjectName, CounterName, InstanceName, SampleValue, DateTime
            $Split = $CounterSample.Path.Remove(0,2)
            $Split = $Split.Split("\")
            $TempArray.Server = $Split[0]
            $TempArray.ObjectName = $Split[1].Split("(")[0]
            $TempArray.CounterName = $Split[2]
            $TempArray.InstanceName = $CounterSample.InstanceName
            $TempArray.SampleValue = $CounterSample.CookedValue
            $TempArray.DateTime = $CounterSample.TimeStamp.ToString("yyyy-MM-dd HH:mm:ss")
            $MasterArray += $TempArray
        $MasterArray | Export-Csv $ExportCSV -NoType
    $Servers = import-csv "G:\testcounter.csv"
    foreach ($Server in $Servers)
        $server=$server.server
        If (Test-Connection -quiet -computer $server){
            $ExportCSV = "G:\PerformaneData.csv"
            Start-Job -ScriptBlock $ScriptBlock -ArgumentList @($server, $ExportCSV)

    Hi RatheeshAV,
    In addition, to export the result to csv file, please also try to wait for all the jobs to complete then retrieve all the data and write it to a file in one step:
    $ScriptBlock = {
    param ($Server)
    #SCRIPT
    $MasterArray }
    $Servers = import-csv "G:\testcounter.csv"
    Get-Job | Remove-Job
    $jobs=@()
    foreach ($Server in $Servers){
    $server=$server.server
    If(Test-Connection -quiet -computer $server){
    Write-Host $Server -ForegroundColor green
    $ExportCSV = "G:\PerformaneData.csv"
    $job+=Start-Job -ScriptBlock $ScriptBlock -ArgumentList $server
    $jobs | Wait-Job
    $jobs | Receive-job | Export-CSV 'd:\temp.csv' -NoTypeInformation
    Refer to:
    PS3 Export-CSV -Append from
    multiple instances to the same csv file
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • DBMS OUTPUT

    I want to be able to output data more than the 1000000bytes limit for dbms output.
    In my environment my application server sits on a different IBM server from the database server and this makes it difficult to for me to use UTIL_FILE utility.
    Please how can i spool this data without using UTIL_FILE.

    The buffer size limit is 1000000 and 32767 bytes per
    line. Is your query a plain simple SQL and does not
    involve any PL/SQL? If it is try to use the SPOOL
    command.It is a PL/SQL and it is trying to spool data more than 1000000. Is there a way i can achieve this without UTIL_FILE since my DB server sits on different Machine from my application Server and my reports are executed from my application server.
    thanks

  • Getting errors in dbms output

    Hi All,
    I've written a function to calculate the value for QTD, Previous QTD, YTD and Previous YTD, by giving the parameters of Date, Table name, FilterCol(Date Column in the table), Column name to calculate...
    --------------------------The function code is below:-----------
    DECLARE
    V_REPORT_DATE VARCHAR2(20):='&V_RPRT_DATE';
    V_FILTERCOL VARCHAR2(100):='&V_FLTRCOL';
    V_COL_NAME VARCHAR2(100):=UPPER('&V_COL_NAM');
    V_TAB_NAME VARCHAR2(100):=UPPER('&V_TBL_NAME');
    V_START_DATE VARCHAR2(20);--:='&stdate';
    V_LAST_DATE VARCHAR2(20);--:='&lastdate';
    V_QUARTER_NUMBER VARCHAR2(1000);
    V_STR VARCHAR2(1000);
    V_QTY VARCHAR2(1000);
    V_SUM NUMBER(14,3):=0;
    V_TAB VARCHAR2(100);--:=
    V_COL VARCHAR2(100);--:=;
    V_COL2 VARCHAR2(100);
    V_PRV_QDATE VARCHAR2(20);
    V_PRV_QDATE2 VARCHAR2(20);
    V_SUM3 NUMBER(14,3):=0;
    V_CURRQTD VARCHAR2(1000);
    V_PRVQTD VARCHAR2(1000);
    V_SUM1 NUMBER(14,3):=0;
    V_YTD1 VARCHAR2(20);
    V_YTD2 VARCHAR2(20);
    V_YTD VARCHAR2(1000);
    V_SUM2 NUMBER(14,3):=0;
    V_PRVYTD VARCHAR2(20);
    V_PRVYTDSTR VARCHAR2(20);
    V_PRVYTDEND VARCHAR2(20);
    V_PRV_YTD VARCHAR2(1000);
    V_CUMM VARCHAR2(1000);
    BEGIN
    ---------------GETTTING QUARTER NO.------------------------------
    V_QTY:='SELECT TO_NUMBER(TO_CHAR(TO_DATE('''||'19/12/2012'||''', ''DD/MM/YYYY''), ''Q'')) FROM DUAL';
    DBMS_OUTPUT.PUT_LINE(V_QTY);
    EXECUTE IMMEDIATE V_QTY INTO V_QUARTER_NUMBER ;
    DBMS_OUTPUT.PUT_LINE('QT NUM'||V_QUARTER_NUMBER);
    ----------------CURRENT QUARTER VALUE----------------------------
    SELECT MIN (t), MAX (LAST_DAY (t)) INTO V_START_DATE,V_LAST_DATE
    FROM ( SELECT ADD_MONTHS (TRUNC(TO_DATE('19/12/2012','DD/MM/YYYY'), 'YYYY'), LEVEL - 1) t,
    TO_CHAR (ADD_MONTHS (TRUNC(TO_DATE('19/12/2012','DD/MM/YYYY'), 'YYYY'), LEVEL - 1), 'Q')QTD
    FROM DUAL
    CONNECT BY LEVEL <= 12) A
    WHERE A.QTD = V_QUARTER_NUMBER;
    DBMS_OUTPUT.PUT_LINE(V_START_DATE||'****'||V_LAST_DATE);
    V_CURRQTD:='SELECT SUM('||V_COL_NAME||') FROM '||V_TAB_NAME|| ' WHERE '||V_FILTERCOL||' BETWEEN TO_DATE('''||V_START_DATE||''',''DD/MM/YYYY'') ' || ' AND TO_DATE('''||V_LAST_DATE||''',''DD/MM/YYYY'')';
    --WHERE  trans_date betwen V_START_DATE1 AND V_LAST_DATE1';
    DBMS_OUTPUT.PUT_LINE(V_CURRQTD);
    EXECUTE IMMEDIATE V_CURRQTD INTO V_SUM;
    DBMS_OUTPUT.PUT_LINE(V_SUM);
    --RETURN V_SUM;
    ----------------END OF CURRENT QUARTER--------------------------
    -----------------------PREVIOUS QUARTER---------------------------
    SELECT MIN (t), MAX (LAST_DAY (t)) INTO V_PRV_QDATE,V_PRV_QDATE2
    FROM ( SELECT ADD_MONTHS (TRUNC(TO_DATE('19/12/2012','DD/MM/YYYY'), 'YYYY'), LEVEL - 1) t,
    TO_CHAR (ADD_MONTHS (TRUNC(TO_DATE('19/12/2012','DD/MM/YYYY'), 'YYYY'), LEVEL - 1), 'Q')QTD
    FROM DUAL
    CONNECT BY LEVEL <= 12) A
    WHERE A.QTD = V_QUARTER_NUMBER-1;
    DBMS_OUTPUT.PUT_LINE(V_PRV_QDATE||'****'||V_PRV_QDATE2);
    V_PRVQTD:='SELECT SUM('||V_COL_NAME||') FROM '||V_TAB_NAME|| ' WHERE '||V_FILTERCOL||' BETWEEN TO_DATE('''||V_PRV_QDATE||''',''DD/MM/YYYY'') ' || ' AND TO_DATE('''||V_PRV_QDATE2||''',''DD/MM/YYYY'')';
    DBMS_OUTPUT.PUT_LINE(V_PRVQTD);
    EXECUTE IMMEDIATE V_PRVQTD INTO V_SUM1;
    DBMS_OUTPUT.PUT_LINE(V_SUM1);
    -----------------------END OF PREVIOUS QUARTER---------------------------
    -----------------------CURRENT YTD------------------------------
    SELECT TRUNC(TO_DATE('19/12/2012','DD/MM/YYYY'),'YEAR')INTO V_YTD1 FROM Dual;
    SELECT LAST_DAY(ADD_MONTHS(TO_DATE(V_YTD1,'DD/MM/YYYY'),12 -
    TO_NUMBER(TO_CHAR(SYSDATE,'mm')))) INTO V_YTD2 FROM DUAL;
    V_YTD:='SELECT SUM('||V_COL_NAME||') FROM '||V_TAB_NAME|| ' WHERE '||V_FILTERCOL||' BETWEEN TO_DATE('''||V_YTD1||''',''DD/MM/YYYY'') ' || ' AND TO_DATE('''||V_YTD2||''',''DD/MM/YYYY'')';
    DBMS_OUTPUT.PUT_LINE(V_YTD);
    EXECUTE IMMEDIATE V_YTD INTO V_SUM2;
    DBMS_OUTPUT.PUT_LINE(V_SUM2);
    ---------------------------END OF CURRENT YTD------------
    -------------PREVIOUS YTD-------------------
    SELECT ADD_MONTHS(TO_DATE('19/12/2012','DD/MM/YYYY'),-12) INTO V_PRVYTD FROM DUAL;
    SELECT TRUNC(TO_DATE(V_PRVYTD,'DD/MM/YYYY'),'YEAR') INTO V_PRVYTDSTR FROM DUAL;
    SELECT LAST_DAY(ADD_MONTHS(TO_DATE(V_PRVYTD,'DD/MM/YYYY'),12 -
    TO_NUMBER(TO_CHAR(SYSDATE,'mm')))) INTO V_PRVYTDEND FROM DUAL;
    V_PRV_YTD:='SELECT SUM('||V_COL_NAME||') FROM '||V_TAB_NAME|| ' WHERE '||V_FILTERCOL||' BETWEEN TO_DATE('''||V_PRVYTDSTR||''',''DD/MM/YYYY'') ' || ' AND TO_DATE('''||V_PRVYTDEND||''',''DD/MM/YYYY'')';
    DBMS_OUTPUT.PUT_LINE(V_PRV_YTD);
    EXECUTE IMMEDIATE V_PRV_YTD INTO V_SUM3;
    DBMS_OUTPUT.PUT_LINE(V_SUM3);
    END;
    I am getting the dbms output:
    SELECT TO_NUMBER(TO_CHAR(TO_DATE('19-DEC-2012', 'DD/MM/YYYY'), 'Q')) FROM DUAL
    QT NUM4
    01-OCT-12****31-DEC-12
    SELECT SUM(ACTUAL_YIELD) FROM DWH_PRODUCTION WHERE WO_RELEASE_DATE BETWEEN TO_DATE('01-OCT-12','DD-MON-YYYY') AND TO_DATE('31-DEC-12','DD-MON-YYYY')
    01-JUL-12****30-SEP-12
    SELECT SUM(ACTUAL_YIELD) FROM DWH_PRODUCTION WHERE WO_RELEASE_DATE BETWEEN TO_DATE('01-JUL-12','DD/MM/YYYY') AND TO_DATE('30-SEP-12','DD/MM/YYYY')
    For calculating the QTD and Previous QTD, it's showing only the query in dbms output not the sum----I've chkd the error and realize its converting the date format like DD-MON-YYYY instead of i've defined the date format as DD/MM/YYYY, so values aren't comin.
    Note:- All the queries in function are giving the correct values as expected, if I fire them outside the function code, and giving correct values as data is there.....
    -----For YTD and PYTD----------showing error i.e.
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SPARC.DBMS_OUTPUT", line 116
    ORA-06512: at "SPARC.DBMS_OUTPUT", line 65
    ORA-06512: at line 81
    I've given the string varchar2 type and 1000:
    Help appreciated, Plz help me out.....
    One more favor I ask i.e.----Can any1 help me to write dbms output to show all the values in one line i.e values of SUM, SUM1, SUM2, SUM3
    Thnx in Advance

    Your code is against the basics of PL/SQL..
    Why are you sing DYNAMIC SQL?
    And all these values (QTD,YTD..) - Cant you find it in plain SQL..?
    Plase provide sample data (CEATE TABLE and INSERT statements) and expected output..
    Provide the logic to arrive at expected output..
    And your DB version..
    And use {noformat}{noformat} tags to format the code and data you post..
    What you are doing is *COMPLETELY WRONG*
    Read FAQ: {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • Full Database Backup in DB13 for MS SQL Server databases

    Hello,
    We have some SAP systems using the MS SQL Server database. I want to know if it is possible to setup the Full Database Backup option in transaction DB13 to store the files in a hard disk space.
    I already did this type of configuration in SAP systems in Oracle databases and for this I used the init<SID>.sap where we can put all the configuration, for instance the disk path where we want to save the backup files! But for MS SQL Server databases, in DB13, I don´t know how to do that, when I add the "Full Database Backup" option in DB13, this show me some options but only for tape, but I don´t want to store the backup files in tapes, I want to store/save the files on the server disk itself or else to an external disk but I don´t see where I can set this way of storage!
    This is what you see in DB13 (when using a MS SQL Server database) in "Full Database Backup" and as you see I only have options for TAPE not for a disk or other type of storage! How can I do that? (if that is possible):
    Can you help me please?
    Kind regards,
    samid raif

    Hello Raja
    Sorry for the delay of my answer! Many thanks for that tip, it helps a lot and it solve the last error/problem that I reported here, in fact, the problem was we had named the device with two words containing a space. So we removed that space from the backup device (in SQL management studio) with one word only and the job runs successfully without any errors!
    It works in Development and Quality systems but in our Production system (AM1) the Full backup option in DB13 stopped with the following error, in fact the error is on verification of backup, it means that the Full backup finished with success, but when it does the backup verification, the job in DB13 stops with an error, the following one:
    ***************************** SQL Job information   ******************************
    Jobname:    SAP CCMS Full DB Backup of AM1 [20140417103726-4-103726]
    Type:       TSQL
    DB-Name:    AM1
    For Run:    20140417  10:37:26
    **************************** Job history information  *****************************
    Stepname:   CCMS-step 1
    Command:    declare @exeStmt nvarchar(2000) exec am1.sap_backup_databases @dbList=
                "AM1",@r3Db="AM1",@bDev="fullprd",@expDays= 27,@jobName= "SAP CCMS Ful
                l DB Backup of AM1 [20140417103726-4-103726]",@bkupChecksum="Y",@bkupT
                ype="F",@nativeBkup="N",@exeDate = "20140417103726",@bkupSim = "N",@fo
                rmat = 0,@init = 0,@bkupDb = "AM1",@unload = 0,@exeStmt = @exeStmt OUT
                PUT
    Status:     (success)
    Message:    3014
    Severity:                                                                                                                                                                                                                                                    0
    Duration:   4  hours(s)  41 min(s) 22 sec(s)
    Last msg:   Executed as user: am1. Processed 7434328 pages for database 'AM1', fil
                e 'A01DATA1' on file 1. [SQLSTATE 01000] (Message 4035)  Processed 315
                1504 pages for database 'AM1', file 'A01DATA2' on file 1. [SQLSTATE 01
                000] (Message 4035)  Processed 4574152 pages for database 'AM1', file
                'A01DATA3' on file 1. [SQLSTATE 01000] (Message 4035)  Processed 44363
                92 pages for database 'AM1', file 'A01DATA4' on file 1. [SQLSTATE 0100
                0] (Message 4035)  Processed 25598 pages for database 'AM1', file 'A01
                LOG1' on file 1. [SQLSTATE 01000] (Message 4035)  BACKUP DATABASE succ
                essfully processed 19621974 pages in 16881.638 seconds (9.521 MB/sec).
                 [SQLSTATE 01000] (Message 3014).  The step succeeded.
                        <------------- End of Job Step History --------------->
    Stepname:   CCMS-step 2
    Command:    declare @exeStmt nvarchar(2000) exec am1.sap_verify_backups @nativeBku
                p = "N",@bkupSim = "N",@bDev = "fullprd",@bkupChecksum = "Y",@exeDate
                = "20140417103726",@unload = 1,@dbCnt =1,@exeStmt = @exeStmt OUTPUT
    Status:     (failure)
    Message:    3201
    Severity:                                                                                                                                                                                                                                                   16
    Duration:   0  hours(s)  8  min(s) 30 sec(s)
    Last msg:   Executed as user: am1. Cannot open backup device 'fullprd(\\10.0.0.45\
                backupsap\prd\prdfullqua.bak)'. Operating system error 1265(error not
                found). [SQLSTATE 42000] (Error 3201).  The step failed.
                        <------------- End of Job Step History --------------->
    **************************** Job history information  *****************************
    Can you help me please with this one!? Can you tell me why in verification it stops with that error?
    Kind regards,
    samid raif

  • Can dbms.output in procedure impact its performance?

    If dbms.output is used in procedure inside a loop, which gets executed for bulk data, can it have a performance impact in terms of execution time it takes?
    Consider server.output is ON..

    user11878374 wrote:
    Consider server.output is ON..This makes no difference.
    With server_output=OFF, a dbms_output.put_line has exactly the same performance characteristics (read: uses exaclty the same number of cpu cycles).
    Serveroutput = ON/OFF just controls wether SQLPlus will, upon completion of a database call, go ahead and execute dbms_output.read_line, to check if there is output that should be retrieved to be displayed.
    Also: do not forget that every call dbms_output.put_line will claim some memory (SGA or PGA, don't know) to store the output temporarily (until sqlplus retrieves it).
    Toon

  • 30EA2 - No data passing to Dbms Output

    Have tested on multiple connections, tried restarting sql developer, same story.
    Connect to db.
    Enter the following into sql developer sql worksheet:
    begin
          dbms_output.put_line('hi');
    end;add dbms output connection to the same connection i am connected
    run code as script
    nothing outputted to dbms output window
    Ta,
    Trent
    Edited by: trent on Dec 21, 2010 12:17 PM
    It looks like when you add the dbms output connection, its missing the call set serveroutput on for the connection.

    Exactly the same problem. DBMS_OUTPUT works only if:
    - "set serveroutput on" is present in the running script
    - statements are executed as script [F5] not [F9]

  • Dbms output command

    I am creating and running a PROCEDURE in oracle iport portal. The issue sis for me that the dbms output command will not work in a portal. It works running straight pl/sql .
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <H2>Example of A Dynamic Page</H2>
    <ORACLE>BEGIN
    skeleton2;
    END;
    </ORACLE>
    </BODY>
    </HTML>
    CREATE OR REPLACE PROCEDURE skeleton2
    IS
    BEGIN
    DBMS_OUTPUT.PUT_LINE('Hello World!');
    END;

    Thank you very much. I have additional questions please.
    1)     Are you aware of a very good resources on portal
    2)     The command mention works bit I also have the (http) displaying within the portal.
    3)     I have not been successful in finding good resources on configuration of a oracle portal

Maybe you are looking for

  • App download lag

    When i downloaded à few apps the download just got stuck, it is 3 different apps and they all stopped. Egen i donwload other apps now they work but the 3 other ones remain stuck.. What am i shoppade to do?

  • I can't find where to download captivate 8.

    I have a yearly subscription and recently had to reformat my computer. I've been searching the site for over 30 minutes now and I can't find any link anywhere to download captivate 8. Please help.

  • Personalize Web Page Functionality not working

    Hi,      When we personalize a web page it creates a bookmark id in the ODS 0PERS_WTE.  The only problem is when we reaccess the web page we do not get the bookmark, but we end up getting the query the way it was originally. We have the template set

  • IPod Freezes While Syncing

    I'll be syncing it and it just freezes and shows this: This iPod cannot be synced. The required file cannot be found. While that shows on my computer, my ipod is frozen on the Do not disconnect screen. What do I do?

  • Images in reply emails

    I've sent an email with my Mac to my sis with an image copy/pasted at the bottom, when she replied - and I read it on my iPhone - in the "Original Message" I could only see the text I wrote and not the attached image, is this normal on the iPhone? (I