Run a Stored procedure in Orchestrator Query Database

I dont see an option where a stored procedure can run in Database query.
Instead of putting a query, I would like to have a stored procedure run at different intervals and then send out the notification.
If it is not in Database Query, Where do I find an option for Stored proc.?

HI Sd,
You need to do following for using Stored procedure as polling statement
1. Right click the project and  select Add-->Add Generated Items
2. Then select "Consume Adapter Service"
3. Now the Consume Adapter Service wizard wants us to provide it the required information, so firstly select "sqlbinding" against the label Select a binding.
4. Click the Configure button, on security tab select the Client credential type .
5. On URI Properties tab:
      -->Type the name of the server where your database is located
     --> Provide the name of the database you want to use.
    --> In front of InboundId  , type the name whatever you want so as to  identify the purpose of polling. It acts  as a unique identifier which helps in avoiding conflict when you poll same tables for some other purpose.
6. Binding Properties tab:
     Select Polling  from the dropdown list in front of InboundOperationType
    Give a valid PolledDataAvailableStatement such as (Select count (*) from table1)
 "exec MyStoreProcedureName" from receive location polling statment
Thanks
Abhishek

Similar Messages

  • Calling a Oracle stored procedure in orchestrator

    I am trying to execute a stored procedure using the query database IP in orchestrator.  I can select data from the oracle db so i know the prereqs are setup correctly but it fails on executing the stored procedure.
    The syntaxe is execute SPNAME('PARAM!','PARAM2')
    The error is 
    Failed, Oracle failure Database error has occurred. ORA-00900: invalid SQL statement
    Oracle query failure, please verify your query syntax is correct.  Verify correct table names and column names etc...
    The SP works fine in sql developer so im pretty sure the syntax is correct unless the Query Database IP needs a different syntax to work.  

    simple as that.  i actually tried something similar since that is how SCOM executes SP but left the execute command in there so it failed and i moved on.  thanks for the reply.  
    Just for reference i went the powershell route and that worked as well but much more complicated then your solution.  for anyone that wants to know the script is 
    $asm = [System.Reflection.Assembly]::LoadWithPartialName("System.Data.OracleClient") 
    $connectionString = "Data Source=TNSNAME;uid=USERID;pwd=PASSWORD";
    $inputString1 = "PARAMETER INPUT 1";
    $inputString2 = "PARAMETER INPUT 2"
    $oracleConnection = new-object System.Data.OracleClient.OracleConnection($connectionString);
    $cmd = new-object System.Data.OracleClient.OracleCommand;
    $cmd.Connection = $oracleConnection;
    $cmd.CommandText = "SP NAME";
    $cmd.CommandType = [System.Data.CommandType]::StoredProcedure;
    $cmd.Parameters.Add("NAME OF EXPECTED PARAMETER 1", [System.Data.OracleClient.OracleType]::NUMBER) | out-null;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 1"].Direction = [System.Data.ParameterDirection]::Input;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 1"].Value = $inputString1;
    $cmd.Parameters.Add("NAME OF EXPECTED PARAMETER 2", [System.Data.OracleClient.OracleType]::VARCHAR2) | out-null;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 2"].Direction = [System.Data.ParameterDirection]::Input;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 2"].Value = $inputString2;
    $oracleConnection.Open();
    $cmd.ExecuteNonQuery() | out-null;
    $oracleConnection.Close();
    got help from http://dovetailsoftware.com/clarify/gsherman/2012/05/15/calling-oracle-stored-procedures-using-powershell/

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters

    Hi,
    I want to execute a stored procedure from Power Query with dynamic parameters.
    In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
        Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
    Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
        Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        Name_Value = Name_Parameter{0}[Value],
    I have tried like below but it is not working.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
    Can anyone please help me with this issue.
    Thanks
    Dileep

    Hi,
    I got it. Below is the correct syntax.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
    Thanks
    Dileep

  • How to modify stored procedures in SQL Azure database in SQL server express 2012

    Hi,
    I want to modify stored procedures in SQL Azure database in SQL Server Express 2012. But when right click on the stored procedure in Object Explorer, there is no option "Modify" as for SQL Server database. I wonder how to modify stored procedures in SQL
    Azure database in SQL Server Express 2012. Thanks.
    York

    Hi,
    Not sure whay there is no modify..
    As a workaround can you try this and see if you can modify proc..
    Script Procedure As-> Alter To->New query window..
    - Chintak (My Blog)

  • Error while running a stored procedure in SBO

    Hi all,
    i have a stored procedure that i run in my sbo.  When i run the stored procedure i get the following error :
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation.
    'Servicecontracten' (OCTR)    05/10/2011  18:03:36  -1
    i launch my sp like this :
    exec [spu_DS_HistProjektUserVeldenViewBetalingen]  (i pass no parameters while testing.  i put them fix in my sp)
    my stored procedure looks like this :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:03:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    ALTER PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE project_number = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnnr) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where lijnnr <= t1.lijnNr and billperiod_type = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE fase,'') is not null
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    Somebody has a clue what i'm doing wrong ?
    thnx

    Thanks Gordon for your reply.
    i've changed my sp to :
    USE [def1]
    GO
    /****** Object:  StoredProcedure [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]    Script Date: 10/05/2011 18:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- Batch submitted through debugger: SQLQuery2.sql|8|0|C:\Users\kvanhauwaert\AppData\Local\Temp\~vs2A98.sql
    CREATE PROCEDURE [dbo].[spu_DS_HistProjektUserVeldenViewBetalingen]
              /* @project_number varchar(20),
              @billperiod_type varchar(10) */
    AS
    BEGIN
         SELECT isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase, isnull(factuurbedrag,0) as factuurbedrag,
         isnull(billperiod_type,'') as billperiod_type
         INTO #tempDS_HistProjektUserVeldenViewBetalingen
         FROM DS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(project_number,'') = '08053A'
         SELECT  isnull(lijnnr,0) as lijnnr, isnull(fase,'') as fase , isnull(factuurbedrag,0) as factuurbedrag,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnnr,0)) as lijntotaal,
              (select sum(isnull(factuurbedrag,0)) from #tempDS_HistProjektUserVeldenViewBetalingen where isnull(lijnnr,0) <= isnull(t1.lijnNr,0) and isnull(billperiod_type,'') = '110-01' ) as lijntotaalKetting
         FROM #tempDS_HistProjektUserVeldenViewBetalingen t1
         WHERE isnull(fase,'') <> ''
         ORDER BY t1.fase
         DROP TABLE #tempDS_HistProjektUserVeldenViewBetalingen
    END
    GO
    but that didn't solved my problem.  Any other idea's ?
    kind regards.
    Kurt

  • Running a stored procedure using  isqlPlus

    I have written a simple stored procedure which takes EMPLOYEE_ID as IN parameter returns EMPLOYEE_FIRST_NAME as OUT parameter (For Learning purpose only)
    How do I run this stored procedure using isqlPlus.
    Below is my stored procedure.
    CREATE OR REPLACE PROCEDURE "HR"."MY_PROC_2" (
    EMPLOYEE_ID_NUM in NUMBER,
    EMPLOYEE_FIRST_NAME out VARCHAR2
    as
    begin
    Select FIRST_NAME into EMPLOYEE_FIRST_NAME from Employees
    where Employee_ID = EMPLOYEE_ID_NUM;
    return;
    end;

    did you run that same procedure in SQL*Plus and it functioned ?
    Joel P�rez

  • Running a stored procedure in JDev initiates a bpel compile

    When I want to run a stored procedure from the connections area to test it this action always initiates a bpel compile for the highlighted bpel process in the applications palette. It is annoying and time consuming but if the bpel compile fails I can't run the stored procedure either.
    What is with this 'feature'?

    I'm still plagued by this 'symptom/feature'. Is there any workaround?

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • Adding a stored procedure to the master database?

    I have a SQL server instance being used as our data warehousing environment. The instance consists of several databases that I am snapshotting as part of our high availability strategy for data. I've created a stored procedure that takes the source database
    as an argument and that will create a new snapshot when a new one needs to be created and will also automatically remove the old snapshot. It also updates some synonym tables that point to the new snapshot but that might not be an important detail.
    I would like to have the stored procedure stored some place global to all of the databases that I am routinely snapshotting, but that would mean putting it in the master database. Although having it there makes things significantly better in terms of usability,
    it seems like there's something wrong with putting any stored procedures in the master database. Am I wrong? Is it OK to put stored procedures there in situations like this?

    Yes Database snapshot. We're using it to make our data more available so that when we're refreshing the underlying database we can still access the previous version of the data. Otherwise our reports and applications won't have access to the data or will
    get partial data sets. We don't intend to use it for DR or as a backup.
    ok. if it is for temporary purpose, it will work..
    you can create one master procedure and do that - master database. but you need to make sure you point your applications/reports to the snapshot database and not actual database
    Hope it Helps!!

  • ORA-21700 Error when running C# stored procedure to do a spatial query

    Hi All
    I'm having trouble running a C# stored procedure that (via another object) that falls over running a spatial query with the following error.
    OAR-21700 object does not exist or is marked for delete
    If I take the sql of the spatial query out and run it separately in SqlPlus it runs as expected.
    If I use the object that executes the spatial query via NUnit (i.e. executed on the client, rather than the server) it also works as expected.
    Can anyone help? Is there some issue using Oracle Spatial queries with the Oracle Database Extensions for .NET?

    I can indeed. Here is a slightly simplified version:
    SELECT secondary_catch.mi_prinx AS primarykey
    FROM mapinfo_data.secondary_catch
    WHERE sdo_relate (secondary_catch.geoloc,
    (SELECT geoloc
    FROM training_6.building_polygons
    WHERE building_id = 10002507117),
    'mask=anyinteract querytype=WINDOW'
    ) = 'TRUE'
    Interestingly, if I attempt to run this query inside a C# stored procedure using the implicit context connection (i.e. OracleConnection.ConnectionString = "context connection=true") it fails with the error I described above.
    If however I create a new connection and connect as a regular user on my database, the query works correctly.
    So in that sense I have a workaround, but I'd like to avoid using it if I can as creating a new explicit connection is an overhead I can do without.

  • FOR XML will not run in stored procedure but will in Query

    The following is the Query and stored procedure for a XML export.  The query runs find and returns a clickable link. The stored procedure does not.
    Stored Procedure
    USE [db]
    declare @XmlOutput1 xml
    set @XmlOutput1 =
    (SELECT incident_num,
    unit_id, unit_status_datetime,
    unit_status_remarks
    FROM unit_status_hist
    where convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    FOR XML
    RAW)
    select @XmlOutput1
    Query:
    use db
    SELECT incident_num, unit_id,
    unit_status_datetime,  unit_status_remarks
    FROM unit_status_hist
    WHERE  convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    for XML
    auto, Elements
    Any help would be greatly appreciated.  Thank you.

    The following is the Query and stored procedure for a XML export.  The query runs find and returns a clickable link. The stored procedure does not.
    Stored Procedure
    USE [db]
    declare @XmlOutput1 xml
    set @XmlOutput1 =
    (SELECT incident_num,
    unit_id, unit_status_datetime,
    unit_status_remarks
    FROM unit_status_hist
    where convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    FOR XML
    RAW)
    select @XmlOutput1
    Query:
    use db
    SELECT incident_num, unit_id,
    unit_status_datetime,  unit_status_remarks
    FROM unit_status_hist
    WHERE  convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    for XML
    auto, Elements
    Any help would be greatly appreciated.  Thank you.
    I cant see any stored procedure here
    both of the code posted are queries only
    also clickable link will come in only SSMS query window. Are you trying to execute this from some application?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • URGENT: Java stored procedure on oracle 92 database is not working

    Hi,
    I am having an issue regarding java stored procedures. I have created a java class that uses the bouncycastleprovider ( bcprov-jdk13-141.jar ) to encrypt strings. I tested against the version of the java virtual machine that comes bundled with oracle and it works perfectly. I then used JDeveloper to load the class on the database with the resolve, noverify and order flags checked and it shows no errors but when I try to execute the stored procedure it throws the following exception:
    java.lang.ExceptionInInitializerError:
    java.lang.SecurityException: Cannot set up certs for trusted CAs: java.net.MalformedURLException: no protocol: US_export_policy.jar
    at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    at javax.crypto.Cipher.a(DashoA6275)
    at javax.crypto.Cipher.getInstance(DashoA6275)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:57)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:73)
    I loaded jce1_2_2.jar, sunjce_provider.jar, bcprov-jdk13-141.jar. Also replaced the US_export_policy.jar, local_policy.jar with the unrestrictive version. I add the security provider dinamically with a call to Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 2);
    I also did a select on the user_objects table and all the classes are in VALID status.
    When I run my application using the java virtual machine that is located under C:\Oracle\oracli9i\jdk\jre\bin directory it works fine but when I try to execute on the database it won't work. I found a bug that was if the jce1_2_1.jar file existed in the C:\Oracle\oracli9i\jdk\jre\lib\ext directory ( even if it's extension is renamed ) it won't work because the certification file had expired but I don't know if this has anything to do with this error.
    Am I missing something?
    Please I need an urgent solution to this problem.
    Thanks in advance.
    Bruno Oliveira

    SomeoneElse wrote:
    Waaaaahhhhhhh!I was just thinking the same thing.... ya beat me to it...
    To the OP:
    As an up and coming DB Developer who now works for a small tech firm straight outta college, I can tell you for sure that you will definitely not get anywhere in your impatient life... look behind your back you miserable dude, your job might be in danger since ya got a bad attitude AND you can't figure out an error you are getting from a Java SP. So instead of helping you, I am going to simply tell you how you SHOULD act in a community of practice.
    1. Be nice when looking for help
    2. BE NICE WHEN LOOKING FOR HELP!!!
    Pretty simple right?
    Know what else is really simple? Looking at the topics of each board to make sure ya post in the right board! You people disgust me; somehow getting by in your professional career acting the way you do. I sure hope your "online" persona isn't a reflection of your real attitude towards people, almost pathetic and extremely immature.
    Sorry bout the rant, it is Friday, I know :) Didn't get my coffee this morning. Have a good one all!
    -Tim

  • How to create an External Content Type with SQL Stored Procedures Parameters and query it in a SharePoint App

    Hi,
    I'm new to SharePoint 2013 I want to be able to query a MSSQL database from a SharePoint App I have tried to create an External Content Type (ECT) which is produced from a MSSQL stored Procedure, this procedure has several parameters which are needed to
    filter the data correctly.  From here I want to produce an external list which I can then query from a c# SharePoint app.  If I leave the filters in the ECT null then the list is of course empty or if enter a default values the results are limited
    for the app to query so are no good.
    I want to dynamically pass values to the ECT when querying from the app, is this not possible.  Should I just be returning everything in an external list and then letting the query in the app filter the data, this seems inefficient?
    Is this the best way to do this or should I be doing this differently?
    Please can someone point me in the right direction.
    Thanks

    Hi Pandra801,
    When you create a the external content type, please try to add a filter based on your select statement.
    http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
    Or, try to create a stored procedure based on your select statement, then create ECT using the SQL stored procedure.
    A step by step guide in designing BCS entities by using a SQL stored procedure
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Problem in package run inside stored procedure

    i have ssis package to import data from excel to database.
    package is running correctly inside BIDS.
    but when i run package under stored procedure it is giving error :
    Error:   Code: 0xC0014023
       Source: loop sheets in excel
       Description: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21 "(null)". This occurs when the ForEach Enumerator cannot enumerate.

    Hi BI_DEV_19,
    Does the package connects with network resources? If so, try set the job step to run under a proxy account that is created based on a domain account. In BIDS, the package runs under the Windows account that you log onto the operating system.
    The error message “The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21” may occur because the ADODB.dll file is corrupted or missing.  You can check whether the ADODB.dll exists in the following folder:
    C:\program files (x86)\Microsoft.NET\Primary Interop Assemblies
    In this situation, you can back up the existing ADODB.dll file, and copy one from another machine to this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Stored Procedure in MS Access Database

    Hi,
    I am using MS Access Database 2007 to develop a Reporting Application. I would like to know whether Stored Procedures can be created in MS Access Database.
    The requirement that I am working on is to compute and populate a view in MS Access database based on values in two other tables. This procedure has to happen every month when the source tables are updated.
    Any help in this regard is appreciated.

    This is an interesting question.  I have never done this, but just Googled it.  Apparently you can develop SPs in MS Access 2010 and later.  Access 2010 has both stored procedures, and also has table triggers.
    For access 2010, you open up the table (non design view), and then choose the table tab. You see options there to create store procedures and table triggers.
    Here's a screen shot from one of my DBs:
    Would you need to do this?  Probably not.  I've been using Access for 15+ years and never had a need for this kind of thing...even though it's been around for a much shorter time.
    You cannot create a view in MS Access, it is not supported.  However, you can create a query to return the data that you need.  It sounds like you're coming here with a SQL Server background.
    Anyway, you'd probably use a VBA function to do what you need to do.  What, exactly, are you trying to do?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Maybe you are looking for

  • Using "Save As" execCommand in IE8 to save XML file in ANSI format instead of UCS2-Little Endian

    I am currently trying to save an XML data using "SaveAs" execCommand  from Javascript in Internet Explorer 8 only.I am using document.write(xml) to write the xml content after i open a window.The document object in IE8 uses a saveAs Exec Command to a

  • UMELoginException: PASSWORD_EXPIRED

    Dear experts, I am facing problem while log-in to the Visual admin using the user "administrator" in our protal inastalled system. Following is the error: #1.5^H#00151778AF8C005B0000011000003CD20004730A14D9C060#1252387043523#com.sap.engine.services.s

  • My iMac Mac OS X v 10.7.4 won't recognize time capsule

    I just bought a time capsule, my iMac can see it when I reset the settings on iMac and I can get through most of the stages to configuring it, but then at the end an unexpected error pops up and boots the time capsule set up out. Once it gets booted

  • Update XML Data

    Does any one know how or if you can update or insert new data into an xml file from Flash AS3? An example would be someone filling out and submitting a form and then the information entered is sent to the xml file to create or update nodes in the xml

  • Why does preview not scale images properly

    Hello, Recently I tried to use Preview to print an image and it scaled it up to around 613%, wasting lots of ink.  I typed 100 into the box for the scaling factor and I got the same result.  Only after considerable searching and gnashing of teeth did