Printing Stored Procedure, etc for SQL Developer

Hi
I've run into some issues trying to print stored procedure or package code from SQL Developer.
1) The text printout comes out in enlarged font (size 20+)
2) The printout does not completely print all code - only 1 page regardless if it fits to one page or not.
I am running on Windows 2000 Service Pack 4. Printing to a HP Laser Jet 5M.
Is anyone else have the same problems when printing?
Thanks in advance.

We do have an issue with printing. It is contained in our Release Notes -
"Print prints only one page that is a truncation of the current tab."
I would suggest saving to a file and printing from there for now -
-- Sharon

Similar Messages

  • Running a Stored Procedure in Oqacle SQL Developer

    Hi All,
    Could anybody elaborate on the procedure to execute a Stored Procedure in Oracle SQL Developer. I feel we need to configure the output for the DBMS_OUTPUT
    Cheers,
    Bell

    on the procedure to execute a Stored Procedure in Oracle SQL Developer.Select the procedure or package spec in the Connections panel. Right click with the mouse. This will bring up a panel with an anonymous block to run the code and property sheets to populate the parameters, etc.
    Cheers, APC

  • Getting the count of stored procedure results in SQL Developer

    Hello,
    I have a stored procedure in SQL Developer. I right-click and say run. An output window at the bottom displays my results. There's no field, however, that tells me how many results I got.
    There must be a way to figure this out (without modifying the SQL to include a count field). Is there?

    Hi Delaynomore,
    Please follow the step and suggestion in the below MSDN document to do the move to the new versionof SQL Server. 
    Use Upgrade Advisor to Prepare for Upgrades
    https://msdn.microsoft.com/en-us/library/ms144256(v=sql.110).aspx
    If there are still some errors when running the SP, you could use the SQL profiler trace to easily find which statement in the SP causes the error message. 
    How To: Use SQL Profiler
    https://msdn.microsoft.com/en-us/library/ff650699.aspx
    SQL Server Profiler Step by Step
    http://www.codeproject.com/Articles/21371/SQL-Server-Profiler-Step-by-Step
    Regards,
    Doris Ji

  • Execute a stored procedure in oracle sql developer

    I write a procedure in a package it compiles fine, but why when I execute it from right click the stored procedure and then click Ok, nothing happens, I cannot see from any screen if it executed or not , or is it successful or not?
    Thanks,

    What happens if you open the package in the editor and use the 'Execute' button on the toolbar?
    You should be prompted with a pop-up dialog asking you to select your procedure/function and provide the necessary input values and hit the 'Ok' button.

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • How to print a something in oracle sql developer

    Hello all
    Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
    thank u in advance.
    best

    1003209 wrote:
    Hello all
    Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
    thank u in advance.
    bestDBMS_OUTPUT()

  • GeoRaptor 3.0 for SQL Developer 3.0 and 2.1 has now been released

    Folks,
    I am pleased to announce that, after 5 months of development and testing, a new release of GeoRaptor for SQL Developer 2.1 and 3.0 is now available.
    GeoRaptor for SQL Developer 3 is available via the SQL Developer Update centre. GeoRaptor 3 for SQL Developer 2.1 is being made available
    via a download fro the GeoRaptor website.
    No release notes have been compiled as the principal developer (oops, that's me!) is currently busy doing real work for a change (another 3 weeks), earning a living
    and keeping the wolves at bay. More extensive notes (with images) will be compiled when I get back. (Unless anyone is offering! See next.)
    We are still looking for people to:
    1. Provide translations of the English dialog menus etc.
    2. Write more extensive user documentation. If you use a particular part of GeoRaptor a lot and think
    you have found out all its functionality and quirks, contact us and offer to write a few pages of
    documentation on it. (Open Office or Microsoft Word is fine.) Easiest way to do this is to simply
    make screen captures and annotate with text.
    3. Conduct beta testing.
    Here are the things that are in the new release.
    New functionality:
    Overhaul of Validation Functionality.
    1. User can specify own validation SELECT SQL as long as it returns three required columns. The SQL is thus totally editable.
    2. Validation update code now allows user to associate a PL/SQL function with an error number which is applied in the UPDATE SQL.
    3. UPDATE SQL can use WHERE clause of validation SELECT SQL (1) to update specific errors.
       NOTE: The generated UPDATE statement can be manually edited. It is NEVER run by GeoRaptor. To run any UPDATE, copy the statement
       to the clipboard and run in an appropriate SQL Worksheet session within SQL Developer.
    4. Main validation table allows:
       a. Sorting (click on column header) and
       b. Filtering.
       c. Copying to Clipboard via right mouse click sub menu of:
          - Geometry's SDO_ELEM_INFO array constructor.
          - SDO_GEOMETRY constructor
          - Error + validation string.
       d. Access to Draw/Zoom functions which were previously buttons.
       e. Added a new right mouse click menu "Show Feature's Individual Errors" that gathers up all the errors
          it can process - along with the ring / element that is host to the error (if it can) - and displays
          them in the Attribute/Geometry tabs at the bottom of the Map Window (where "Identify" places its results).
          The power of this will be evident to all those who have wanted a way of stepping through errors in a geometry.
       f. Selected rows can now be deleted (select rows: press <DELETE> key or right mouse click>Delete).
       g. Table now has only one primary key column, and has a separate error column holding the actual error code.
       h. Right mouse click men added to table menu to display description of error in the new column (drawn from Oracle documentation)
       i. Optimisations added to improve performance for large error lists.
    5. Functionality now has its own validation layer that is automatically added to the correct view.
       Access to layer properties via button on validation dialog or via normal right mouse click in view/layer tree.
    Improved Rendering Options.
    1. Linestring colour can now be random or drawn from column in database (as per Fill and Point colouring)
    2. Marking of SDO_GEOMETRY objects overhauled.
       - Ability to mark or LABEL vertices/points of all SDO_GEOMETRY types with coordinate identifier and
         option {X,Y} location. Access is via Labelling tab in layer>properties. Thus, coordinate 25 of a linestring
         could be shown as: <25> or {x,y} or <25> {x,y}
       - There is a nice "stacked" option where the coordinate {x,y} can be written one line below the id.
       - For linestrings and polygons the <id> {x,y} label can be oriented to the angle between the vectors or
         edges that come in, and go out of, a vertex. Access is via "Orient" tick box in Labelling tab.
       - Uses Tools>Preferences>GeoRaptor>Visualisation>SDO_ORDINATE_ARRAY bracket around x,y string.
    3. Start point of linestring/polygon and all other vertices can be marked with user selectable point marker
       rather than previously fixed markers.
    4. Can now set a NULL point marker by selecting "None" for point marker style pulldown menu.
    5. Positioning of the arrow for linestring/polygons has extra options:
       * NONE
       * START    - All segments of a line have the arrow positioned at the start
       * MIDDLE   - All segments of a line have the arrow positioning in the middle.
       * END      - All segments of a line have the arrow positioning in the END.
       * END_ONLY - Only the last segment has an arrow and at its end.
    ScaleBar.
    1. A new graphic ScaleBar option has been added for the map of each view.
       For geographic/geodetic SRIDs distances are currently shown in meters;
       For all SRIDs an attempt is made to "adapt" the scaleBar units depending
       on the zoom level. So, if you zoom right in you might get the distance shown
       as mm, and as you zoom out, cm/m/km as appropriate.
    2. As the scaleBar is drawn, a 1:<DEMONINATOR> style MapScale value is written
       to the map's right most status bar element.
    3. ScaleBar and MapScale can be turned off/on in View>Properties right mouse
       click menu.
    Export Capabilities.
    1. The ability to export a selection from a result set table (ie result of
       executing ad-hoc SQL SELECT statement to GML, KML, SHP/TAB (TAB file
       adds TAB file "wrapper" over SHP) has been added.
    2. Ability to export table/view/materialised view to GML, KML, SHP/TAB also
       added. If no attributes are selected when exporting to a SHP/TAB file, GeoRaptor
       automatically adds a field that holds a unique row number.
    3. When exporting to KML:
       * one can optionally export attributes.
       * Web sensitive characters < > & etc for KML export are replaced with &gt; &lt; &amp; etc.
       * If a column in the SELECTION or table/view/Mview equals "name" then its value is
         written to the KML tag <name> and not to the list of associated attributes.
         - Similarly for "description" -> <description> AND "styleUrl" -> <styleUrl>
    4. When exporting to GML one can optionally export attributes in FME or OGR "flavour".
    5. Exporting Measured SDO_GEOMETRY objects to SHP not supported until missing functionality
       in GeoTools is corrected (working with GeoTools community to fix).
    6. Writing PRJ and MapInfo CoordSys is done by pasting a string into appropriate export dialog box.
       Last value pasted is remembered between sessions which is useful for users who work with a single SRID.
    7. Export directory is remembered between sessions in case a user uses a standard export directory.
    8. Result sets containing MDSYS.SDO_POINT and/or MDSYS.VERTEX_TYPE can also be written to GML/KML/SHP/TAB.
       Example:
       SELECT a.geom.sdo_point as point
         FROM (SELECT sdo_geometry(2002,null,sdo_point_type(1,2,null),sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)) as geom
                 FROM DUAL) a;
       SELECT mdsys.vertex_type(a.x,a.y,a.z,a.w,a.v5,a.v6,a.v7,a.v8,a.v9,a.v10,a.v11,a.id) as vertex
         FROM TABLE(mdsys.sdo_util.getVertices(mdsys.sdo_geometry(2002,null,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)))) a;
    9. A dialog appears at the end of each export which details (eg total) what was exported when the exported recordset/table contains more
       than on shape type. For example, if you export only points eg 2001/3001 from a table that also contains multipoints eg 2005/3005 then
       the number of points exported, and multipoints skipped will be displayed.
    10. SHP/TAB export is "transactional". If you set the commit interval to 100 then only 100 records are held in memory before writing.
        However, this does not currently apply to the associated DBASE records.
    11. SHP/TAB export supports dBase III, dBase III + Memo, dBase IV and dBase IV + Memo.
        Note: Memo allows text columns > 255 characters to be exported. Non-Memo formats do not and any varchar2 columns will be truncated
        to 255 chars. Some GIS packages support MEMO eg Manifold GIS, some do not.
    12. Note. GeoRaptor does not ensure that the SRID of SDO_GEOMETRY data exported to KML is in the correct Google Projection.
        Please read the Oracle documentation on how to project your data is this is necessary. An example is:
        SELECT OBJECTID,
               CODIGO as name,
               NOME as description,
               MI_STYLE,
               SDO_CS.TRANSFORM(shape,'USE_SPHERICAL',4055) as shape
          FROM MUB.REGIONAL;
    13. NOTE: The SHP exporter uses the Java Topology Suite (JTS) to convert from SDO_GEOMETRY to the ESRI Shape format. JTS does not handle
        circular curves in SDO_GEOMETRY objects you must "stroke" them using sdo_util.arc_densify(). See the Oracle documentation on how
        to use this.
    Miscellaneous.
    1. Selection View - Measurement has been modified so that the final result only shows those geometry
       types that were actually measured.
    2. In Layer Properties the Miscellaneous tab has been removed because the only elements in it were the
       Geometry Output options which have now been replaced by the new GML/KML/etc export capabilities.
    3. Shapefile import's user entered tablename now checked for Oracle naming convention compliance.
    4. Identify based on SDO_NN has been removed from GeoRaptor given the myriad problems that it seems to create across versions
       and partitioned/non-partitioned tables. Instead SDO_WITHIN_DISTANCE is now used with the actual search distance (see circle
       in map display): everything within that distance is returned.
    5. Displaying/Not displaying embedded sdo_point in line/polygon (Jamie Keene), is now controlled by
       a preference.
    6. New View Menu options to switch all layers on/off
    7. Tools/Preferences/GeoRaptor layout has been improved.
    8. If Identify is called on a geometry a new right mouse click menu entry has been added called "Mark" which
       has two sub-menus called ID and ID(X,Y) that will add the labeling to the selected geometry independently of
       what the layer is set to being.
    9. Two new methods for rendering an SDO_GEOMETRY object in a table or SQL recordset have been added: a) Show geometry as ICON
       and b) Show geometry as THUMBNAIL. When the latter is chosen, the actual geometry is shown in an image _inside_ the row/column cell it occupies.
       In addition, the existing textual methods for visualisation: WKT, KML, GML etc have been collected together with ICON and THUMBNAIL in a new
       right mouse click menu.
    10. Tables/Views/MViews without spatial indexes can now be added to a Spatial View. To stop large tables from killing rendering, a new preference
        has been added "Table Count Limit" (default 1,000) which controls how many geometry records can be displayed. A table without a spatial
        index will have its layer name rendered in Italics and will write a warning message in red to the status bar for each redraw. Adding an index
        which the layer exists will be recognised by GeoRaptor during drawing and switch the layer across to normal rendering.
    Some Bug Fixes.
    * Error in manage metadata related to getting metadata across all schemas
    * Bug with no display of rowid in Identify results fixed;
    * Some fixes relating to where clause application in geometry validation.
    * Fixes bug with scrollbars on view/layer tree not working.
    * Problem with the spatial networks fixed. Actions for spatial networks can now only be done in the
      schema of the current user, as it could happen that a user opens the tree for another schema that
      has the same network as in the user's schema. Dropping a drops only the network of the current connected user.
    * Recordset "find sdo_geometry cell" code has been modified so that it now appears only if a suitable geometry object is
      in a recordset.  Please note that there is a bug in SQL Developer (2.1 and 3.0) that causes SQL Developer to not
      register a change in selection from a single cell to a whole row when one left clicks at the left-most "row number"
      column that is not part of the SELECT statements user columns, as a short cut to selecting a whole row.  It appears
      that this is a SQL Developer bug so nothing can be done about it until it is fixed. To select a whole row, select all
      cells in the row.
    * Copy to clipboard of SDO_GEOMETRY with M and Z values forgot has extraneous "," at the end.
    * Column based colouring of markers fixed
    * Bunch of performance improvements.
    * Plus (happily) others that I can't remember!If you find any bugs register a bug report at our website.
    If you want to help with testing, contact us at our website.
    My thanks for help in this release to:
    1. John O'Toole
    2. Holger Labe
    3. Sandro Costa
    4. Marco Giana
    5. Luc van Linden
    6. Pieter Minnaar
    7. Warwick Wilson
    8. Jody Garnett (GeoTools bug issues)
    Finally, when at the Washington User Conference I explained the willingness of the GeoRaptor Team to work
    for some sort of integration of our "product" with the new Spatial extension that has just been released in SQL
    Developer 3.0. Nothing much has come of that initial contact and I hope more will come of it.
    In the end, it is you, the real users who should and will decide the way forward. If you have ideas, wishes etc,
    please contact the GeoRaptor team via our SourceForge website, or start a "wishlist" thread on this forum
    expressing ideas for future functionality and integration opportunities.
    regards
    Simon
    Edited by: sgreener on Jun 12, 2011 2:15 PM

    Thank you for this.
    I have been messing around with this last few days, and i really love the feature to pinpoint the validation errors on map.
    I has always been so annoying to try pinpoint these errors using some other GIS software while doing your sql.
    I have stumbled to few bugs:
    1. In "Validate geometry column" dialog checking option "Use DimInfo" actually still uses value entered in tolerance text box.
    I found this because in my language settings , is the decimal operators
    2. In "Validate geometry column" dialog textboxs showing sql, doesn't always show everything from long lines of text (clipping text from right)
    3. In "Validate geometry column" dialog the "Create Update SQL" has few bugs:
    - if you have selected multiple rows from results and check the "Use Selected Geometries" the generated IN-clause in SQL with have same rowid (rowid for first selected result) for all entries
    Also the other generated IN clause in WHERE-clause is missing separator if you select more than one corrective function
    4. "Validate geometry column" dialog stays annoyingly top most when using "Create Update SQL" dialog

  • GeoRaptor 3.2.1 Released for SQL Developer 3.x

    Spatialites!
    After 6 months of development and testing, GeoRaptor 3.2.1 has been released for SQL Developer 3.x (tested on 3.0, 3.1 and 3.2). This release no longer supports SQL Developer 1.x or 2.x releases due to internal changes to the SQL Developer APIs.
    GeoRaptor can be downloaded from the GeoRaptor project's sourceforge page: http://sourceforge.net/projects/georaptor and installed via Help>Check for Updates>Install from Local File. Installation via SQL Developer's update mechanism should be available soon.
    The release notes for this release are:
    * Fixed issues with validate geometry functionality in particular the update dialog box.
    * Revamped "About GeoRaptor" form. Includes clickable URLs, links to mailing lists, version number listing, thanks to testers etc.
    * Placed "About GeoRaptor" icon on GeoRaptor's map toolbar.
    * SQL Developer NLS settings accessed: improvements in the display and entry and numeric data.
      -- Tolerances in Spatial Layer properties will display with the NLS decimal separator eg 0,05.
         Some parts of GeoRaptor such as Validation that show and accept numbers have not been changed from when someone else modified the code.
         If you double click on the left MBR/right MBR icon in the map at the bottom, the current centre position will display according to the NLS settings.
         Editing the value to jump the map to that point works even with grouping separators and decimal separators being commas!
    * Spatial Layer Draw has been modified to use NLS based decimal formatting.
    * New geometry marking/labelling options have been added. In particular you can now label the vertices of a linestring/polygon with the following additional elements:
      -- Cumulative length
      -- Measure (M)
      -- Z value
      -- Labelling of vertices with <id>{X,Y} now also honours 3/4D geometries. If geometry has XYY then it will be labelled as {X,Y,Z} etc.
    * You can also label each vector/segment of a linestring/polygon with:
      -- Length
      -- Cumulative Length
      -- Bearing (approximate for geodetic/geographic data)
      -- Distance (approximate for geodetic/geographic data)
      -- Bearing and Distance (approximate for geodetic/geographic data)
    * The font properties of the mark text can be changed independently of the feature label. This includes the offset and label position (CC, LL, UR etc).
    * New feature labelling options have been provided:
      -- First/middle/last vertex,
      -- Any supplied sdo_point within a line/polygon's sdo_geometry object, or
      -- Calculated by GeoRaptor on the client side using Java Topology Suite.
    * Result sets now have the ability to:
      -- Copy to clipboard all geometries across many rows and columns.
      -- Display one or more (selected) geometries in a popup image window. This functionality is also available in the result set generated by an Identify command.
    * New GeoRaptor Preferences:
      -- Width and height in pixels of the new popup image window (displaying one or more geometry objects) can be set;
      -- Colours of orphan, missing and correct metadata entries for Metadata Manager;
      -- Prefixing with MDSYS for all currently supported spatial objects - sdo_geometry, sdo_point, sdo_elem_info, sdo_ordinates, sdo_dim_info - has been made an option.
      -- There is now a new property called "Show Number Grouping Separator" in Tools>GeoRaptor>Visualisation.
         If it is ticked a number will be formatted with the thousands separator in Tools>Database>NLS eg 10000.000 will display as 10,000.000.
    * Sdo_Geometry display of all spaces in text between elements of the sdo_geometry array have been removed.
       This was done mainly to compact the sdo_geometry strings so that they are as small as possible when displaying or copying to clipboard.
    * Help pages added to the following dialogs with more to follow:
      -- Metadata Manager,
      -- Shapefile Importer and
      -- Layer Properties dialogs.
    * GeoRaptor menu entries renamed. New "Manage All Metadata" entry added to View>GeoRaptor menu.
    * Spatial Index creation dialog now supports additional index parameters and parallel build settings.
    * Metadata Manager overhauled:
      a. Shows:
         1. Metadata entries which have no underlying oracle object (orphan)
         2. Metadata entries for existing underlying objects (existing case)
         3. Database objects with sdo_geometry for which no metadata entry exists (new)
      b. All orphan/existing/missing colours for (a) can be set via Preferences>GeoRaptor>Visualisation
      c. All actions for main (bottom) metadata table are in a single right mouse click menu.
         Some entries will only appear if a single row is selection (metadata copy), others (delete and copy to clipboard) will appear for one or more.
      d. Can now switch between open connections to modify metadata of other objects in schemas other than the starting object.
      e. Buttons revamped.
    * Tab/Shapefile export:
      a. Export now supports NULL valued columns. Can be exported as an empty string (if DBase override in GeoRaptor Preferences is ticked) or
         as a predefined value eg NULL date => 1900-01-01 (set in new GeoRatptor Import/Export Preferences).
      b. Some work attempted on export of NLS strings (still not corrected).
      c. Objects with no rows now correctly processed.
    * Shapefile Import
      -- Bug relating to Linux file names corrected.
    * Fixed issue (identified by John O'Toole) with spatial index underlying a view not being used in map display.
    * Reinstated sdo_nn as the principal method for Identify (requested by John O'Toole).
    * Fixed problem with handling single click zoom in and out in GeoRaptor map etc.
    * Fixed problem with rendering lines from database item (identified by Vladimir Pek).The new "About GeoRaptor" should be read by all people installing GeoRaptor.
    Please, please consider registering your email address with our private email list so that we can get a feel for the sorts of people downloading and installing GeoRaptor.
    Please consider helping us with documentation or the internationalisation via translating properties files from English to your native language.
    GeoRaptor is written and maintained by people who use SQL Developer and Spatial every day but we don't pretend we know everything that users want: please let us know via our feature request page at SourceForge.
    We don't get paid for what we do so are always looking for additional help.
    Here are some of the requests we have had for improvements:
    1. MySQL access
    2. WMS access;
    3. Ability to import shapefile data into an existing table;
    4. Ability to processing multiple shapefiles into separate tables (current version can import one or more into a single target table);
    5. Ability to export/import layer definitions to give to others;
    6. Support for non-English character sets for varchar exports to shapefiles.Some are relatively simply, some require a lot of engineering work. For the latter, we are considering alternative funding methods to the currently completely free development approach.
    Thanks to the following for their invaluable assistance:
    Holger Labe, Germany
    John O'Toole, Ireland
    Vladimir Pek, Czech Republic
    Pieter Minnaar, Holland
    Olaf Iseeger, Germany
    Sandro Costa, Brazil;
    Marco Giana, Australia.regards
    Simon Greener
    Principal GeoRaptor Developer
    Edited by: Simon Greener on Sep 10, 2012 2:43 PM

    Simon,
    I will admit, I almost never use SQL Developer. I have been a long time Toad user, but for this tool, I fumbled around a bit and got everything up and running quickly.
    That said, I tried the new GeoRaptor tool using this tutorial (which is I think is close enough to get the jist). http://sourceforge.net/apps/mediawiki/georaptor/index.php?title=A_Gentle_Introduction:_Create_Table,_Metadata_Registration,_Indexing_and_Mapping
    As I stumble around it, I'll try and leave some feedback, and probably ask some rather stupid questions.
    Thanks for the effort,
    Bryan

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • JDBC - CallableStatement - Error in Accessing Stored Procedure of MS SQL

    Dear Friends,
    The following is the code to access a stored procedure of MS SQL Server 7.0 sp4,
              try
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall("{call backupdb[?,?]}");
                   cstmt.setString("db_name","SBIREMITLIVE");
                   cstmt.setString("path", "c:\testing.bak");
                   cstmt.executeQuery();
                   System.out.println("Stored Procedure called successfully");
              catch(SQLException se)
                   System.out.println(se.toString());
    when i execute this i am getting the error as " MS ODBC-MS SQL Server Syntax error or Access Violation "
    What's the problem exactly ? anybody came across this issue..if so...kindly help me....
    Here is my MS SQL Server stored procedure.....for reference
    create procedure backupdb(@db_name varchar(40), @path varchar(100)) as
    Backup database @db_name to disk = @path
    Regards,
    V.Prasanna

    Dear DigitalDreamer,
    Yes, as per your suggestion, it's working fine...thanks a lot...
    here is the code...
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall(" exec backupdb ?,? ");
                   cstmt.setString(1,"SBIREMITLIVE");
                   cstmt.setString(2, "c:\\testing.bak");
                   cstmt.execute();
    Regards,
    V.Prasanna

  • Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7

    Hi All
    I Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7.
    SQL developer behaves weirdly sometimes. It frequently drops connection, doesn;t show compile button when i open a procedure and certain other things.... I found ver 3.0 quiet stable.
    I think it may be because of my incorrect java version (1.6.0). Please tell me how can I get this Java version 1.6.0_4. I checked oracle.com, version 35 is available there....
    Can you please help me by providing this ?
    Thanks

    >
    I Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7.
    I think it may be because of my incorrect java version (1.6.0). Please tell me how can I get this Java version 1.6.0_4.
    Can you please help me by providing this ?
    >
    No - we can't provide it. You have to download it yourself. If you have trouble with the download you should report the problem to Oracle.
    >
    I checked oracle.com, version 35 is available there....
    >
    If you checked at the Java SE Downloads page
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    Then you should have seen the 'Previous Releases' link jus above the download Icons near the top of the page.
    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jre-6u1-oth-JPR
    All of the available prior versions are available at that link.
    But I strongly suggest you heed the advice given to use the latest 1.6 version of Java available unless you have a very good reason not to.

  • Re: GeoRaptor 3.2.1 Released for SQL Developer 3.x

    Hey,
    Referencing this that was posted in early September 2012:
    GeoRaptor 3.2.1 Released for SQL Developer 3.x
    I am supporting GRE's and the like at UC Berkeley and I really want to hook them up with this plug because it will make their life MUCH easier. But I have some pretty basic problems:
    1. A VERY simply table that has an 8307 linestring. The query that GR defaults when the table is added :
    SELECT rowid,"ID","NETWORK_ID","BEG_NODE_ID","END_NODE_ID","LENGTH","SPEED_LIMIT","DETAIL_LEVEL",
    "IN_SYNCH","CREATED","MODIFIED","CREATED_BY","MODIFIED_BY","MODSTAMP","NET_GEN_ID",t.GEOM as GEOM
      FROM VIA.LINKS_HOLD t
    WHERE SDO_FILTER(t.GEOM,?,?) = 'TRUE'This seems to do something but nothing is ever displayed. The table definition is as follows:
    CREATE TABLE LINKS_HOLD  (
    ID NUMBER,
    NETWORK_ID NUMBER,
    BEG_NODE_ID NUMBER,
    END_NODE_ID NUMBER,
    GEOM MDSYS.SDO_GEOMETRY ,
    LENGTH NUMBER(9,3),
    SPEED_LIMIT NUMBER(3,0),
    DETAIL_LEVEL NUMBER(3,0),
    IN_SYNCH NUMBER(1,0),
    CREATED DATE,
    MODIFIED DATE,
    CREATED_BY VARCHAR2(30 BYTE),
    MODIFIED_BY VARCHAR2(30 BYTE),
    MODSTAMP TIMESTAMP (6),
    NET_GEN_ID NUMBER
    )And some sample data. I am only including the geometry
    GEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18477, 34.02929, -118.18156, 34.02932))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18268, 34.02393, -118.18269, 34.02631))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18269, 34.02631, -118.18268, 34.02393))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18257, 34.02731, -118.18387, 34.0273))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18387, 34.0273, -118.18257, 34.02731))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18256, 34.02631, -118.18269, 34.02631))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18269, 34.02631, -118.18256, 34.02631))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18131, 34.02632, -118.18256, 34.02631))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18256, 34.02631, -118.18131, 34.02632))
    SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-118.18257, 34.02731, -118.18256, 34.02631))Since the query I tried to substitute for the system generated one was:
    select geom from links_hold ;When I tried to run that the system responded with and error and pasted the following into the clipboard:
    SELECT rowid, GEOM as GEOM FROM (
    select
    rowid,geom
    from
    via.links_hold
    ? MDSYS.SDO_GEOMETRY(2003,8307,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180.0,-165.78279266572636, 180.0,165.78279266572636))
    ? Please keep in mind that very same query will display all the links where I run in the generic map view (GMV) of SQLD and
    since GMV has little in the way of additional features it is rather frustrating to see your tool not really working, or what
    is more likely is that I have a lack of understanding because I cannot find documentation that will allow me to
    move forward w/o bugging you.
    So Any light you can throw on this would be of great assistance. Thanks much!

    Flying Guy,
    The non-display is a major bug that was discovered after GeoRaptor 3.2 was released. I knew it was there a few days after
    the release - it got past our testers as well. I hoped to have a release out very soon after but a bunch of things conspired to
    stop this from happening. Anyway, no one complained so I figured no one was using it enough to find the bug.
    The bug is fixed which you can test if you download the Early Access release from our SourceForge website.
    There are some other new functions in this EA that you might discover. The main one being the ability to have a feature count
    (those drawn within the map window) displayed on the view / layer tree. See GeoRaptor preferences. Another is the restoration
    of right mouse click menus on the sdo_geometry columns of table/mv/view connection nodes. Also, if a table has more than one
    sdo_geometry column, the first is no longer selected if you right mouse click/map etc on table node. It will display a pick list
    of sdo_geometry columns for you to chose from. (There has also been a major revamp of connection management as I noted
    problems since SQL Developer 3.2.)
    Please download and try it. Consider joining the GeoRaptor lists to help with testing and documenting. If you find bugs in
    the EA please email the right georaptor list, or use the GeoRaptor SourceForge site to register the bug. Or email me
    directly simon at spatialdbadvisor dot come.
    I hope to have a release ready by the end of the week but I have not heard back from the small group of testers
    that we have something that is ready to go.
    Wrt documentation we have added some where users have created some for me with my input. Please volunteer to
    create documentation.
    The simple fact of life is that:
    1. GeoRaptor is downloaded by lots and lots of people (a good thing).
    But:
    <complain>
    2. Very few responses ever occur to postings made about GeoRaptor on this forum or on our sourceforge forum: disheartening;
    3. Very few bug reports or enhancement requests ever get created at sourceforge: disheartening;
    4. I have become the only developer which is a bad thing. I known of some Java developers who have used GeoRaptor but
    most/all expect someone else to fix bugs or develop the tool. I have spend thousands of hours on a tool that I find useful because SQL Developer
    is my main Oracle access tool. But I have never, ever heard from more than 10 people over the past 3 years that they too find it useful: disheartening;
    5. Attempts to contact downloaders routinely fall on deaf ears or fail: disheartening;
    6. Requests for documenters, developers, testers are ignored or fail because we can't contact anyone who downloads GeoRaptor: disheartening.
    </complain>
    Like a lot of open source projects I do not get paid for anything I do. But what annoys me is that no one - other than a tiny brace of people - will help with anything
    even when we ask.
    I have also decided that major new functionality added to GeoRaptor eg GeoRasters; WMS; WFS; etc will only be done when sufficient funding, via a fundraising website
    makes a set amount. This is something that the PostGIS have started doing and I think it only fair considering how many months each year I spend on development "in
    the dark" for no income.
    regards
    Simon

  • Announcement: OrindaBuild 5.0 Extension for SQL Developer 1.5.1

    Folks,
    OrindaBuild is now available as an extension for SQL Developer 1.5.1.
    OrindaBuild creates Java source code to run your existing PL/SQL. This is a non-trivial task and for large projects can consume hundreds on man hours as well as delay development.
    OrindaBuild does roughly the same thing that JPublisher does, but writes human readable code, doesn't need SQLJ and doesn't require that you use oracle TYPE objects as parameters for records and arrays.
    Another way of thinking of OrindaBuild is "We reach that parts of your application that Hibernate can't".
    OrindaBuild is available as extensions for JDeveloper and SQL Developer 1.1. After an unreasonably long gestation OrindaBuild is now available as an extension for SQL Developer 1.5.1 The delay has been caused by us rewriting both the JDeveloper and SQL Developer extensions so that code base has now been unforked. We've also standardized the functionality with that of our recently upgraded Eclipse extension.
    To install the demo select 'Help/Check for updates' and then use the 'Add' button to create an update center for Orinda Software using this URL:
    http://www.orindasoft.com/public/sqldev15Center.xml
    Functionality:
    The demo version is fully playable, with the only limitation being that it expires after 1 month. You can install the demo multiple times.
    In addition to generating Java to call PL/SQL it also allows you to create code to run any SQL statement and access database tables.
    OrindaBuild generates code for PL/SQL procedures that take %ROWTYPE and Package Records as parameters. Generated code uses a library. If you buy OrindaBuild you get the source code for the library and end up with a 100% source code solution - i.e. there are no mysterious runtime binary dependencies.
    Limitations:
    The extension does not work with versions of SQLDeveloper prior to 1.5.1 (build 5440). We expect you to buy a licence if you deploy generated code in a production environment.
    For more information see
    http://www.orindasoft.com/public/sdefeatures.php4
    David Rolfe

    It is possible that the patch has replaced you shortcut with one pointing to the version within the 11g home. Try running sqldeveloper directly from the executable in the 151 directory.

  • How to invoke a stored procedure on MS Sql Server with Java?

    I started writing Enterprise Java Beans and created an ODBC dsn with MS Sql Server 2000 which I can access using jdbc:odbc:mySqlDSN. This all works fine using Java Sql Statements. What kind of Java/Java Sql statement can I use to invoke a stored procedure on the Sql Server? Is it possible to use ADO/ADO command objects with Java? Is it possible to import/implement Mdac2.6 ActiveX data objects libary in Java?
    Thanks

    Thanks all for your replies. I will search the api for callable statements. I am curious though, the reply that suggests using a prepared statement - can I put the name of a stored procedure in a prepared statment or is this just suggestions an action query like Insert Into, Update, Delete? Like with ADO you can say
    cmdObject.CommandType = adStoredProcedure
    cmdObject.CommandText = "NameOfStoredProc"
    cmdObject.ExecuteNonQuery()
    Once I am calling/importing/implementing the proper libraries/interfaces in Java, can a prepared statement reference a stored procedure as above?
    Thanks

  • Getting a DataReader by stored procedure vs. SQL statment (Performance)

    Hallo DB-Experts,
    I have encountered a performance problem regarding getting a DataReader by stored procedure versus a SQL statment
    and I want to know if this is an known issue and how to tune it.
    Getting a DataReader through a SQL statment is faster than with a stored procedure,
    if the number of data rows are less than about 8000 datarows, although we are using an index.
    The stored procedure ist only faster about 8000 datarows.
    For the first 20 rows the different is between 50 abd 20 percent and between and 20 and 2000 rows it fall down to 10 percent.
    Over 8000 rows the stored procedure is faster!
    The time series table looks like:
    CREATE TABLE TimeSeries
    OBJECT_ID NUMBER(8) NOT NULL,
    UNIVERSAL_TIME NUMBER(10) NOT NULL,
    LOCAL_TIME DATE NOT NULL,
    MOD_TIME NUMBER(10),
    USERID NUMBER(10),
    VALUE NUMBER NOT NULL,
    FLAG NUMBER(2) DEFAULT 0 NOT NULL
    The foreinkey is object_id and another index is for universal_time and mod_time
    The stored procedure looks like:
    PROCEDURE SELECTDATA_UT_MOD (pObjectID IN NUMBER,
    pType IN VARCHAR2,
    pTable IN VARCHAR2,
    pFrom IN NUMBER,
    pTo IN NUMBER,
    IO_CURSOR OUT T_CURSOR)
    IS
    SQLString VARCHAR2(1024);
    BEGIN
    IF pOBJECTID <> 0 THEN
    CASE
    WHEN UPPER(pTYPE)='A' THEN
    SQLString := 'SELECT UNIVERSAL_TIME, VALUE, FLAG, MOD_TIME FROM ' || pTABLE || ' WHERE OBJECT_ID = :t1 AND UNIVERSAL_TIME >= :t2 and UNIVERSAL_TIME < :t3 Order By UNIVERSAL_TIME, MOD_TIME DESC';
    OPEN IO_CURSOR FOR
    SQLString USING pOBJECTID,pFROM,pTO;
    END IF;
    END;
    The SQL statment for the data reader looks like:
    SELECT d.universal_time, d.VALUE, d.flag, 0 AS mod_time
    FROM daten d
    WHERE object_id = 18465
    AND d.universal_time >= 3600
    AND d.universal_time < 28803600
    ORDER BY d.universal_time, mod_time DESC
    Do you have any idea or tip why the sql statment for the first 8000 rows is faster than the stored procedure?
    Many thanks in advance and
    Best regards
    George
    Edited by: hakomdba on 09.01.2009 06:39

    Hallo DB-Experts,
    I have encountered a performance problem regarding getting a DataReader by stored procedure versus a SQL statment
    and I want to know if this is an known issue and how to tune it.
    Getting a DataReader through a SQL statment is faster than with a stored procedure,
    if the number of data rows are less than about 8000 datarows, although we are using an index.
    The stored procedure ist only faster about 8000 datarows.
    For the first 20 rows the different is between 50 abd 20 percent and between and 20 and 2000 rows it fall down to 10 percent.
    Over 8000 rows the stored procedure is faster!
    The time series table looks like:
    CREATE TABLE TimeSeries
    OBJECT_ID NUMBER(8) NOT NULL,
    UNIVERSAL_TIME NUMBER(10) NOT NULL,
    LOCAL_TIME DATE NOT NULL,
    MOD_TIME NUMBER(10),
    USERID NUMBER(10),
    VALUE NUMBER NOT NULL,
    FLAG NUMBER(2) DEFAULT 0 NOT NULL
    The foreinkey is object_id and another index is for universal_time and mod_time
    The stored procedure looks like:
    PROCEDURE SELECTDATA_UT_MOD (pObjectID IN NUMBER,
    pType IN VARCHAR2,
    pTable IN VARCHAR2,
    pFrom IN NUMBER,
    pTo IN NUMBER,
    IO_CURSOR OUT T_CURSOR)
    IS
    SQLString VARCHAR2(1024);
    BEGIN
    IF pOBJECTID <> 0 THEN
    CASE
    WHEN UPPER(pTYPE)='A' THEN
    SQLString := 'SELECT UNIVERSAL_TIME, VALUE, FLAG, MOD_TIME FROM ' || pTABLE || ' WHERE OBJECT_ID = :t1 AND UNIVERSAL_TIME >= :t2 and UNIVERSAL_TIME < :t3 Order By UNIVERSAL_TIME, MOD_TIME DESC';
    OPEN IO_CURSOR FOR
    SQLString USING pOBJECTID,pFROM,pTO;
    END IF;
    END;
    The SQL statment for the data reader looks like:
    SELECT d.universal_time, d.VALUE, d.flag, 0 AS mod_time
    FROM daten d
    WHERE object_id = 18465
    AND d.universal_time >= 3600
    AND d.universal_time < 28803600
    ORDER BY d.universal_time, mod_time DESC
    Do you have any idea or tip why the sql statment for the first 8000 rows is faster than the stored procedure?
    Many thanks in advance and
    Best regards
    George
    Edited by: hakomdba on 09.01.2009 06:39

Maybe you are looking for

  • HELP! iTunes Crashes On Launch Every Time

    Okay, so last night I updated to 10.6.3. A couple hours later, I closed down iTunes and opened it back up to discover that it wouldn't open anymore. I tried removing the library file, thinking it might have become corrupted somehow, and iTunes would

  • Default audio device doesn't change until restart

    I have speakers and usb headphones, I had no problem switching which device is used, but now when I change the default device a restart is needed to actually change where the sound comes from. This is extremely annoying. Using Windows 8.1, don't thin

  • I'm very pleased

    Forums like this tend to be filled mostly with issues and complaints, so I thought I'd try inject a positive vibe here.... Though I did have a couple hurdles to overcome with my new iPod Touch, it is working very well for me, and I have very few comp

  • HT1498 How do I know when the rented movie is downloaded

    I will be flying across seas and I want to download several rentals but how do I know when they are download completely to my iPad so once I'm up in the air I can watch them without being connect to the internet.

  • MaskFormatter stops allowing input

    i need a MaskFormatter which allows the user ot input time in the format hh:mm. features: user should be able to conveniently type four digites without having to press the ":" key the value of the JFormattedTextfield should always be of type date, ne