Sample C# Stored-Procedure Deployment Script

Would it be possible to post a sample script that the .NET Deployment Wizard will produce? I've looked at the DBMS_CLR package, and I think I have everything in place for a manual deploy. But I'm still getting an error:
ORA-20100: System.TypeLoadException
Could not load type Class1 from assembly CLRLibrary1
So, something is missing. It would nice to have a "preview" from you guys :-)
Thanks for any info,
Tom Jordan

Due to the way it is implemented, you won't be able to write your own custom deployment scripts because part of the script is wrapped (obfuscated). This is because we plan to change the internal implementation at a later date and don't want people depending on the current implementation. Even if I posted an example script, part of it would be wrapped and so it wouldn't help you.
When ODT 10.2 comes out, you can use the deployment wizard to generate the script file... from there you can deploy it manually as you need to.
Christian

Similar Messages

  • Java Stored Procedure Deployment Problem with JDev 3.1.1.2

    Dear JDeveloper Team:
    I am having a problem deploying a test Java stored procedure to the database. In the Deployment Profile Wizard Connection tab, it displays no connection in the connection dropdown even though I have defined some connections that have been sucessfully connected to the database.
    Please help.
    Thanks,
    Tom

    Tom,
    Verify that your Connections are valid as follows:
    Double Click on the Connections folder of JDeveloper Navigator.
    This opens up the Connection Manager.
    Make sure you have defined JDBC Connections.
    Pick your connection of intrest and select Edit... and then press the Test button to test the conneciton.
    If this is a valid JDBC connection, then it should appear later when you run the deployment wizard.
    -John

  • Calling stored procedure from script on remote server

    We are migrating our database to a virtual server environment. On the current dedicated environment, the database and scripts(calling stored procedures) are on the same server. In the new envoirnment, the scripts, input and output files will be on a different server. Does anyone have any examples of scripts on one server calling stored procedures on another server. Don't laugh, but the db server is currently running Oracle 9i (part of the new enviornment to move to 11g).

    brifry wrote:
    sorry my terminolgy is not correct. the stored procedure is in the database and the database is on server a. The script is on server b. In your example you show how to log onto the database. That I know. In your example your example, how would you point to server b so you can log onto the database?Do you want to mean that your procedure (location A) want to call a script from location B ?
    make the script located folder as shared and ,You may try this
    //server_name/folder_name/file_name.xxxHope this helps

  • (crud) stored procedures generator script

    Hi,
    I am wondering if somebody can help me.
    I need an oracle sql script that create a package with stored procedures for the basic CRUD (Create, Read, Update, Delete) operations for each table in my database.
    For example:
    Table EMP
    When the sql script has finished then there is a package created (specification and body) with the name:
    EMP_PCK (this is an example)
    inside the package the implementation of the following procedures:
    - EMP_PCK.emp_sel
    - EMP_PCK.emp_upd
    - EMP_PCK.emp_insrt
    - EMP_PCK.emp_del
    I did find a script but that'si for SQL-SERVER 2000 :-(
    link: [http://www.sqlbook.com/scripts/AutoGenerateCRUDStoredProcs.txt]
    Thanks for your help.
    Regards,
    John

    Sorry Patrick (or is it John),... can't help you there.
    You probably have a good reason why you want it in a script and not in a tool....

  • [Data Services]Calling stored procedure from scripts in parrallel workflows

    Hello.
    I am using Data Services XI .3.2 with Oracle Database 11g
    Situation is like this:
    I have a workflow that has a script that using function sql() performs a simple select. 
    Example:
    sql('DW_CTL','select 1 from dual');
    If I call this workflow 4 times in parrallel, the job is somehow locked and waits for undefinitely time.
    But If I call these 4 workflows in secvential order, it completes successfully.
    My problem: how do i make it run in parallel ? Why do i have this problem ?
    Does anyone have a clue ?
    Regards,
    Radian

    I am using Reports 9i & use JDBS query. When it gets to the section that says enter SQL or Stored proc, I enter a simple TEST proc which takes no params & get error msg as explained before ... I don't see any info in the Reports manual as to how to call a proc ... where would I find that info?
    Thx.

  • Java stored procedure deployment : resolution problem

    Hi,
    I am trying to upload a Java class (to be able to send mail with attached files).
    At deployment, I have many errors of this type :
    errors : class javax/xml/transform/sax/SAXTransformerFactory
    ORA-29521: referenced name org/xml/sax/XMLFilter could not be found
    This is due to the "upload" of J2EE in the database but I do not find the options to bypass this in the "Deployment Profile Settings".
    I tried to uncheck "-resolve", to check "-noverify", to check "-force" options.
    I tried many combinations of those options but there is nothing to do !
    I even tried to "exclude package tree" in the "Dependency Analyzer Filters" but nothing is working.
    Does anyone has any idea ??
    Thanks,
    Ju.

    Hi everybody.
    I found the solution myself.
    I am posting it because I am sure I am not the onlyone that got that problem...
    The trick is to upload jar files manually by successive calls like
    "loadjava -user [user]/[passwd]@[tnsentry] mail.jar -resolve".
    The result of the commmand could list some errors but we do not care, the upload is done anyway...
    Then, you can upload your classes through JDeveloper.
    I did not managed to upload source files (it produces errors), I only uploaded class files (choose deploy "As Compiled Output Only").
    Also take care to uncheck everything in the "Dependency Analyzer" (you have already uploaded dependencies manually).
    In the "loadjava options", do NOT use "-force" param but use "-resolve" param.
    The only thing you still need to do is to click on "Deploy"...
    That's all folks !

  • Deploy package with Java Stored Procedure without JDeveloper

    I have a set of Java Stored Procedures deployed as a package on a Oracle 8i server. Everything works fine in my development environment, and now I would like to deploy the same package in the customers runtime environment. Both environments are running Oracle 8i rel 2 on NT.
    Is there a simple way to use the JDeveloper .prf deployment profile without installing JDeveloper in the customers environment?
    If not, can I the get the .jar files and .sql scripts from JDeveloper to create the call specs and package bodys?
    I guess JDeveloper must have this information, and my idea was then to write a script using loadjava and SQL*Plus.
    Regards,
    Tom Bjerre

    you would not be able to take just the deployment profile and run it outside JDeveloper.
    You would be able to create archive of all java classes in the package using Deployment Wizard in JDeveloper.
    Then you can load the jar file using the utilities in 8i.
    JDeveloper does generate the SQL for CALL specs etc ., at the deployment time and it is printed in MEssage Viewer along with other information.
    Hope that info is useful for you
    raghu

  • ResultSet from Java Stored Procedures

    Hi,
    How do I obtain a resultset from a Java Stored Procedure?
    My stored procedure, deployed in Oracle8i, has Database package as sample.Have published setConnection() and getDept() methods.
    Code for Java Stored Procedure:
    package SPPackage;
    import java.sql.*;
    public class StoredProcApplication {
    protected static Connection connection = null;
    protected static Statement stmt = null;
    protected static ResultSet res = null;
    public static void setConnection() throws SQLException {
    connection = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    public static void getDept(Object[] obj) throws SQLException {
    if (connection == null) {
    setConnection();
    if (stmt == null) {
    stmt = connection.createStatement();
    if (res == null) {
    res = stmt.executeQuery("select * from DEPT");
    obj[0] = res;
    Code for TesterApplication :
    package SPPackage;
    import java.sql.*;
    public class TesterApplication {
    private static final String URL = "jdbc:oracle:thin:@sandeep:1521:oracle8i";
    private static final String userId = "sandeep";
    private static final String password = "sandeep";
    private Connection connection;
    private CallableStatement stmt;
    private ResultSet res;
    public void setConnection() throws ClassNotFoundException,SQLException {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection(URL,userId,password);
    public void getResultFromSP() throws SQLException {
    //prepare to call the stored procedure
    stmt = connection.prepareCall("{call sample.getDept(?)}");
    //register the OUT parameters
    stmt.registerOutParameter(1,Types.OTHER);
    //execute the query
    stmt.execute();
    ResultSet res = (ResultSet)stmt.getObject(1);
    while (res.next()) {
    System.out.print(res.getInt(1) + " | " );
    System.out.print(res.getString(2) + " | " );
    System.out.print(res.getString(3) + " \n " );
    public TesterApplication() throws SQLException,ClassNotFoundException {
    try {
    setConnection();
    getResultFromSP();
    } finally {
    if (res != null) { res.close(); res = null; }
    if (stmt != null) { stmt.close(); stmt = null; }
    if (connection != null) { connection.close(); connection = null; }
    public static void main(String[] args) {
    try {
    TesterApplication ta = new TesterApplication();
    } catch (Exception e) {
    System.err.println("Error while executing stored procedure " + e.getMessage());
    e.printStackTrace();
    When I run the TesterApplication, I get the following exception :
    java.sql.SQLException: Invalid column type: get_internal_type
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(Compiled Code)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(Compiled Code)
    Also, if I want to execute the ResultSet in the stored proc itself, and return the values as Arrays of int[], and String[], how do I do it?By default the you can populate only int[0], String[0] , i.e. only one value!!!
    if my statement is unknown, i.e, it might return a combination of updates and resultsets, how do I go about processing the result?
    Please advise!!
    TIA
    Sandeep
    null

    Hi kkirk,
    I found the post you mentioned.Well it dates back to November 1999 - "Problem returning resultset or ARRAY from java stored proc" by Stuart Popejoy ([email protected]).Too bad, it is still not solved!!
    I am not very good at PL/SQL.However, it would still be helpful, if you could post the code here, or at my email address.
    Meanwhile, I was trying this during the week-end.There seems to be a glimmer of hope!!
    Let me know, if this makes sense :
    CallableStatement cs = connection.prepareCall("begin open ? for select * from dept; end");
    try {
    cs.registerOutParameter(1,OracleTypes.CURSOR);
    ResultSet res = ((OracleCallableStatement)cs).getCursor(1);
    while (res.next()) {
    //get the values
    } catch (Exception e) {
    e.printStacktrace();
    However, I am getting an exception trace
    Error while executing stored procedure Invalid column type: getLong
    java.sql.SQLException: Invalid column type: getLong
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.getLongValue(Compiled Code)
    Not quite sure why this is happening!!
    TIA,
    Sandeep
    null

  • Export Java-based external stored procedure

    I've got a properly deployed external Java-based stored procedure deployed properly. I can see it by querying user_objects as well as user_java_classes. Is there any way I can export it so that I can deploy it in a different database? Please note that I mean a different way than performing a complete export, I just want to selectively export this external procedure.
    Thanks, Tom

    I would think that the following would work:
    expdp user/password directory=my_dir dumpfile=java.dmp include=java_source
    This would export the java source for the user performing the export. If you need to export java_source for another user, you would have to add
    schemas=other_schema
    Adding the other schema would only work if the user running the job was privileged.
    Dean

  • Utilizing a java stored procedure for web services

    Hello,
    I am a newbie in web services and I want to learn web services by utilizing a simple procedure and making use as a web service.
    I have a java stored procedure deployed in Oracle 8i database, which I am using for sending emails. I am invoking the java stored procedure in my JSP and Java classes by making a database connection and calling the procedure.
    I am planning to make this a web service so that I could call this from any of my application.
    Could someone give an insight how to make this a web service, albeit the utility is not very complex and my knowledge about web services is limited, I thought I could start by doing a simple program.
    Any help is highly appreciated.
    Thanks
    Ponic

    Hi Tanna.
    Thanks for your reply^^
    I create webservice that access my stored procedure.
    But not supported.
    http://dmp.humaxdigital.com/HumaxCmdwService/Service1.asmx?wsdl
    There are two service. (Hello World - Test, prcrelease_test - Stored Procedure )
    'Hello World' is supported but prcrelease_test is not supported. I can't drag to storyboard.
    Our company's DB is MSSQL2005.
    please help me^^

  • Calling unix shell script from oracle stored procedure.. urgent!!!!!!!!!!!!

    Hi,
    i havea requirement where in i should be able to call my shell script through oracle stored procedure.i tried the following way..but iam unable to get the result.please find the details below.
    new.sh - my shell script - lctfile (LCTFILE) is the input pa
    v_config_file=`find $FND_TOP -name LCTFILE
    FNDLOAD apps/s0ccer@$dxbs1 0 Y DOWNLOAD $v_config_file /home/bir4163/RPT33/bin/menu.ldt MENU MENU_NAME='AR_NAVIGATE_GUI'
    if [ $? != 0 ];then
    echo "$DATE $0 FNDLOAD DOWNLOAD Failed!" | tee -a $LOG_FILE
    else
    echo "SUCCESS" | tee -a $LOG_FILE
    fi
    CREATE OR REPLACE PROCEDURE test_dbms_scheduler
    AS
    v_text VARCHAR2 (255) := 'AR_NAVIGATE_GUI';
    BEGIN
    DBMS_OUTPUT.put_line ('I am in Procedure');
    DBMS_SCHEDULER.create_job (
    job_name => 'test_dbms_scheduler',
    job_action => '/home/bir4163/RPT33/bin/new.sh',
    number_of_arguments => 1,
    job_type => 'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'run shell script'
    DBMS_SCHEDULER.set_job_argument_value (job_name => 'test_dbms_scheduler',
    argument_position => 1,
    argument_value => v_text);
    DBMS_SCHEDULER.enable ('test_dbms_scheduler');
    DBMS_OUTPUT.put_line ('I am back in Procedure');
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
    END;
    But iam unable to test it as i do not have permissions to access dbms_scheduler.can anybody tell me how to solve this using DBMS_PIPE with a sample code.
    please do help its very urgent
    thanks
    ramya

    Hi,
    Register your Shell Script as a concurrent program, Executable execution method "Host", then use fnd_request.submit_request to submit the program.
    Regards,
    Andries

  • Calling a perl script from stored procedure

    Can anyone tell me how to call/run a perl script from a stored procedure? If you have a sample code, please include it.
    Thanks in advance

    If you have a web server setup that runs perl, you can do this by using the utl_http package...Here is some code I use to run a perl script and print the results to a web page on our site.
    The in_URL parameter is the address of the perl code(i.e. http://website/path/perlscript?param1=value1&param2=value2 etc)
    PROCEDURE call_perl(in_URL VARCHAR2) IS
    /* This is setup to allow a perl program to be submitted as a batch program
    using the standard Portal batch program.
    Sometimes these jobs take a long time to run, so the timeout value must
    be set to a large value. The default timeout is 60 seconds, which is not long enough. */
    req utl_http.req;
    resp utl_http.resp;
    value VARCHAR2(1024);
    BEGIN
    req := utl_http.begin_request(replace(utl_url.escape(replace(in_URL,'%3A',':')),CHR(13)));
    utl_http.set_transfer_timeout(req, 18000); -- Set timeout to 5 hours for this specific request.
    resp := utl_http.get_response(req);
    LOOP
    utl_http.read_line(resp, value, TRUE);
    htp.p(value);
    END LOOP;
    utl_http.end_response(resp);
    EXCEPTION WHEN utl_http.end_of_body THEN
    utl_http.end_response(resp);
    WHEN utl_http.init_failed THEN
    htp.p('INIT FAILED');
    WHEN utl_http.request_failed THEN
    htp.p('REQUEST FAILED');
    htp.p(NVL(utl_http.get_detailed_sqlerrm,' No more detail available.'));
    END;
    If you don't have a web server setup, I don't know offhand how you could do this.
    Laurel

  • Deploy stored procedures manually

    Is it possible to deploy .NET stored procedures in 10g manually, without using Oracle Developer Tools and/or Visual Studio 2005?

    I am especially interested in writing stored procedures in Microsoft Visual Studio Express Edition. I always get PLS-00378 error.
    Sample C#:
    using System;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace SP1 {
    public class Class1 {
    public static int myfunc() {
    int m = 0;
    OracleConnection conn = new OracleConnection();
    conn.ConnectionString = "context connection=true";
    conn.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.CommandText = "select count(*) from tab";
    OracleDataReader rdr = cmd.ExecuteReader();
    if (rdr.Read()) {
    m = rdr.GetInt32(0);
    rdr.Close();
    cmd.Dispose();
    conn.Close();
    return m;
    Table creation:
    create or replace function myfunc() return number;

  • Error while deploying a Java Stored Procedure using JDeveloper

    Hi,
    I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm)
    One of the items in this article is - "Creating and Deploying a Java Stored Procedure"
    I was able to create a java class, compile it. Created a deployment profile. created a pl/sql wrapper. While trying to deploy the java stored procedure, I am getting the following error:
    Invoking loadjava on connection 'hr_conn' with arguments:
    -order -resolve -thin
    errors : class package1/mypackage/JavaStoredProc
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    The following operations failed
    class package1/mypackage/JavaStoredProc: resolution
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:474)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:361)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:285)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
    #### Deployment incomplete. #### Oct 27, 2005 1:38:56 PM
    Appreciate your help on this..

    I am using Jdeveloper 10.1.3 Early Access Version. JDK comes with it. I also have another JDK on my machine (JDK1.4.2_09)

  • Need sample source code for calling stored procedure in Oracle

    Hi.
    I try to call stored procedure in oracle using JCA JDBC.
    Anybody have sample source code for that ?
    Regards, Arnold.

    Thank you very much for a very quick reply. It worked, but I have an extended problem for which I would like to have a solution. Thank you very much in advance for your help. The problem is described below.
    I have the Procedure defined as below in the SFCS1 package body
    Procedure Company_Selection(O_Cursor IN OUT T_Cursor)
    BEGIN
    Open O_Cursor FOR
    SELECT CompanyId, CompanyName
    FROM Company
    WHERE CompanyProvince IN ('AL','AK');
    END Company_Selection;
    In the Oracle Forms, I have a datablock based on the above stored procedure. When I execute the form and from the menu if I click on Execute Query the data block gets filled up with data (The datablock is configured to display 10 items as a tabular form).
    At this point in time, I want to automate the process of displaying the data, hence I created a button and from there I want to call this stored procedure. So, in the button trigger I have the following statements
    DECLARE
    A SFCS1.T_Cursor;
    BEGIN
    SFCS1.Company_Selection(A);
    go_Block ('Block36');
    The cursor goes to the corresponding block, but does not display any data. Can you tell me how to get the data displayed. In the future versions, I'm planning to put variables in the WHERE clause.

Maybe you are looking for

  • Mac-mini, Tiger, and OS9

    I currently am running a G3/350 (blue and white) and want to upgrade to a Mac Mini (this will be a secondary computer - main one is an iMac G5). The problem is that the Apple store says the new Mini's ship with Tiger only. I have some software that r

  • Thinkpad T43p doesn't turn on

    Hello, I have my T43p since 4 years ago, always it worked perfect, but recently, suddenly, sometimes it doesn't turn on;  I plug onto the AC adapter, y remove the battery without success... all leds is turned off ... there are two times that it happe

  • Cs4 win7 64 bit strange images behaviour

    Just transferred all my sites to new computer.  I cant swap images on a web page in the usual way: I click on an image, then on the folder icon for "source", I select the thumbnail of the replacement image and nothing happens - the image preview does

  • E50 Font size is too small

    yesterday I bought a Nokia E50. this is really nice one. I love it. but the problem is the font. Its too small. even some times I can't read it, if i am on move. I think NOKIA should solve this problem. Because its a major problem. Anyway, anybody kn

  • I HAVE UPGRADE I PHONE 3GS 6.1.3 THROUGH ITUNES  ITS SHOWING NO SERVICE

    i have I Phone 3gs 32 gb & i have  upgrade my i phone 3gs 6.1.3 upgrade  suceed but problem is tat i showing no service what can i do it need to activaye when i am use i tunes its say insert sim when i have install the the show no service plzzzzzz he