Exporting procedures using sql developer

Hi,
I successfully migrated a mysql database to the oracle database using sql developer.All the data excluding procedures were moved to oracle.
I dont know why but none of the procedures were moved to oracle.
Now, i want to move those procedures to oracle database.Can you guys provide any help.

11g.DBA wrote:
Hi,
I successfully migrated a mysql database to the oracle database using sql developer.All the data excluding procedures were moved to oracle.
I dont know why but none of the procedures were moved to oracle.
Now, i want to move those procedures to oracle database.Can you guys provide any help.If you want to do something, anything "with SQL Developer", the question would be best asked in the [url https://forums.oracle.com/forums/forum.jspa?forumID=260]SQL Developer forum

Similar Messages

  • Executing procedure with IN OUT parameters using SQL developer

    Hi, I'm trying to exceute the below procedure in SQL developer. Here the IN OUT cursor 'journal_cursor' is already defined.
    PROCEDURE LIST_FORPROJECT (
              p_project_sid IN NUMBER,
              p_journal_cursor IN OUT journal_cursor,
         AS
         BEGIN
              OPEN p_journal_cursor FOR
              -- get the journal
                   SELECT j.JOURNAL_KEY AS "Journal_SID",
                             j.JOURNALTEXT AS "Entry",
                             j.CREATEDATE AS "CreateDate",
                             --j.COMMENT_ AS "Comment",
                             j.PROJECTPHASETASK_KEY AS "ProjectPhaseTaskSet_SID",
                             j.person_key AS "Person_SID"
    FROM vdl_JOURNAL j
                   INNER JOIN vdl_PROJECTJOURNAL pj ON pj.JOURNAL_KEY = j.JOURNAL_KEY
                   WHERE pj.PROJECT_KEY = p_project_sid
                   ORDER BY j.CREATEDATE ASC, j.JOURNAL_KEY ASC;
    END LIST_FORPROJECT;
    When trying to run the above procedure through SQL developer, I get the below code generated.
    DECLARE
    P_PROJECT_SID NUMBER;
    P_JOURNAL_CURSOR journal_cursor;
    BEGIN
    P_PROJECT_SID := 5974;
    -- Modify the code to initialize the variable
    -- P_JOURNAL_CURSOR := NULL;
    -- Modify the code to initialize the variable
    LIST_FORPROJECT(
    P_PROJECT_SID => P_PROJECT_SID,
    P_JOURNAL_CURSOR => P_JOURNAL_CURSOR,
    -- Modify the code to output the variable
    DBMS_OUTPUT.PUT_LINE('P_JOURNAL_CURSOR' || P_JOURNAL_CURSOR);
    END;
    But executing the above sql doesn't print the cursor as output but errors out saying 'wrong number or type or arguments in call to ||'. Can somebody please help me in finding a way test and view the results of such a procedure through SQL developer?
    Any help is highly appreciated.
    Regards,
    Ranganath

    Hi,
    I was able to solve the problem.. My cursor was declared like this.
    TYPE journal_def IS RECORD
              journal_sid                    NUMBER(10),
              journaltext                    CLOB,
              createdate                    DATE,
              projectphasetaskset_sid     NUMBER(10),
              person_sid                    NUMBER(10)
    TYPE journal_cursor                    IS REF CURSOR RETURN journal_def;
    I used the journal_def type to fetch the records.
    Here is how my final sql looked like.
    DECLARE
    P_PROJECT_SID NUMBER;
    P_JOURNAL_CURSOR journal_cursor;
    P_J_CURSOR journal_def;
    BEGIN
    P_PROJECT_SID := 11171;
    -- Modify the code to initialize the variable
    -- P_JOURNAL_CURSOR := NULL;
    LIST_FORPROJECT(
    P_PROJECT_SID => P_PROJECT_SID,
    P_JOURNAL_CURSOR => P_JOURNAL_CURSOR,
    -- Modify the code to output the variable
    BEGIN
    --open P_JOURNAL_CURSOR;
    loop
    fetch P_JOURNAL_CURSOR into P_J_CURSOR;
    exit when P_JOURNAL_CURSOR%NOTFOUND;
    DBMS_OUTPUT.put_line(P_J_CURSOR.journal_sid);
    end loop;
    --close P_JOURNAL_CURSOR;
    END;
    END;
    This gave me results. Thanks a ton ALL for your help..... :)..
    Regards,
    Ranganath

  • How to execute a system procedures in Sybase using SQL Developer ?

    Hi everybody,
    I'm using SQL Developer to remote connect to my Sybase Database. But I don't know how to run a system procedures in Sybase on SQL Developer program.
    I I use these command in CLI mode in Solaris server, it's OK. But if I try on my computer, it'll show an error message.
    Input :
    sp_helpdb SecurityDB
    Output :
    Error starting at line 25 in command:
    sp_helpdb SecurityDB
    Error report:
    Unknown Command
    Please help me to do it ?
    Many thanks,

    hello...
    any input will welcomed... Thanks..

  • How to Execute SQL Server stored procedure through SQL Developer?

    Hi,
    I was successful in connecting SQL Server database using SQL Developer. I am able to see all the objects such Tables,Views & Procedure and also can query data using sql Query. But when it comes to executing procedure there's no option to achieve this. I tried "Exec |<Execute Procedure> Proc_name" but unfortunately both statement threw Errors.
    Please suggest about other alternates.
    Thanks in Advance,
    AP

    Hi,
    I was successful in connecting SQL Server database using SQL Developer. I am able to see all the objects such Tables,Views & Procedure and also can query data using sql Query. But when it comes to executing procedure there's no option to achieve this. I tried "Exec |<Execute Procedure> Proc_name" but unfortunately both statement threw Errors.
    Please suggest about other alternates.
    Thanks in Advance,
    AP

  • Demonstrating PL/SQL Functions Using SQL Developer

    Good afternoon,
    I'm starting to write some PL/SQL functions to replace some of the SQL that I use most frequently.  A couple of very simple examples would be:
    create or replace function func_test (p_1 number) return number
    is
    x number;
    y number;
    begin
    x :=1;
    y :=2;
    return p_1 * x * y;
    end func_test;
    create or replace function func_test2 (p_1 varchar2) return varchar2
    is
    return_val varchar2(10);
    begin
    select p_1 into return_val from dual;
    return return_val;
    end func_test2;
    However, at my workplace I haven't been granted create function privileges yet until I can demonstrate some examples, which is understandable.
    For the time being, without these privileges, is there a way I can build/test functions in principle locally using SQL Developer without the need to write the functions to our database? I.e. can I demonstrate the above in SQL Developer, but without wrapping in create or replace syntax?
    I hope this isn't too vague.
    Using Oracle 11gR2 (not logged in to workplace database at the moment for specific version no.)
    SQL Developer 3.4
    Thanks,
    TP

    sb92075 02-Nov-2013 19:12 (in response to TinyPenguin)
    populating test DB with data is a solvable problem.
    You don't need client data to test code (functions).
    You only need sample test data; which generally is less than a few dozen records per table.
    Absolutely, of course. Our client database is pretty messy though, and includes data prior to the implementation of more recent business rules that I need to take account of. Useful perspective though, thanks.
    rp0428 02-Nov-2013 19:14 (in response to TinyPenguin)
    Sure, but then I wouldn't have access to all the data in our client database to test functions under various circumstances.
    Huh? Why not? It's your database so what keeps you from creating a database link to your client database where all the data is?
    Also, I suppose it's not good practice to constantly write/replace/drop functions to/from a database when developing them? Better to test the function in principle and then write to the database?
    Huh? Why not? What you think a dev database is for if not for development?
    Based on your two posts so far in this thread it's understandable why they don't want to give you privileges yet. Those sample 'functions' you posted are NOT a good use for functions.
    In sql developer you can just create and save the queries you use most often. There is no need to create functions for that.
    But if you do need an anonymous function now and then just create one using sql*plus syntax:
    Our IT department are pretty sensitive about how they allow access, even to the dev environment. As you've identified, I'm not naturally a programmer so the option to play around with the data to develop some representative examples about how we can simplify and devolve SQL reporting to more members of staff is useful to me. I just wrote those two function quickly for the purpose of posting some sample data, which I thought would be helpful. Thanks for illustrating how to return their output using an anonymous block.
    FrankKulash 02-Nov-2013 19:13 (in response to TinyPenguin)
    Hi,
    The obvious solution is to get the privileges.  If your employer really wants you to do something, they need to give you the necessary privileges to do it.  It's silly for them to tell you to do something, but refuse to let you do it.
    Failing that, you can install Oracle on your own machine, as suggested above.  It's free and legitimate if you're only using it for learning and developing.  Oracle Express Edition is very easy to install.
    As a last resort, you can write functions and procedures that are local to an anonymous block, like this:
    Thanks Frank. Yeah I'm going to speak with our DBA next week about privileges. I've got XE/SQL Developer installed on my own computer - I wrote those sample functions using them - I just wasn't sure how to call/return anonymous blocks as both you and rp identified to develop at work as an interim solution.
    Thanks a lot All,
    TP.

  • How to debug a procedure in SQL Developer

    i am a plsql writer .... i use SQL Developer to connect to oracle on windows platform ... iam using oracle
    version 10g some time i need to debug a procedure or i want to run a procedure in debug mode
    please tell me how to do this SQL Developer

    There's great help inside sqldev, just follow the Help Contents - Concepts and usage - Running and debugging...
    Have fun,
    K.

  • Error in Migration Repository using Sql*Developer Migration Workbench

    To migrate a MS access mdb database to Oracle using Sql*Developer Migration Workbench, I try to create first the the Migration Repository in SQL*Developer.
    The repository is created, but under PACKAGES I could see that package MD_META has been compiled with errors.
    PACKAGE BODY AO_PERSONAL.MD_META@DMCAPX (AO_PERSONAL):
    Error(27,2): PL/SQL: SQL Statement ignored
    Error(30,23): PL/SQL: ORA-00904: : ungültiger Bezeichner
    Well, when I ignore this and continue with the next step of the migration process "Capture Microsoft Access Exported XML file" to create the Captured Model, I get the following error message:
    ORA-04063: package body "AO_PERSONAL.MD_META" enthält Fehler ORA-06508: PL/SQL: aufgerufene Programmeinheit : "AO_PERSONAL.MD_META" konnte nicht gefunden werden ORA-06512: in "AO_PERSONAL.MD_PROJECTS_TRG", Zeile 3 ORA-04088: Fehler bei der Ausführung von Trigger 'AO_PERSONAL.MD_PROJECTS_TRG'
    Target database RDBMS is Oracle Database 10g Enterprise Edition Release 10.2.0.3.0. So the proposal of note 427916.1 to create the Repository in a 10.2 RDBMS does not solve the problem.
    I even tried to use the Quick Migrate feature in SQL*Developer, but got the same error message.

    "inserted value too large for column"
    Is there a LOGON trigger on the database or user ?
    I'd be surprised at SQL Developer trying to insert data into anything on connect.
    I'd suspect code being executed by the database, maybe using a MODULE or PROGRAM from v$session or USERENV / SYS_CONTEXT.

  • Can we use SQL developer tool to READ/WRITE BerkeleyDB by any means

    We use Berkeley Db as a persistent database, which holds data less frequently changed data. Can is it possible to use SQL Developer tool or any other front end tool that can connect and communicate to Berkeley db file for INSERT, UPDATE, DELETE records.

    I assume you're referring to Berkeley DB SQL (BDB SQL API).
    SQL Developer is not certified to work with BDB SQL; see the SQL Developer Certifications page.
    Something similar was asked some time ago, about connecting JDeveloper to BDB SQL; see this Re: How connect Oracle JDeveloper 11g to Berkeley DB 11g. The SQL tools in JDeveloper and SQL Developer are similar and built on the same components, so my answer there can be extended to SQL Developer as well. While you can probably have SQL Developer properly connect to a BDB SQL database, I am afraid you won't be able to do more than just viewing the data; likely any attempt to generate DDL or DML statements, export data, or run DML statements against the database will fail.
    If you migrated to BDB SQL from SQLite and were using a front-end tool for SQLite, it should be possible to use that with BDB SQL as well.
    Regards,
    Andrei

  • Calling Procedure from SQL Developer

    Could anyone tell me how to call a Procedure from a SQL Worksheet using SQL Developer?
    I can run by right clicking the Procedure in the Connections window, but want to call it using SQL commands.
    I can run it using EXECUTE procedurename in SQL Plus but I get an ORA-00900 - invalid SQL statement if I try this in a SQL Worksheet. If I try CALL procedurename, I get an ORA-06576 - not a valid procedure or function name.
    Am I doing something daft (I've been using Oracle for 3 days)?

    begin
    procedure(params);
    end;

  • How to exclude schema name from exported files (PL SQL Developer)

    Dear all,
    Just one question: I am using PL SQL Developer. My goal is to export some data (as .sql and .dmp files) from one database and to import them into the another database (both databases have identical structure - test database and production, just different database names and names of schema. In order to make it possible, I need to exclude schema name from generated export file. I believe that it is possible to do it automatically by setting up parameters of PL SQL Developer. How?
    Thank you in advance,
    Kindest regards,
    Dragana

    In the meantime, I have found the answer on my previous question:
    Actually, the initial idea (how to exclude schema name from exported files) was wrong. No need for any intervention.
    Trick is: Schema name can be changed during the import of exported files (PL SQL Developer during import gives possibility: From User (old schema) To User (new schema) .
    Hope that this will be useful info for others.
    Dragana

  • Can connect using sqlplus, cannot using SQL Developer

    Hi
    I cannot find out why I cannot connect using SQL developer, while sqlplus works fine with the same login information.
    *1. TNS ping:*
    C:\>TNSPING manila
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-GRU-2
    010 13:28:38
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.171)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (370 msec)
    *2. sqlplus*
    SQL> CONNECT SULU_DEV/<pass>@MANILA
    Connected.
    *3. sqlplus - by IP*
    SQL> CONNECT SULU_DEV/<pass>@10.0.0.171:1521/XE
    Connected.
    *4. SQL Developer*
    Username: SULU_DEV
    Connection type: TNS
    Network alias: MANILA
    Error: I/O Exception: Connection reset
    *5. SQL Developer - by IP*
    Username: SULU_DEV
    Connection type: Basic
    Hostname: 10.0.0.171
    Port: 1521
    SID: xe
    Error: I/O Exception: Connection reset
    *6. SQL Developer - without username*
    Username: <blank>
    Connection type: TNS
    Network alias: MANILA
    Error: ORA-01017: invalid username/password
    It seems that I have connection to the server, but from some reason it is disconnected when I'm using SQL Developer, but works fine with sqlplus.
    Any ideas on what it might be?
    Thank you in advance,
    Regards,
    Marek

    The connection export function it's available in 2.1.1.64, you need to right click on the main Connections node, and it will allow you to export all or part of the current connections, or import from a previously exported file.
    As for the highlight statement feature it's available in SQLDeveloper; actually you do not even have to highlight the required statement, as long as you take the habit of ending every statement with a ";", in this case you only need to place the caret inside the statement and SQLDeveloper will automatically highlight it for you (if you want to manually highlight a statement you can still do so without problems).
    Finally as a last try to solve your connection problem without having to call for network support you could try to check
    Preferences -> Database -> Advanced -> Use OCI/Thick DriverThis will force SQLDeveloper to use your oracle client for connections instead of it's native JDBC based connections (even if you use TNS based connections you will still use JDBC unless you have this checked).
    As for other graphical tools for Oracle there are many both free or for a price.
    1) In the for price world Toad stands out, i heard of a free option too but I'm not sure of the limitations.
    2) For free you can use DBVisualizer which is fairly good (never used it too much thou).
    3) Finally there is SQuirreL which is both free and open source but it has fairly basic functionality compared to the two above.
    Obviously there are many others, but IMHO few will provide you with the same functions of SQLDeveloper or Toad for Oracle databases

  • Create statspack report using sql*developer

    Hello,
    While connecting with PERFSTAT user I can not create statspack report using SQL*Developer:
    @?/rdbms/admin/awrrpt
    Error starting at line 1 in command:
    @?/rdbms/admin/awrrpt
    Error report:
    Unable to open file: "?/rdbms/admin/awrrpt.sql"
    Actually, my problem or question is that how can PERFSTAT user can generate statspack reports from a Client side. What is the other way a non-dba can see the snapshots histroy and generate report (by using perfstat user ) while joing tables or using views?
    Thanks a lot.
    Best Regards

    Hi,
    for awr reports @?/rdbms/admin/awrrpt (you need EE+Diagnostic Pack) there is a solution.
    Grant execute dbms_workload_repository to <user>;
    Grant select_catalog_role to <user>;
    get all SNAP_IDs
    SELECT   TO_CHAR(s.startup_time,'YYYY.MM.DD HH24:MI:SS') INSTART_FMT,
             di.instance_name INST_NAME,
             di.db_name DB_NAME,
             s.snap_id SNAP_ID,
             TO_CHAR(s.end_interval_time,'YYYY.MM.DD HH24:MI:SS') SNAPDAT,
             s.snap_level LVL
    FROM    dba_hist_snapshot s,
             dba_hist_database_instance di
    WHERE   di.dbid = s.dbid
             AND di.instance_number = s.instance_number
             AND Di.Startup_Time = S.Startup_Time
    ORDER BY snap_id desc;
    Select * From Table(Sys.Dbms_Workload_Repository.Awr_Report_Html(DBID, 1, BEGIN_SNAP_ID, END_SNAP_ID));
    For statspack i don't know a solutuion. I think the best idea is, create a job to make the statspack report on the server side and access it via external tables or mail them forward to you.
    Best regards
    Thomas

  • Improve the performance in stored procedure using sql server 2008 - esp where clause in very big table - Urgent

    Hi,
    I am looking for inputs in tuning stored procedure using sql server 2008. l am new to performance tuning in sql,plsql and oracle. currently facing issue in stored procedure - need to increase the performance by code optmization/filtering the records using where clause in larger table., the requirement is Stored procedure generate Audit Report which is accessed by approx. 10 Admin Users typically 2-3 times a day by each Admin users.
    It has got CTE ( common table expression ) which is referred 2  time within SP. This CTE is very big and fetches records from several tables without where clause. This causes several records to be fetched from DB and then needed processing. This stored procedure is running in pre prod server which has 6gb of memory and built on virtual server and the same proc ran good in prod server which has 64gb of ram with physical server (40sec). and the execution time in pre prod is 1min 9seconds which needs to be reduced upto 10secs or so will be the solution. and also the exec time differs from time to time. sometimes it is 50sec and sometimes 1min 9seconds..
    Pl provide what is the best option/practise to use where clause to filter the records and tool to be used to tune the procedure like execution plan, sql profiler?? I am using toad for sqlserver 5.7. Here I see execution plan tab available while running the SP. but when i run it throws an error. Pl help and provide inputs.
    Thanks,
    Viji

    You've asked a SQL Server question in an Oracle forum.  I'm expecting that this will get locked momentarily when a moderator drops by.
    Microsoft has its own forums for SQL Server, you'll have more luck over there.  When you do go there, however, you'll almost certainly get more help if you can pare down the problem (or at least better explain what your code is doing).  Very few people want to read hundreds of lines of code, guess what's it's supposed to do, guess what is slow, and then guess at how to improve things.  Posting query plans, the results of profiling, cutting out any code that is unnecessary to the performance problem, etc. will get you much better answers.
    Justin

  • Error when using sql developer

    my computer lost power while i was using sql developer (version 1.1.0.23). i restarted and logged in and now any time i try to access a saved db connection or go to tools prefernces, database and any parameters i get the following error or something very similar.
    ava.lang.NullPointerException
         at oracle.dbtools.raptor.conntypes.RaptorClassLoader.findClassLoader(RaptorClassLoader.java:48)
         at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.createConnectionImpl(RaptorConnectionWrapper.java:202)
         at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.createConnection(RaptorConnectionWrapper.java:160)
         at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.getJdbcConnection(RaptorConnectionWrapper.java:191)
         at oracle.dbtools.raptor.conntypes.RaptorConnectionWrapper.getPresentation(RaptorConnectionWrapper.java:66)
         at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.createConnection(Connections.java:738)
         at oracle.dbtools.raptor.utils.Connections$ConnectionInfo$ConnectRunnable.doWork(Connections.java:611)
         at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:553)
         at java.lang.Thread.run(Thread.java:619)

    Download the latest and Greatest 3.1 at :http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
    1.1 is a very old version
    Michael

  • How to use sql developer to connect informix

    hi, everyone,i want to use sql developer to connect to informix database.
    i have added the informix jdbc driver,but when i create a new connection,i can't find the informix database.
    does it not support informix?
    please help.
    Edited by: 917391 on 2012-2-27 下午7:10

    SQL developer supports (as listed in the release notes: http://www.oracle.com/technetwork/developer-tools/sql-developer/sqldev31-ea-relnotes-487612.html) only these foreign databases:
    Third Party Databases
    SQL Developer supports IBM DB2 UDB LUW , Microsoft SQL Server and Microsoft Access, MySQL, Sybase Adaptive Server and Teradata.

Maybe you are looking for

  • I would like to know what 'Product 031-11255' is.

    Hellow~ I've got an error when downloading Mac OS X Update Combined 10.6.8 var. There is a install.log error message: Product 031-11255: no package found for identifier a I would like to know what 'Product 031-11255' is. PLeasekindly inform me as soo

  • Why does Apple support print those "Hello" booklets that came with my new iMac in super small fonts?

    Yesterday I purchased the latest available 27inch iMac from my local Apple only dealer.     ( It sure beats my very first Mac which was an LC520. ) The included in the box printed quick start guide named "Hello" was printed using a font size very clo

  • Problem with project builder

    dear friends i use developer 6i for windows 2000 server i want to deliver my project i open project builder and i read the help the help tells me that i must do the following to deliver my project : - from file menue choose administration then choose

  • Flash player errors

    the player keeps showing errors, on most websites inc facebook, bmw, mercedes etc. Never had this problem before. It shows some actionscript error - like if it was in debug mode for some reason.... got the latest one 10.1 - using firefox 4 - same thi

  • 5th gen ipod and iplay monster transmitter question...

    I have the 5th gen. ipod and i just bought the iplay ipod transmitter, so that i can play my ipod through the fm radio station in my car...but when i plugged it in my ipod and followewd instructions..nothing happened..i even took it back and traded a