Package Function Runs OK in Database but fails inside a Mapping

Dear Forum,
I am stuck with an Odd Problem. I have a package.function that calculates a value using another function PNV and uses this value to update a table named F_CONTAGENS. When I run the function in the database (using SQLDeveloper) the function calculates the value and updates the column NUM_PNV_2_ANOS in table F_CONTAGENS.
No errors . But when I run the function inside an OWB Mapping, the function returns 'NULL' and do not update the table. What could be the problem?! The mapping that uses this function is very simple: Function is connected to an Auxiliar Table (with INSERT option) that receives the value returned by the function (in this case 1). Both function's package and the mapping were already deployed without errors to the database
Here is the function I am using (COD_MES := 200702) :
CURSOR C_CONT IS
SELECT C.COD_USF,
C.COD_MES
FROM F_CONTAGENS C
, STG_DATA_CARREGAMENTO STC
WHERE C.COD_MES = STC.COD_MES
AND ((C.COD_USF = STC.COD_CARREGAMENTO_USF AND STC.COD_CARREGAMENTO_USF IS NOT NULL) OR STC.COD_CARREGAMENTO_USF IS NULL);
BEGIN
FOR R_CONT IN C_CONT LOOP
UPDATE F_CONTAGENS
SET NUM_PNV_2_ANOS =
(SELECT SUM(PNV)
FROM (SELECT DECODE(F_PNV(COD_UTENTE,R_CONT.COD_USF,R_CONT.COD_MES,SUBSTR(R_CONT.COD_MES,1,4)), 'N', 0, 1) AS PNV
FROM (SELECT DISTINCT COD_UTENTE
FROM D_UTENTE
WHERE DATA_NASC >= ADD_MONTHS(R_CONT.COD_MES||'01', -24)
AND DATA_NASC <= ADD_MONTHS(last_day(R_CONT.COD_MES||'01'), -24)
AND MES_UTENTE = R_CONT.COD_MES
AND COD_USF = R_CONT.COD_USF))
WHERE COD_USF = R_CONT.COD_USF
AND COD_MES = R_CONT.COD_MES;
COMMIT;
END LOOP;
RETURN 1;
EXCEPTION
WHEN OTHERS THEN
NULL; -- enter any exception code here
RETURN NULL;
END;
Is the OWB not synchronized with the DB? Does any of you alredy experienced this situation?
Thank you very much for your attention,
Pedro.

HI Pedro,
if your function returns null then some exception has occured.
Do not catch the exception in your function, then you will see it when you run the mapping.
Maybe you run the mapping using a different db user than when running it directly? In that case some grants will help.
The exception will tell you the reason.
Regards,
Carsten.

Similar Messages

  • Test cases runs correctly on IDE but fails on the test runner

    Hi Guys,
    I have a test case here that works fine on my Mars IDE with RCPTT but fails when I run it via the Maven plugin on the same machine.
    The summary of the test case here is that it auto-generates some java files based on changes done to a DSL type language. You will see that there is a Generator project there that does this. Any changes to the type file will trigger the java file to be regenerated with whatever was defined in the Generator project. On the IDE it all works but when it's run via the test runner, it always fails for some reason.
    One interesting thing to note there is if that test case is run first, it does not fail. I initially suspected that the previous test case might have done something to the AUT workspace/environment but it's difficult to prove. The test case in question does have contexts to clear the workspace and to add projects as well as a context for setting the preferences. I did try removing all the contexts except for the workspace context that contains the project that it needs but the execution result is still the same. If I manually ran the same AUT (extracted somewhere else) with the generated test-runner aut workspace right after and made some changes to the type file, the java files are generated correctly.
    So the problem now is, we're not sure what the test runner is doing differently with the RCPTT IDE in this case. It would seem like the test runner is preventing the AUT from generating the files or there might be an error that prevents the generation from happening.
    I've attached the results folder from the test runner execution and the log file from the from the runner-workspace folder.
    cheers!
    Joseph

    Hi Folks,
    We've found out the cause of the problem and have found out that this is not entirely RCPTT related. Apologies for the disturbance. Marking this as a non-issue.
    cheers!
    Joseph

  • Graphics Component runs ok in NT but fails in Linux

              Hello,
              I am using Graphics Component thats runs ok in weblogic NT environment but fails
              in weblogic Linux environment. Following is the error:
              java.lang.InternalError: Can't connect to X11 window server using ':1' as the
              value of the DISPLAY variable.
                   at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
                   at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
                   at java.lang.Class.forName0(Native Method)
                   at java.lang.Class.forName(Class.java:120)
                   at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
                   at java.awt.Window.<init>(Window.java:186)
                   at java.awt.Frame.<init>(Frame.java:315)
                   at java.awt.Frame.<init>(Frame.java:262)
                   at javaside.Rbl.jspImage.init(jspImage.java:33)
                   at jsp_servlet._graphs._jspService(_graphs.java:246)
                   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Please Help!
              Thanks,
              Shishir.
              

    First, you'll need to make sure you're running an X server. I don't know
              the exact name of the X server, but it's likely running if you have one of
              the desktop managers.
              Next, try changing the DISPLAY environment variable. Try different
              variations:
              DISPLAY=localhost:0.0
              DISPLAY=localhost:0
              DISPLAY=my.ip.add.rr:0.0
              DISPLAY=my.ip.add.rr:0
              This env variable needs to be set when starting up WebLogic - usually in
              your startWebLogic.sh script.
              Hope this helps - feel free to email if you have questions.
              Thanks
              Rob
              "Shishir Kumar" <> wrote in message news:[email protected]...
              >
              > Hello,
              >
              > I am using Graphics Component thats runs ok in weblogic NT environment but
              fails
              > in weblogic Linux environment. Following is the error:
              >
              > java.lang.InternalError: Can't connect to X11 window server using ':1' as
              the
              > value of the DISPLAY variable.
              > at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
              > at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
              > at java.lang.Class.forName0(Native Method)
              > at java.lang.Class.forName(Class.java:120)
              > at
              java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
              .java:58)
              > at java.awt.Window.<init>(Window.java:186)
              > at java.awt.Frame.<init>(Frame.java:315)
              > at java.awt.Frame.<init>(Frame.java:262)
              > at javaside.Rbl.jspImage.init(jspImage.java:33)
              > at jsp_servlet._graphs._jspService(_graphs.java:246)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :213)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :246)
              > at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:1265)
              > at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :1631)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              > Please Help!
              >
              > Thanks,
              >
              > Shishir.
              >
              

  • Stored procedure runs OK from SSMS but fails from job scheduler

    I have a stored procedure that queries the sysmanagement_shared_registered_servers_internal table in MSDB and performs various other queries from the servers listed in that table via linked servers.  I have created a login called SQLInfo_user. When
    I run the stored procedure from SSMS with the connection as SQLInfo_user, everything works as designed. However, when I run the job from the job scheduler with SQLInfo_user as the "run as user" parameter, it fails with "Executed as user: SQLInfo_user.
    The SELECT permission was denied on the object 'sysmanagement_shared_registered_servers_internal', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (Error 229).  The step failed."  The login SQLInfo_user has full read and select permissions to
    that table in the MSDB database.  Any suggestions?  Thanks

    Try instead of  "run as user", make that user owner of job. Also, make sure your that user is in linked server for servers that you are connecting has equivalent user on the the destination servers. 
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • Package works w/ batch as admin but fails to run w/ Marimba (system acct)

    Hi.
    I created a package using NWSapSetupAdmin.exe with no problems.  I compressed the package to a self extractor install EXE.
    The package works great on any client when start the batch manually under my admin ID.
    If I use Marimba (BMC Bladelogic Configuration manager) to deploy the batch file it runs and fails trying to save various files to E:/Program Files instead of C:/Program Files  (E: drive is the dvd on most PC in our company).
    It should be pointing to c:\Program Files.   We can find no reason why the batch behaves differently in Marimba.
    Anyone ever hear of the package incorrectly pointing to the E: drive for program files?
    Thanks,
    Jim

    Why not try the latest version *1.6 update 13* ?

  • Stored procedure runs fine from SSMS but fails when called from the C# app

    I'm using SS Express 2012 so I doubt I have all possible debugging capabilities at my disposal, although I'm still trying to figure this out myself.
    The compiled C# application has logging to insure that the the SP is being invoked, the appropriate line of code is  definitely being reached. The logging always reports 'success' suggesting that the SP was successfully executed (and no exception is thrown
    to the C# app), but the indexes aren't getting rebuilt (I have a fragmentation query proving they are not rebuilt). Yet it runs successfully if I
        (1) set a breakpoint in the C# app and step through the code line by line OR
        (2) run the SP from the SSMS GUI.
    The fragmentation query confirms sucess for both 1 and 2.
    -I can't rely on the GUI because I want to run this overnight immediately after the C# app is finished inserting new records.
    - The SP loops through all the tables, and all the indexes in each table, checking for fragmentation and rebuilding any indexes over 7% fragmented.
    ALTER Procedure [dbo].[usp_RebuildIndexes]
    AS
    Declare @fetch_TableName NVARCHAR(256)
    DECLARE Cursor_Tables CURSOR FOR
    SELECT Name FROM sysobjects WHERE xtype ='U'
    OPEN Cursor_Tables
    While 1 = 1 -- Begin to Loop through all tables
    BEGIN
    FETCH NEXT FROM Cursor_Tables INTO @fetch_TableName -- fetches the next table
    if @@FETCH_STATUS <> 0 break
    print '---------' + @fetch_TableName
    Declare @fetch_indexName NVARCHAR(256) -- loops through al indexes of the current table
    DECLARE Cursor_Indexes CURSOR FOR -- Looking for indexes fragmented more than 7 percent.
    SELECT name as indexName
    FROM sys.dm_db_index_physical_stats (DB_ID(DB_Name()), OBJECT_ID(@fetch_TableName), NULL, NULL, NULL) AS a
    JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id
    Where Name is not null and avg_fragmentation_in_percent > 7
    OPEN Cursor_Indexes
    WHILE 1= 1 -- Begin to Loop through all Indexes
    BEGIN
    FETCH NEXT FROM [Cursor_Indexes] INTO @fetch_indexName
    if @@FETCH_STATUS <> 0 break
    Declare @SqL nvarchar(2000) = N'ALTER INDEX ' + @fetch_indexName + ' ON ' + DB_Name() + '.dbo.' + @fetch_TableName + ' Rebuild'
    print @Sql
    Begin TRy
    Execute sp_executeSQL @sql
    End Try
    Begin Catch
    Declare @err nvarchar(2000) = ERROR_MESSAGE();
    throw 51000, @err, 1
    End Catch
    End -- Ends looping through all indexes
    CLOSE [Cursor_Indexes]
    DEALLOCATE [Cursor_Indexes]
    End -- Ends looping through all tables
    CLOSE Cursor_Tables
    DEALLOCATE Cursor_Tables
    foreach (objDB DB in oUserPrefs.DBs) {
    report += DB.Real_Name;
    if (DB.cn == null) DB.cn = sqlCn(DB.Real_Name, SystemInformation.ComputerName);
    try {
    if (DB.cn.State != ConnectionState.Open) DB.cn.Open();
    } catch (Exception ex) {
    report += " - Failed because can't open a connection.\r\n";
    continue;
    DB.OpenedAConnection = true;
    DataTable dt = null;
    try {
    dt = oParam.fillDt("dbo.usp_RebuildIndexes", DB.cn, null);
    } catch (Exception ex) {
    report += " -failed because " + ex.Message + "\r\n\r\n";
    continue;
    report += " - success.\r\n";
    DB.LastTimeRebuiltIndexes = DateTime.Now;

    Your proc is a bit of a mess and hard to read. This should get you what you need though. I added a little logic in the middle that determines if the index should be reorged, or rebuilt.
    You were right that my script was too messy and I used your code/logic to rewrite mine. Thanks! I tried it this morning and it worked fine, but I will have to see how it runs overnight to be sure.
    Here's the weird thing. My original code should have worked. In fact I'm actually using it in 3 c-sharp apps each of which has 3 to 7  Express 2012 databases (about 10 million records per database). For about a month it's been working fine on two of the
    apps. Furthermore this morning I used a commercial file-comparison tool to verify that the 3rd app has been running an identical version of the SP. So I'm at a total loss as to what went wrong in the 3rd app.
    Here's my rewrite.
    Alter Procedure [dbo].[usp_RebuildIndexes]
    As
    Declare @Messages Table(Msg nvarchar(2000))
    Declare @IndexName nvarchar(256), @TableName NVARCHAR(256)
    DECLARE Cursor_Indexes CURSOR FAST_FORWARD FOR -- GEt a list of all indexes for all tables.
    select idxs.name as indexName, o.Name as TableName
    from sys.indexes idxs
    inner join sysobjects o on idxs.object_id = o.id
    inner join sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL,NULL,NULL) as stats
    on stats.object_id = idxs.object_id and stats.index_id = idxs.index_id
    where xtype = 'u' and idxs.name is not null And avg_fragmentation_in_percent > 7
    OPEN Cursor_Indexes
    While 1 = 1
    BEGIN
    FETCH NEXT FROM Cursor_Indexes INTO @IndexName, @TableName
    if @@FETCH_STATUS <> 0 break
    Declare @SqL nvarchar(2000) = N'ALTER INDEX ' + @IndexName + ' ON ' + DB_Name() + '.dbo.' + @TableName + ' Rebuild'
    insert @Messages(Msg)VALUES(@sql)
    Execute sp_executeSQL @sql
    End
    CLOSE [Cursor_Indexes]
    DEALLOCATE [Cursor_Indexes]
    Select * From @Messages

  • App runs fine in simulator but fails on iPad

    My app has been running fine in the simulator environment but tried running for the first time on an iPad.  It loads the first screen (which is a table view) but if I try to do anything, including just scrolling the table, it crashes.  The Xcode organiser shows the following:
    >
    Aug 11 17:24:29 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
    Aug 11 17:24:29 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xd6d9]) Exited: Killed: 9
    Aug 11 17:24:29 unknown SpringBoard[15] <Warning>: Application 'FaceTime' exited abnormally with signal 9: Killed: 9
    Aug 11 17:24:29 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.andion.TKD[0x6992]) Exited: Killed: 9
    Aug 11 17:24:29 unknown ReportCrash[1286] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-08-11-172429.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
    Aug 11 17:24:29 unknown SpringBoard[15] <Warning>: Application 'TKD' exited abnormally with signal 9: Killed: 9
    > >
    If I look in the crash logs in organiser all I can see is one from Safari dated weeks ago.  How do I find the log referred to in the message above?
    The app (TKD) is 16MB and the iPad reports 26GB available, so although there appears to be a reference to LowMemory, surely that isn't actually the problem?   Am I doing something which is impacting FaceTime and why is there a message about com.apple.mobilephone on an iPad?  Am I doing something horribly wrong?
    Any help much appreciated!

    'killed' typically means the app was unresponsive just long enough for the OS to take action.
    You should be able to see something in Xcode's console during debugging on the device.
    Ken

  • Applet - Oracle 8.0 database connectivity failing in Netscape Browser

    I have written a Java Applet to connect to the Oracle (8.0) database. My Applet is residing in a remote server. The Applet connected to the database when run in Internet Explorer, but failed to connect to the database using Netscape Navigator (4.08) and resulted in the following error
    java.lang.NullPointerException
    at oracle.jdbc.driver.OracleStatement.get_column_index(Compiled Code)
    at oracle.jdbc.driver.OracleResultSet.findColumn(Compiled Code)
    at oracle.jdbc.driver.OracleResultSet.getInt(Compiled Code)
    at EmpActivityApplet.getActivityData(Compiled Code)
    at EmpActivityApplet.paint(Compiled Code)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    * at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    I have zipped the my Java Applet program with the Oracle Thin Driver classes (EmpActivityApplet.zip) and coded the following HTML page to load the Applet:
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
    <TITLE>untitled</TITLE>
    </head>
    <body>
    <applet code="EmpActivityApplet" CODEBASE="." ARCHIVE="EmpActivityApplet.zip"
    WIDTH = 1000
    HEIGHT = 300>
    </applet>
    </body>
    </html>
    Please somebody help me in resolving this problem. This is urgent.
    Please reply to [email protected]
    Regards,
    Raju.

    Hi,
    If ur Applet Needs to Access the System Resouces(JDBC API calls) u have to Make ur Applet trusted.U can Use the Keytool utility Bundled with JDK to Achecive this.The Actual Problem u may get is a Security Exception Due to which u cannot create a Connection Object which results in a Null Pointer Exception
    thankx,
    A.Md Abubacker

  • Database logon failed. Database Vendor Error Code: 0

    Hi all,
    I'm running a java web application and use crystal report XI.
    It works normally. One thing is : i would like to change the "Connection URL" when runtime.
    These are my config:
    _CRConfig.xml :
    <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
        <reportlocation>../..</reportlocation>
        <timeout>10</timeout>
        <ExternalFunctionLibraryClassNames>
              <classname> </classname>
              <classname> </classname>
        </ExternalFunctionLibraryClassNames>
    <keycode>B6W60-01CS200-00GEGC0-0EX1</keycode>
    <Javaserver-configuration>
    <DataDriverCommon>
         <JavaDir>C:\Business Objects\j2sdk1.4.2_08\bin</JavaDir>
        <Classpath>C:\Business Objects\Common\3.5\java/lib/crlovmanifest.jar;C:\Business Objects\Common\3.5\java/lib/CRLOVExternal.jar;C:\Business Objects\Common\3.5\java/lib/CRDBJavaServerCommon.jar;C:\Business Objects\Common\3.5\java/lib/CRDBJavaServer.jar;C:\Business Objects\Common\3.5\java/lib/CRDBJDBCServer.jar;C:\Business Objects\Common\3.5\java/lib/CRDBXMLServer.jar;C:\Business Objects\Common\3.5\java/lib/CRDBJavaBeansServer.jar;C:\Business Objects\Common\3.5\java/lib/external/CRDBXMLExternal.jar;C:\Business Objects\Common\3.5\java/lib/external/log4j.jar;C:\Business Objects\Common\3.5\java/lib/cecore.jar;C:\Business Objects\Common\3.5\java/lib/celib.jar;C:\Business Objects\Common\3.5\java/lib/ebus405.jar;C:\Business Objects\Common\3.5\java/lib/corbaidl.jar;C:\Business Objects\Common\3.5\java/lib/external/freessl201.jar;C:\Business Objects\Common\3.5\java/lib/external/asn1.jar;C:\Business Objects\Common\3.5\java/lib/external/certj.jar;C:\Program Files\Business Objects\Common\3.5\java/lib/external/jsafe.jar;C:\Business Objects\Common\3.5\java/lib/external/sslj.jar;C:\tomcat\common\lib\oracle-driver.jar${CLASSPATH}</Classpath>
         <IORFileLocation>${TEMP}</IORFileLocation>
         <JavaServerTimeout>1800</JavaServerTimeout>
         <JVMMaxHeap>256000000</JVMMaxHeap>
         <JVMMinHeap>32000000</JVMMinHeap>
         <NumberOfThreads>100</NumberOfThreads>
    </DataDriverCommon>
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL>jdbc:mysql://Komodo-vmw:3306/warcraft</JDBCURL>
         <JDBCClassName>com.mysql.jdbc.Driver</JDBCClassName>
         <JDBCUserName>root</JDBCUserName>
         <JNDIURL></JNDIURL>
         <JNDIConnectionFactory></JNDIConnectionFactory>
         <JNDIInitContext>/</JNDIInitContext>
         <JNDIUserName>weblogic</JNDIUserName>
         <GenericJDBCDriver>
              <Default>
                   <ServerType>UNKNOWN</ServerType>
                   <QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>Standard</LogonStyle>
              </Default>
              <Sybase>
                   <ServerType>SYBASE</ServerType>
                   <QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
                   <DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>MySQL</LogonStyle>
              </Sybase>
         </GenericJDBCDriver>
    </JDBC>
    <XML>
         <CacheRowSetSize>100</CacheRowSetSize>
         <PreReadNBytes>4096</PreReadNBytes>
         <XMLLocalURL></XMLLocalURL>
         <SchemaLocalURL></SchemaLocalURL>
         <XMLHttpURL></XMLHttpURL>
         <SchemaHttpURL></SchemaHttpURL>
    </XML>
    <JavaBeans>
        <CacheRowSetSize>100</CacheRowSetSize>
         <JavaBeansClassPath></JavaBeansClassPath>
    </JavaBeans>
    </Javaserver-configuration>
    </CrystalReportEngine-configuration>
    _JSP file :
    public ConnectionInfos setLogon()  {
              String dbUser = "root";
              String dbPassword ="root";
              ConnectionInfos oConnectionInfos=null;
               try
                    //Create a new ConnectionInfos and ConnectionInfo object;
                    oConnectionInfos = new ConnectionInfos();
                  ConnectionInfo oConnectionInfo = new ConnectionInfo();
                  //Set username and password for the report's database
                  oConnectionInfo.setUserName(dbUser);
                  oConnectionInfo.setPassword(dbPassword);
              PropertyBag pro = new PropertyBag();
                  Map<String, String> bag = new HashMap<String, String>();
                   bag.put("Connection URL", "jdbc:mysql://Komodo-vmw:3306/warcraft");
                   bag.put("Server Type", "JDBC (JNDI)");
                   bag.put("Database DLL", "crdb_jdbc.dll");
                   bag.put("Database Class Name", "com.mysql.jdbc.Driver");
                  oConnectionInfo.setAttributes(new PropertyBag(bag));          
                  //Add object to collection
                  oConnectionInfos.add(oConnectionInfo);               
              } catch(Exception se) {
                   se.printStackTrace();
                   System.out.println("[error in setLogon ]");
              return oConnectionInfos;     
    And i got error every times i run the report :
    Database logon failed. Database Vendor Error Code: 0
    Please help me.Thank you so much!

    Hi quang.
    can u tell me how to solve this issue? on trying to open a report am facing this issue!
    TIA

  • Firefox "loads" but fails to display.

    After updating Firefox, the browser loads (it shows up as running in Task Manager) but fails to display on screen. In other words, it is completely unusable. I've uninstalled & reinstalled the program, without favorable results.

    It is possible that your security software (firewall, anti-virus) blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full, unrestricted, access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    *https://support.mozilla.org/kb/fix-problems-connecting-websites-after-updating

  • SSIS 2012 package runs under SSDT but fails with permission error from SSMS

    I have a simple package that pulls data from a text file located on a Windows file server that runs successfully from SSDT on my client.
    However, when deployed and running the package via SSMS from the client, the package fails with a permission error, with the error stating that the data file could not be opened.
    I have done some investigation and have seen some info that states that a package run from SSMS runs under the account on which you are logged on to the machine, which I would have thought is correct. This is therefore the same account when running from
    SSDT (which works) and I can see from the SSIS Report that the 'Caller' is stated as my account, so if this is the case why isin't the package working.
    I've also seen an MSDN forum answer which stated the opposite that the package when run from the IS Catalog in SSMS doesn't run under the account on which the client is logged on with, which is the opposite of the above, but doesn't indicate which account
    it is using.
    So what account is being used to run SSIS 2012 packages from the IS catalog from within SSMS ?
    If it is the account on which you are logged onto the client running SSMS, why is it not working when the account has the necessary permissions (as provent when running from SSDT) ?

    I am aware it's using my account and not one of the service. There's nothing in the posts above which suggests I'm using the service account. I don't know why people keep assuming that I'm running the package from a job. I've never stated that in any of
    the posts I'm running the package from a job. It's been made quite clear I'm running the package from the IS Catalog on SSMS:
    "This is simply selecting a package from the IS Catalog, right-clicking and selecting Execute package.", as per the Nov 18 post, and in the original post "....So what account is being used to run SSIS 2012 packages from the IS catalog from
    within SSMS".
    Just to be clear, the package is NOT being run from a job. It's using the Execute package option when selecting the package within SSMS from the IS Catalog and it's running under the account on which I am logged on to my client.
    Please read carefully. I was just answering your question "So what account is being used to run SSIS 2012 packages from the IS catalog from within SSMS ?" and stating that you where right and that it uses your account to run the package
    when you execute a package manually from the Catalog and that you can prove that by logging the system variable.
    A good suggestion about using a share in the task to map the drive and I will try this. I would find it strange that SSMS requires this mapping whereas SSDT does not though.
    Ok let us know your findings. If it doesn't work you can also test it with a password and username:
    net use f: \\financial\public  yourpassword /user:username
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • SSIS Package compiled successful, in SQL Server Integration Service package executed sucessful, But fail to run in MS SQL Job Scheduler

    Hi Everyone,
    I having a problem to transfer data from MS SQL 2005 to IBMAS400. Previously my SSIS was running perfectly but there is some changes I need to be done in order for the system to work well. Considers my changes are minimal & just for upgrades (but I did
    include DELETE statements to truncate AS400 table before I insert fresh data from MS SQL table to the same AS400 table), so I compile my SSIS package & it run successfully & I passed it into MS SQL Integrated Service as 1 of the packages & manually
    executed the package & the result is the same, that mean it was successful again but when I try to run it in a MS SQL Job Scheduler, the job failed with these message shown below as extracted from the job View history. 
    Date today
    Log Job History (MSSQLToAS400)
    Step ID 1
    Server MSSQLServer
    Job Name MSSQLToAS400
    Step Name pumptoAS400
    Duration 00:00:36
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    Message
    Executed as user: MSSQLServer\SYSTEM. ... 9.00.4035.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    
    Started:  today time  
    Error: on today time     
    Code: 0xC0202009     Source: SSISMSSQLToAS400 Connection manager "SourceToDestinationOLEDB"     
    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. 
    Error code: 0x80004005.  An OLE DB record is available.  
    Source: "IBMDA400 Session"  
    Hresult: 0x80004005  
    Description: "CWBSY0002 - Password for user AS400ADMIN on system AS400SYSTEM is not correct ".  End Error  
    Error: today     
    Code: 0xC020801C     
    Source: Data Flow Task OLE DB Destination [5160]     
    Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "DestinationClearData" failed with error code 0xC0202009.  There may be error messages posted before
    this with more information on why the AcquireConnection method ca...  The package execution fa...  The step failed.
    So I hope somebody can shed some hints or tips for me to overcome time problem of mine. Thanks for your help in advance. As I had scoured thoroughout MSDN forums & found none solution for my problem yet. 
    PS: In the SQL Integrated Services when I deployed the package I set the security of the packages to Rely on server... 
    Hope this will help.

    Hi Ironmaidenroxz,
    From the message “Executed as user: MSSQLServer\SYSTEM”, we can see that the SQL Server Agent job ran under the Local System account. However, a Local System account doesn’t have the network rights natively, therefore, the job failed to communicate with
    the remote IBMAS400 server.
    To address this issue, you need to create a proxy account for SQL Server Agent to run the job. When creating the credentials for the proxy account, you can use the Windows domain account under which you executed the package manually.
    References:
    How to: Create a Credential
    How to: Create a Proxy
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS package runs from BIDS and by Executing package, but failing with Job

    I have SQL Serve 2012 SSIS. I have problems to run from SQL Server Agent Job.
    Steps runs SSIS package without configuration file. Package Run64BitRuntime is False in BIDS.
    Package is runned by SQL Server Agent Service Account.
    Server does not have Office 2010/2013 installed. Should it be installed?
    ERROR1:
    Description: The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered.
    If the 64-bit driver is not installed<c/> run the package in 32-bit mode.
    ERROR2: (here SSIS package is trying to import XML source, but cannot file file)
    Description: An error occurred with the following error message: "Could not find file 'D:\Integration\Metadata\'.". 
    Kenny_I

    Hi Kenny,
    It seems like you are using Excel as source file right? If yes, then please follow below steps:
    Edit the job step and Check the option: Use 32 bit run time. Below is the screenshot for the same.
    Please let me know for any questions.
    Thanks, Madhu

  • Is X-windows and GUI desktops supported on the ODA "engineered system" running a RAC database?  If it is, what is the yum command needed to install the X-windows, Gnome, and KDE package groups?

    Is X-windows and GUI desktops supported on the ODA "engineered system" running a RAC database?  If it is, what is the yum command needed to install the X-windows, Gnome, and KDE package groups?

    While I agree with the direction of the suggestions with installing packages for X-windows, we do not have a blanket 'apply any package' recommendation.
    In particular we do not support altering the kernel (although we do have exceptions which we review on a case by case basis).
    Basically, if the you want to alter functionality that would not impact core functionality you are usually fine.
    A good guideling is : The more dependencies that there are between the package / rpm you are considering using the higher the potential impact on functionality - meaning higher chance for problems
    Note: We do use VNC including Real and Tiger regularly , but we have no hard recommendation on how you may want to use X-windows. I have never seen a limitation other than comments on bugs
    or incompatibility within the X-window product itself with certain kernel levels.
    Patching may overwrite some packages that you may install, however,  _depending on packages/rpms added_ there is also the possibility that you will break existing functionality to the point
    that patching itself will fail ( we have already seen a few cases of this in which case the proper mitigation is to remove / roll-back any alterations to the ODA before patching, and then adding the packages/rpms
    back after the patching is completed.
    From what you are discussing the impact should be low without conflicts, but please consider the above, and if you have specific packages which you consider potential problems
    please create an SR so that we can review packages / rpms on an individual basis.
    Once again: the main criteria for not supporting rpms is regarding the kernel itself
    Chuck

  • DBMS_JOB using Packaged Functions but Package goes invalid

    Is there any way to check a package while running a PL/SQL procedure to see if it's state is valid and then catch the exception?
    In my case usually just calling any function in the package 1x clears it up but the procedure in question runs as a DBMS_JOB it just keeps failing. This procedure could run often enough that Oracle will mark it as broken but I want to give it every shot at execution on time instead of having to make it wait till the next cycle.
    What I would like to do is to catch the exception for the package state being invalid and basically have it go back to the beginning of the procedure and give it another try before failing in case it is just a failure because the package has been altered.
    Is there any way to do this?

    Firstly, I'll copy/paste my standard response regarding package state going invalid as it usually helps to have an understanding of these things...
    Packages tend to fail because of their "package state". A package has a "state" when it contains package level variables/constants etc. and the package is called. Upon first calling the package, the "state" is created in memory to hold the values of those variables etc. If an object that the package depends upon e.g. a table is altered in some way e.g. dropped and recreated, then because of the database dependencies, the package takes on an INVALID status. When you next make a call to the package, Oracle looks at the status and sees that it is invalid, then determines that the package has a "state". Because something has altered that the package depended upon, the state is taken as being out of date and is discarded, thus causing the "Package state has been discarded" error message.
    If a package does not have package level variables etc. i.e. the "state" then, taking the same example above, the package takes on an INVALID status, but when you next make a call to the package, Oracle sees it as Invalid, but knows that there is no "state" attached to it, and so is able to recompile the package automatically and then carry on execution without causing any error messages. The only exception here is if the thing that the package was dependant on has changes in such a way that the package cannot compile, in which case you'll get an Invalid package type of error.
    And if you want to know how to prevent discarded package states....
    Move all constants and variables into a stand-alone package spec and reference those from your initial package. Thus when the status of your original package is invlidated for whatever reason, it has no package state and can be recompiled automatically, however the package containing the vars/const will not become invalidated as it has no dependencies, so the state that is in memory for that package will remain and can continue to be used.
    As for having package level cursors, you'll need to make these local to the procedures/functions using them as you won't be able to reference cursors across packages like that (not sure about using REF CURSORS though.... there's one for me to investigate!)
    This first example shows the package state being invalided by the addition of a new column on the table, and causing it to give a "Package state discarded" error...
    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  /
    Table created.
    SQL>
    SQL> insert into dependonme values (5)
      2  /
    1 row created.
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  /
    Package created.
    SQL>
    SQL> create or replace package body mypkg is
      2    v_statevar number := 5; -- this means my package has a state
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
    10
    11      myval := myval * v_statevar;
    12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
    13    end;
    14  end mypkg;
    15  /
    Package body created.
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALID
    SQL>
    SQL>
    SQL> alter table dependonme add (y number)
      2  /
    Table altered.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    BEGIN mypkg.myproc; END;
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package body "SCOTT.MYPKG" has been invalidated
    ORA-06508: PL/SQL: could not find program unit being called: "SCOTT.MYPKG"
    ORA-06512: at line 1
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALIDAnd this next example shows how having the package variables in their own package spec, allows the package to automatically recompile when it is called even though it became invalidated by the action of adding a column to the table.
    SQL> drop table dependonme
      2  /
    Table dropped.
    SQL>
    SQL> drop package mypkg
      2  /
    Package dropped.
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  /
    Table created.
    SQL>
    SQL> insert into dependonme values (5)
      2  /
    1 row created.
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  /
    Package created.
    SQL>
    SQL> create or replace package mypkg_state is
      2    v_statevar number := 5; -- package state in seperate package spec
      3  end mypkg_state;
      4  /
    Package created.
    SQL>
    SQL> create or replace package body mypkg is
      2    -- this package has no state area
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
    10
    11      myval := myval * mypkg_state.v_statevar;  -- note: references the mypkg_state package
    12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
    13    end;
    14  end mypkg;
    15  /
    Package body created.
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALID
    SQL>
    SQL> alter table dependonme add (y number)
      2  /
    Table altered.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.---------------------------------------------------------------------------------------------
    Secondly, from this above standard response, you can see how to check for package state if you want to determine it programatically.
    ;)

Maybe you are looking for