Cursor Not working stored Procedure but it working in anonymous Procedure

Hi Gurus....
My problem looks different.....my code was working as anonymous block where as it was not working as stored Procedure
Declare
cursor c_tblspace is
select fs.tablespace_name TBL_SPC_NAME
       , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
         from sys.dba_data_files df
       , sys.dba_free_space fs
        ,partition_tables ms
     where df.file_id(+) = fs.file_id
     and fs.tablespace_name =ms.tbspc_nam
     group by fs.file_id, df.bytes, fs.tablespace_name;
begin
  for rec_tblspace in c_tblspace
       loop
        if ( rec_tblspace.PCT_Free > 5 )
         then
         insert into t_space (tbspc_nm,ftr_spc)
         values(rec_tblspace.TBL_SPC_NAME,'full');
         dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
         end if;
       end loop;
end;where as it working while i want to create a stored Procedure...
create or replace procedure p_upd_space is
cursor c_tblspace is
select fs.tablespace_name TBL_SPC_NAME
       , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free 
         from sys.dba_data_files df
       , sys.dba_free_space fs
        ,partition_tables ms
     where df.file_id(+) = fs.file_id
     and fs.tablespace_name =ms.tbspc_nam
     group by fs.file_id, df.bytes, fs.tablespace_name;
begin
  for rec_tblspace in c_tblspace
       loop
         if ( rec_tblspace.PCT_Free > 5 )
         then
         insert into t_space (tbspc_nm,ftr_spc)
         values(rec_tblspace.TBL_SPC_NAME,'full');
         dbms_output.put_line(rec_tblspace.TBL_SPC_NAME||' is full');
         end if;
       end loop;
end;It was throwing following error...
PL/SQL: ORA-00942: table or view does not exist

Justin is right. You are creating definer right stored procedure.
Roles are disabled during definer rights stored procedure compilation and execution.
Here is the test case:
#1. Anonymous Procedure
HRDEMO@fmw//scripts> conn / as sysdba
SYS@fmw//scripts> create user todd identified by oracle;
SYS@fmw//scripts> grant dba to todd; --DBA role granted
SYS@fmw//scripts> conn todd/oracle
TODD@fmw//scripts> declare
2 cursor c is select * from dba_data_files;
3 begin
4 null;
5 end;
6 /
PL/SQL procedure successfully completed.
#2. Stored Procedure
TODD@fmw//scripts> create or replace procedure p1
2 is
3 cursor c is select * from dba_data_files;
4 begin
5 null;
6 end;
7 /
Warning: Procedure created with compilation errors.
TODD@fmw//scripts> show error
3/27
PL/SQL: ORA-00942: table or view does not exist

Similar Messages

  • Retrieving cursor from a stored procedure

    Hi,
    Is there any means to retrieve a cursor from a stored procedure using java.sql.* package, without using database specific type code like OracleTypes.CURSOR?
    Regards,
    Shalin.

    Hi,
    I had some across this problem some time ago. Although, there is no direct answer to this solution, there is a "kloog" that you can apply.
    Please note that the signature for registerOutParameter(int parameterIndex, int sqlType), and note that where ever sqlType is mentioned it is an int.
    Now JDBC is an interface and the implementation is given by Oracle. So to register an "out" parameter all you have to do is registerOutParameter(1, OracleTypes.CURSOR). It works!
    Or otherwise try and find out what the int value of CURSOR is and replace. This is because not all databases can support returning a "cursor" type, since ORACLE and few other databases have a concept of "STORED PROCEDURE" and PLSQL is specific to ORACLE.
    I hope this helps!
    Cheers,
    John.

  • Could not find stored procedure

    Dear gurus,
    I am working, for the first time, on a SAP BPC ( MS ) demo.
    I have created a new input schedule based on a dynamic template, with some modifications.
    However when I try to submit data, it gives an error:
    "Could not find stored procedure 'dbo.up_ConcurrentLockDEL_HR'.;"
    DEL_HR is my application and is based on a existing one "FINANCE", but I have added new dimensions and deleted another ones.
    I can not understand this message because I don't know where I define stored procedures. I also commented all script logics that this application had.
    Could you help me on this?
    Best regards,
    Vitor Ramalho

    Hi Vitor,
    You need to login to the server, where SQL has been installed. You can login to that system using remote desktop connection.
    Once you login to the SQL server, under the databases, you will find your application set. Expand it and navigate to Programmability and then to Stored Procedures. Here, you will get all the stored procedures.
    The above statements will guide you to find the stored procedures. However, the problem, we are looking at is little different. Usually, with every application, a stored procedure with the name, "dbo.up_ConcurrentLockappname" gets created automatically. However, I am guessing that this stored procedure is not available for your application. Search for the stored procedure just to make sure that its available or not. If its not available, search for dbo.up_ConcurrentLockFinance. I am asking to search for the Finance one since your application is copy of the Finance application. So, just to make sure that the source application is fine. If this stored procedure is present but the stored procedure for your application is not present, then I would suggest you to create the application once again. Process it properly.
    Hope this helps.

  • [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.

    OK, something seemed to have changed with my system because this error is NEW. It might be related to my system upgrade from Vista to Win7, but just guessing here.
    I run a database on a corporate MS Sql Server (2005) and an ASP application that connects via ODBC. The real world application works fine, however when I attempt to access Stored Procedures from Dreamweaver (on my development machine)  I am getting the following error:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.
    This only seems to happen on Stored procedures that RETURN a recordset.
    system:
    Win7
    Dreamweaver CS4
    Code: VBScript/Classic ASP
    SQL Server 2005
    Connecting via ODBC: MM_MY_STRING = "Driver={SQL Server};Server=wscxxxxxxxxx;Database=dbsystem;Uid=username;Pwd=XXXXXXXXXXXX"
    Stored procedures that do not return a recordset are not an issue.... this has put my development work at a standstill!!
    Thanks in advance!

    Well, I hate bumps, but I am really running out of solutions. I have now tried to use a system DSN on my development machine and that didnt solve the problem. I just un-installed DW and re-installed it and that didnt solve my problem either.
    This is very frustrating, because I cannot use any stored procs that return recordsets... I am stuck... can anybody think of a relatively easy work-around to working in DW w/ recordsets that come from SPs when you cant actually access them?
    The really weird thing is, when I build the command, and choose the stored proc, and give it valid input variables, and TEST it from the TEST button, everything works and data is returned as expected. Once I click "OK" and actually add it to the ASP page the recordset that should be visible isnt... and when I click the plus sign in the bindings window I get the error...
    Help!!

  • Could not execute stored procedure in oracle

    hello experts,
    Problem: I can not execute stored procedures stored in Oracle data base. Error Message: Portal request failed. Could not execute stored procedure.
    My steps:
    i connected my locally installed Oracle data base to the VC. I mapped the data base user to my VC user. I tested connection and it is fine. Further I see the db alias in Visual Composer and i can drop stored procedures to my story board. I can define parameters, but when I am executing procedures I get the error message.
    Further I installed MS SQL Server lokally and connected to the VC and it is working fine. I can do everything.
    Why it is not working for Oracle DB?
    DriverName: com.sap.portals.jdbc.oracle.OracleDriver
    Connect-URL: jdbc:sap:oracle://ip:port;sid=XE
    Any comment is highly appreciated.
    anton.

    Hi,
    Also you can follow this link which explains you the procedure to configure BI JDBC system for visual composer.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
    Regards
    Inder
    Do reward points if helpful.

  • How to get an UPDATABLE REF CURSOR from the STORED PROCEDURE

    using C# with
    ORACLE OLE DB version: 9.0.0.1
    ADO version: 2.7
    I returns a REF CURSOR from a stored procedure seems like:
    type TCursor is ref cursor;
    procedure test_out_cursor(p_Dummy in varchar, p_Cur out TCursor) is
    begin
         open p_Cur for select * from DUAL;
    end;
    I create an ADO Command object and set
    cmd.Properties["IRowsetChange"].Value = true;
    cmd.Properties["Updatability"].Value = 7;
    cmd.Properties["PLSQLRSet"].Value = 1;
    cmd.CommandText = "{CALL OXSYS.TEST.TEST_OUT_CURSOR(?)}";
    and I use a Recordset object to open it:
    rs.Open(cmd, Missing.Value,
    ADODB.CursorTypeEnum.adOpenStatic,
    ADODB.LockTypeEnum.adLockBatchOptimistic,
    (int) ADODB.CommandTypeEnum.adCmdText +
    (int) ADODB.ExecuteOptionEnum.adOptionUnspecified);
    The rs can be opened but can NOT be updated!
    I saved the recordset into a XML file and there's no
    rs:baseschema/rs:basetable/rs:basecolumn
    attributes for "s:AttributeType" element.
    Any one have idea about this?
    thanks very much

    It is not possible through ADO/OLEDB.
    Try ODP.NET currently in Beta, it is possible to update DataSet created with refcursors. You need to specify your custom SQL or SP to send update/insert/delete.
    As I remember there is a sample with ODP.NET Beta 1 just doing this.

  • Could not find stored procedure 'mds_getRepositoryVersion'.

    When I start up the BI_Server1 component I get the following error in the logs and the server goes into ADMIN state. Any ideas what may be causing this? I've fixed a previous issue with wrong password in mds-owsm,that error is gone now.
    I've already confirmed I can access the database through SSMS.
    SELECT OBI_REP.BI116_MDS.mds_getRepositoryVersion()
    Result:
    11.1.1.61.63
    OBIEE11g 11.1.1.6
    Sql Server 2008 R2
    Windows Server 2008
    ####<Jul 20, 2012 5:27:18 PM EDT> <Info> <JDBC> <******> <bi_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <0000JYaIM1pEgKhwD8icKw1G2SoP000002> <1342819638294> <BEA-001128> <Connection for pool "mds-owsm" closed.>
    ####<Jul 20, 2012 5:27:18 PM EDT> <Error> <JDBC> <WUVW****> <bi_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <0000JYaIM1pEgKhwD8icKw1G2SoP000002> <1342819638313> <BEA-001112> <Test "SELECT 1 FROM DUAL" set up for pool "mds-owsm" failed with exception: "java.sql.SQLSyntaxErrorException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'DUAL'.".>
    ####<Jul 20, 2012 5:27:18 PM EDT> <Error> <JDBC> <WU****> <bi_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <0000JYaIM1pEgKhwD8icKw1G2SoP000002> <1342819638315> <BEA-001111> <Unable to verify the test "SELECT 1 FROM DUAL" set up for pool "mds-owsm". Connections will not be tested. The test will not be used by isValid neither.>
    ####<Jul 20, 2012 5:27:18 PM EDT> <Info> <Common> <WU*****> <bi_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <0000JYaIM1pEgKhwD8icKw1G2SoP000002> <1342819638318> <BEA-000628> <Created "1" resources for pool "mds-owsm", out of which "1" are available and "0" are unavailable.>
    ####<Jul 20, 2012 5:27:18 PM EDT> <Error> <Deployer> <WU******> <bi_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000JYaIM1pEgKhwD8icKw1G2SoP000002> <1342819638608> <BEA-149205> <Failed to initialize the application 'bipublisher [Version=11.1.1]' due to error oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    [FMWGEN][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'mds_getRepositoryVersion'.
    oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    [FMWGEN][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'mds_getRepositoryVersion'.
         at oracle.mds.config.PConfig.loadFromBean(PConfig.java:953)
         at oracle.mds.config.PConfig.<init>(PConfig.java:758)
         at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:787)
         at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:848)
         at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:491)
         at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:438)
         at oracle.mds.internal.lcm.deploy.DeployManager.deploy(DeployManager.java:516)
         at oracle.mds.internal.lcm.deploy.DeployManager.startDeployment(DeployManager.java:204)
         at oracle.mds.internal.lcm.MDSLifecycleListenerImpl.start(MDSLifecycleListenerImpl.java:215)
         at oracle.mds.lcm.weblogic.WLLifecycleListener.preStart(WLLifecycleListener.java:77)
         at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)
         at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)
         at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    [FMWGEN][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'mds_getRepositoryVersion'.
         at oracle.mds.config.PConfig.loadFromBean(PConfig.java:953)
         at oracle.mds.config.PConfig.<init>(PConfig.java:758)
         at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:787)
         at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:848)
         at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:491)
         at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:438)
         at oracle.mds.internal.lcm.deploy.DeployManager.deploy(DeployManager.java:516)
         at oracle.mds.internal.lcm.deploy.DeployManager.startDeployment(DeployManager.java:204)
         at oracle.mds.internal.lcm.MDSLifecycleListenerImpl.start(MDSLifecycleListenerImpl.java:215)
         at oracle.mds.lcm.weblogic.WLLifecycleListener.preStart(WLLifecycleListener.java:77)
         at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)
         at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)
         at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    Edited by: 844667 on Jul 20, 2012 2:48 PM

    Hi,
    I am getting the same thing and have not been able to find a resolution - would you happen to recall how you resolved this?

  • Can not see Stored Procedures owned by "Code Owner"

    Post Author: BinChen
    CA Forum: Deployment
    I am using Data Source defined with "CR Oracle ODBC Driver 5.0" in "Data Source (ODBC)".
    But in Crystal Report XI, I can not see CodeOwner when I can created a new connection using ODBC (RDO).
    I can see CodeOwner and all SP defined under it when I use "Oracle Server" directly or use sqlplus.

    Post Author: BinChen
    CA Forum: Deployment
    I'm using Window XP with Oracle 10g2R
    To be more clear,
    I have an ODBC Data Source defined as "DEV" and when I created a connection using ODBC, I can only see some database account section like: APP, APPREF, PUBLIC, SYS, SUSTEM. But I can not see CodeOwner.
    If I connected without using ODBC, I can also see CODEOWNER and then all its stored procedures.
    So why I can not see Stored Procedures defined under CODEOWNER using ODBC?
    I have an exsiting report, even I can not see CODEOWNER, but I have no problem to run and preview the report also to "verify database".

  • Error Could not find stored procedure 'SP_DATA1FINANCE'.;CommitTrans::Send

    Hi,
    We are getting the following error when trying to send data via Input schedule or via Data Manager.:
              - Error Message -
    ExecuteSQL::Could not find stored procedure 'SP_DATA1FINANCE'.;CommitTrans::Send through SendGovernor failed;
    This same error is happening in every application, for example we have an application called Ventas, and the error occurs as follows:
              - Error Message -
    ExecuteSQL::Could not find stored procedure 'SP_DATA1FINANCE'.;CommitTrans::Send through SendGovernor failed;
    We did not have problems before when using version 5.1, this error is appearing now that we migrate to version 7.0-
    Do you have any idea what could be the cause of this error? We already tried Re-Processing Applications but still the same problem.
    Thanks
    Ana

    After you upgrade you have to save all applications.
    Bacause in V7 there are other stored procedures then in V5.
    Kind regards,
    Sam

  • Could not find stored procedure 'sp_start_job'

    I'm trying to run a ms sql server agent job from within my vb.net code using sp_start_job and getting exception...
    Could not find stored procedure 'sp_start_job'.
    ... so obviously I'm doing something wrong.  My vb code contains is ...
            jobCommand = New SqlCommand("sp_start_job", sqlConn)
            jobCommand.CommandType = CommandType.StoredProcedure
            jobParameter = New SqlParameter("@job_name", SqlDbType.VarChar)
            jobParameter.Direction = ParameterDirection.Input
            jobCommand.Parameters.Add(jobParameter)
            jobParameter.Value = "nameOfServerAgentJob"
            jobCommand.ExecuteNonQuery()
    Can someone show me how to run the SQL Server Agent job properly from my vb code?
    Thanks tonnes for any help, Roscoe

    Or directly redirect the connection upon creation of the connection string to the right database, e.g.
    string ConnectionString = "Data Source=YourServer;Initial Catalog=msdb;Integrated Security=True";
    See more samples of connection strings here:
    http://www.connectionstrings.com/sql-server/
    -Jens
    Jens K. Suessmeyer http://blogs.msdn.com/Jenss

  • Search suggestion not working for anonymous user in sharepoint 2013

    Hi ,
    Please help on this search suggestion not working for anonymous user in sharepoint 2013
    shaik

    You can create a search center site, and set the search center site to
    allow anonymous access.
    Also see this link - http://blog.mastykarz.nl/search-query-suggestions-anonymous-users-sharepoint-2013-mavention-query-suggestions/ 
     (As this is regarding a 3rd party tool, I suggest that you direct it to the  provider support.)
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • More than 1 cursor in a stored procedure

    Is it possible to open more than 1 cursor in a stored procedure? I have 2 stored procedure which use the same 2 parameters, and figured I could probably combine the two. Thanks

    If you used the example provided by SBH more or less as it was posted, then both cursors were closed before they got to coldfusion. If you are passing them out of you procedures for processing by another piece of code you need to leave them open. More along the lines of:
    create procedure protest(p_empno number,
                             p_ename out varchar2,
                             p_sal out number,
                             p_dummy out varchar2) is
       cursor c1 is
          select ename,sal
          from employee
          where empid = p_empno;
       cursor c2 is
          select name
          from stname;
    begin
       open c1;
       open c2;
    end;Just make sure to close them in your calling code once you have finished with them.
    John

  • Could not find stored procedure 'DataRefresh.GetSchedule'.

    When I try to fresh a powerpivot workbook that is published on SharePoint. It always give me an error. When I look in the ULS log it says
    Following error occured while trying to execute a sql query: System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'DataRefresh.GetSchedule'.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    Boolean breakConnection, Action`1 wrapCloseInAction)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior
    runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()    
    at System.Data.SqlClient.SqlDataReader.get_MetaData()     at System.Data.Sq... 31a41e9c-44c3-409b-3f57-f575019b7830
    05/24/2013 15:48:58.33* w3wp.exe (0x1DCC)                        0x2720 PowerPivot Service           
     Data Refresh                   97 Medium   ...lClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)    
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
    RunBehavior runBehavior, Boolean returnStream, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)     at System.Data.S... 31a41e9c-44c3-409b-3f57-f575019b7830
    05/24/2013 15:48:58.33* w3wp.exe (0x1DCC)                        0x2720 PowerPivot Service           
     Data Refresh                   97 Medium   ...qlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)     at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
    behavior)     at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)     at System.Data.Common.DbDataAdapter.Fill(DataSet
    dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)     at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)     at Microsoft.AnalysisServices.SPAddin.MTSAccessorBase.ExecuteWithResults(String
    commandText, CommandType commandType, SqlParameter[] paramArray)  ClientConnectionId:6e4dd12c-4c00-4d28-810f-979bae03b34d 31a41e9c-44c3-409b-3f57-f575019b7830
    05/24/2013 15:48:58.33  w3wp.exe (0x1DCC)                        0x2720 SharePoint Foundation        
     Monitoring                     b4ly Medium   
    val it: unit=()

    I have this issue in my SharePoint 2013 azure environment. It is unclear what I need to do to overcome this issue. Any help is most appreciated.
    I get the following log messages:
    Following error occured while trying to execute a sql query: System.Data.SqlClient.SqlException (0x80131904):
    Could not find stored procedure 'DataRefresh.GetSchedule'.
    EXCEPTION: NoAvailableStreamingServerException: We cannot locate a server to load the workbook Data Model.
    macrel

  • Event ID 57 - Could not find stored procedure 'dbo.proc_MSS_CrawlAdmin' and Could not find 'dbo.proc_MSS_Crawl'

    Sharepoint Enterprise 2010 - sp1 (feb. 2013 cu) - running enterprise search service
    Running sql. 2012 enterprise
    Event log has constant event ID 57 with A database error occurred. Source: Microsoft SQL Server Native Client 10.0 Code: 2812 occurred 1 time(s) Description: Could not find stored procedure 'dbo.proc_MSS_Crawl'  and along with it another Could not find
    stored procedure 'dbo.proc_MSS_CrawlAdmin'.
    How do I fix this issue?

    Hi there,
    I am seeing this issue (just the "proc_MSS_Crawl" stored procedure, not the other). Did you find a fix for this? Did you try running the configuration wizard to see if this resolved it?
    Regards,
    Ben
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog:
    http://blog.webtechy.co.uk

  • Central Administraion Internal server error 500 | event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock

    Hi,
    We have two SharePoint 2010 SP2 servers with one SQL 2012 Backend.
    Recently we cannot open the central administration, getting 500 internal server error and multiple SQL errors in event viewer:
    event id 5586 sharepoint foundation unknown sql exception 2812 could not find stored procedure dbo.proc_gettimerlock
    event id 5586 sharepoint foundation unknown sql exception 2812 occured could not find stored procedure 'proc_fetchdocforhttpget'
    Also I cannot run SharePoint configuration wizard, getting this error: sharepoint 2010 failed to resgister sharepoint services
    In the log file, I found this error "an exception of type microsoft.sharepoint.spexception was thrown 0x80131904"
    Any ideas?
    Thanks, Shehatovich

    As You can see below stored procedure has its specific Permission's, check user who is performing action as well as CentralAdministation Pool has right permission and their permissions are not modified from SQL Server.
    -Samar
     =
    Sr. Software engineer

  • Error Could not find stored procedure dbo.proc_GetFollowableLists

    I am troubleshooting a FIM installation and I am getting this error:
    The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 9f556bbb-1796-4dee-9a73-f283b7874aeb) threw an exception. More information is included below.
    Could not find stored procedure 'dbo.proc_GetFollowableLists'.
    I don't get a single hit on that when searching the forums or webs. Any ideas? is it related to FIM Install?

    Hi,
    Please perform the steps below:
    Launch Services.msc on your servers and ensure that the SharePoint Timers Service is started and that its Startup Type is Automatic.
    Go to Central Administration > Monitoring > Configure usage and health data collection, see if Enable usage data collection and Enable health data collection are checked. If they are already checked, disable them firstly, then enable them again. Remember
    to perform IISReset and restart the service in the step 1.
    Please refer more information via:
    http://social.technet.microsoft.com/wiki/contents/articles/24492.sharepoint-2013-the-execute-method-of-job-definition-microsoft-office-server-userprofiles-lmtrepopulationjob-id-threw-an-exception.aspx
    http://www.mysharepointadventures.com/2012/10/event-6398-could-not-find-stored-procedure-dbo-search_getrecentstats/
    http://spjoel.wordpress.com/2012/08/06/could-not-find-stored-procedure-dbo-search_getrecentstats/
    http://www.marc-lognoul.me/itblog-en/sharepoint-2010-event-id-5586-and-6398-could-not-find-stored-procedure-dbo-search_getrecentstats-revisited/
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • Overflow Error - Type P

    In the Portal, we're running Enteprise Compensation Management with EHP4.  For some Employees, we get an error that reads 'Overflow during the arithmetical operation (type P) in program SAPLZECM.  Any idea what causes this error? Thanks.

  • Making Customer Pricing procedure mandatory in BP Role-CRM 5.0

    Hi Our requirement is to make Customer Pricing procedure mandatory in BP Role "Sold to Party"-CRM 5.0. I have configured for the same in IMG Field Grouping. Now when a end user goes for BP creation & goes to Sales area maintenance then an error messa

  • Download report from answers in CSV( Comma seperated)

    Hi I am trying to download the report from answers in .csv format the . csv file is tab seperated But the requirement is to have comma seperated Is there any option in obiee to change the delimiter as comma Kindly help me Regards Abdul

  • NoClassDefFoundError - XSLException

    I'm receiving the following error when I run a very simple XMLQuery.getXMLString routine: Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XSLException This suggests a classpath error, but I've checked my classpath and

  • Database Dim MM_editCmd problem

    <%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connections/connform.asp" --> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Re