Tuesday, August 26, 2025

Orcle SQL Developer Macro Record Bug Fix

 

Fix found at: https://forums.oracle.com/ords/apexds/post/20-2-record-macro-broken-3678

The actual problem is that the configuration goes to the wrong section of a settings.xml file.
Here is what to do to make it work again (extract from my SR):
Therefore what I did:
1. Closed freshly installed SQL Developer
2. Opened settings file:
notepad "%APPDATA%\SQL Developer\system19.4.0.354.1759\o.ide.13.0.0.1.42.190403.1502\settings.xml"
3. found "toggle-macro-recording" Item under the "oracle.ide.keyboard.KeyStrokeOptions" key:

<Item class="oracle.javatools.util.Pair">

<first class="java.lang.String">toggle-macro-recording</first>

<second class="oracle.ide.keyboard.KeyStrokes">

<data>

<Item class="javax.swing.KeyStroke">F11</Item>

</data>

</second>

</Item>

4. cut it to the clipboard so it doesn't exist anymore under the "oracle.ide.keyboard.KeyStrokeOptions" key
5. found the "oracle/ide/ceditor/keymap/accelerators.xml" key below.
6. paste the item after the "<data>" tag of the "oracle/ide/ceditor/keymap/accelerators.xml" key so that the key now looks like

<Key>oracle/ide/ceditor/keymap/accelerators.xml</Key>

<Value class="oracle.ide.keyboard.KeyStrokeMap">

<data>

<Item class="oracle.javatools.util.Pair">

<first class="java.lang.String">toggle-macro-recording</first>

<second class="oracle.ide.keyboard.KeyStrokes">

<data>

<Item class="javax.swing.KeyStroke">F11</Item>

</data>

</second>

</Item>

7. Saved and closed the notepad.
8. Opened freshly installed SQL Developer and now F11 works as intended.

I don't know why Oracle can't fix this, probably they need to hire a programmer.

 

Thursday, April 30, 2020

Just testing to see if this gets posted on OraNA.

Wednesday, February 12, 2020

Please remove my blog from OraNA

This is a test blog post to see if it is getting aggregated to the OraNA news aggregator.  If it does, please post how to get a blog removed from OraNA.

Still wondering how to get my blog off of the OraNA news aggregator.  Anyone know?

Thursday, February 04, 2016

Recover Modified Oracle APEX Page

I was working on a page in an Oracle APEX application and wanted to rollback all the changes I made in the last 30 minutes on one particular page without losing all the changes I made prior to then.  I had no export of the application, so I used a very cool feature of Oracle and APEX as documented in Peter Raganitsch's blog way back in 2011.

I basically did a page export as of 30 minutes ago.  Since APEX runs in the Oracle database and flashback query is enabled in the database, when the APEX Builder was querying the APEX application tables in the database for the page it was exporting, the Builder did a flashback query as of 30 minutes ago.  Once the page export was completed, I did an import of the page and the page was rolled back to 30 minutes ago.  Very nice.

Monday, December 22, 2014

Rows to String

Just a note about a powerful way to convert a column of values in a query into a coma separated list in a text string:

select 'LISTAGG' fx,
       length(listagg(table_name, ',')
             within group (order by table_name) ),
       listagg(table_name, ',') within group (order by table_name)
  from user_tables;

Wednesday, August 14, 2013

Old Oracle APEX "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" Error

Oracle Application Express 3.1.0.00.32

I added some display items to a large page and all of sudden I started getting "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" when I attempted to save changes.

Too make a long debug process short, I discovered that this was an error generated internally by APEX code not in any application code.  Because I had too many items on the page I assume that APEX is assembling an INSERT statement in a local PL/SQL variable somewhere internal to APEX and the INSERT text string is too large in length and cannot be assigned to the local variable.  If I cut the number of items down to 118 items the pages runs fine.

I also noticed a very small message at the bottom of the items region of the page definition that says, "Item count exceeds maximum of 100."  It looks informational and does not stop you in any way.  It would be nice if that were an actual alert that popped up and said don't do this or else you will get a runtime ORA-06502 error upon submitting the page.

I am posting this for my recollection and all others who are working in an old version of APEX like Application Express 3.1.0.00.32 and encounter this error.  I have searched multiple times on the Internet and could not find any references to this.

Friday, March 22, 2013

Oracle SQL Developer: Switching between tabs.

There is a nice feature of Oracle SQL Developer that allows once to assign numbers to tabs and then via a keystrokes one can switch between the tabs like Windows ALT-Tab does for applications in the Windows OS.

Assign a number like 1 to a tab by pressing SHIFT-ALT-1 while that is the active tab. You will see a miniature "1" at the beginning of the tab. Then whenever you want to go to that tab press ALT-1.  Nice!!

Wednesday, December 05, 2012

Using External Tables in a Reltional Model in Oracle SQL Developer Data Modeler

As of Oracle SQL Developer Data Modeler (SDDM) version 3.1.00.700 you cannot use external tables in Relational Models.  When you import external tables from the Oracle data dictionary into SDDM you get the external tables in the Physical Model, but you cannot use them in a Relational Model.

I have figured out a work around until this is supported in SDDM.  In SDDM create a view which SELECTs each column from the external table.  You can then use the view in Relational Models.  You can name the view in SDDM the same as the external table or differently.  In my scenario I created the view with the same name as the external table and will not create the view in the database.  I am just creating the view in SDDM to represent the external table in relation models.

Thursday, November 01, 2012

Microsoft really does not like Oracle

Well I decided to install the "Oracle Developer Day VM" on my work Microsoft Windows XP Pro laptop to play around with Oracle 11g and APEX and got the following message.  Since this was my work laptop I of course aborted the installation.  Microsoft wins this one.




Friday, October 05, 2012

If Oracle's Cost Based Optimizer were a GPS, where would it take you?

Similar to the "If the CBO were a car, what would be it's bumper sticker?"

Monday, September 17, 2012

What would you add to Oracle? response

Lewis Cummingham posed the question, "What would you add to Oracle?" in his blog.  He purposed the ability to support multiple languages within the database.  Thinking completely out of the box, I would enlarge that concept to include support of other database vendors' environments within an Oracle database.  Instead of just allowing users to hop from Oracle over to another database vendor's database via a "gateway", why not just put that other vendor's database inside of an Oracle database.  Oracle could experiment with MySql first because they own it.

I know that this is "Pie in the sky" type of stuff, but you never know.

Thursday, September 13, 2012

Oracle SQL Developer Output Hints

I was just reviewing through presentations and papers from the ODTUG KScope 2012 in June and noticed a very nice little feature of Oracle SQL Developer that formats SQL output.  There are hints that SQL Developer recognizes.  The hints cannot contain any spaces.  Also, the hints are case sensitive.  The formatting is done in the "Script Output" window, so you have to use "Run Script" (F5) to execute the SELECT statement.

select /*csv*/ *
  from dictionary
 where table_name like 'USER_TAB%'

would produce the following after "Run Script" (F5):

"TABLE_NAME","COMMENTS"
"USER_TABLES","Description of the user's own relational tables"
"USER_TAB_COLUMNS","Columns of user's tables, views and clusters"
"USER_TAB_COL_STATISTICS","Columns of user's tables, views and clusters"
"USER_TAB_HISTOGRAMS","Histograms on columns of user's tables"
"USER_TAB_COMMENTS","Comments on the tables and views owned by the user"
"USER_TAB_PRIVS","Grants on objects for which the user is the owner, grantor or grantee"
"USER_TAB_PRIVS_MADE","All grants on objects owned by the user"
"USER_TAB_PRIVS_RECD","Grants on objects for which the user is the grantee"
"USER_TAB_MODIFICATIONS","Information regarding modifications to tables"
"USER_TAB_PARTITIONS",""
"USER_TAB_SUBPARTITIONS",""
"USER_TABLESPACES","Description of accessible tablespaces"
"USER_TAB_STATS_HISTORY","History of table statistics modifications"
"USER_TAB_STATISTICS","Optimizer statistics of the user's own tables"
"USER_TAB_COLS","Columns of user's tables, views and clusters"


Hints include:

  • /*csv*/
  • /*xml*/
  • /*html*/ 
  • /*delimited*/
  • /*insert*/
  • /*loader*/ 
  • /*fixed*/ 
  • /*text*/

Wednesday, September 28, 2011

Oracle Openworld 2011 Schedule Set

Yes!! I finally get to go to an Oracle Openworld. I have been to many IOUG users weeks before and after the IOUG conference split from Oracle in 1995 along with a couple ODTUG conferences, but not to an Oracle Openworld conferences out in San Francisco.

I got my schedule all set. Here is the process I went through to get it my schedule loaded on my phone via my Google calendar. (I know there is an Oracle Openworld application, but I have an old Windows Mobile phone and the Android port for my phone eats my battery and I have no cellular data service...)
  1. In the Openworld schedule content catalog I went through and populated my interest list.
  2. I copied (cut and paste) the 69 events to my PC in Excel (date, time, location and event title).
  3. In the Openworld schedule builder I selected my first choices for each time slot. I have 36 first choices. I prefixed my primary event names with "1)".
  4. Next I selected 33 secondary choices left on my interest list for each time slot. I prefixed my secondary event names with "2)".
  5. I saved all the events to a CVS file.
  6. I imported the CVS file into my Google calendar.
  7. I synced my old Windows Mobile phone with my Google calendar.
  8. Now I have to fit in time for the exhibit hall..
It was a long painful process, but I now have all the events I want go to in my phone.

Here are my preferred events for each time slot. Unfortunately it shows the session ID and not the session title.


Wednesday, August 17, 2011

Oracle Forms Builder will not start

Well I ran into an error that I found posted out on the Internet with no solution listed. I just wanted to post my solution in case someone else is running into this.

Problem: "All of sudden" today when I started Oracle Forms Builder 9i (yes we are using 1996 technology) I got Microsoft Visual C++ Runtime Library error Assertion failed! FRM-10039:



Cause: A new Java Virtual Machine (JVM.DLL) was pushed out to our PCs. Users were having problems with it. While working out the user's JVM problems, I made a copy of JVM.DLL in the directory where I start Oracle Forms Builder. When Oracle Forms Builder was starting it was using the local copy of JVM.DLL and not the copy in the directory where I installed Oracle Forms.

Fix: I deleted the copy of the JVM.DLL that was in my local directory. Now Oracle Forms Builder is using the JVM.DLL that was provided by the Forms installation.

Summary: If you get the Assertion Error when starting Oracle Forms Builder, check to see what JVM.DLL file is being used by Oracle Forms.


Monday, February 14, 2011

How Oracle got to where it is today

Here is a great presentation about the history of Oracle got to where it is today.

Friday, February 04, 2011

Oracle Forms - 2011 Conference Missing In Action (MIA)

I was doing some 2011 training planning and was looking at some Oracle-related conferences for this year. I noticed there are no Oracle Forms sessions at the IOUG Collaborate 11 and one "migrating off of Oracle Forms" session at ODTUG KSCOPE11. Not a good indication for the future of Oracle Forms.

If you know of any please post them as comments to the blog entry.

Wednesday, February 02, 2011

Apex 4.0 Upgrade, Not Possible

Well I started looking at my 2011 projects and was getting excited about upgrading of our Oracle Apex version 3.1 to version 4.0 until I found out that Apex version 4.0 requires 10.2.0.3 or higher. Unfortunately the main Apex repository we have is Oracle 9i!! Barring moving the Apex repository (applications) to a different 10g database and setting up database links to "bridge" back to the data in the 9i database (ugly and messy), I am stuck with Apex 3.1 until the 9i database is upgraded to 10g. Unfortunately that is dependent on a lot of non-Apex applications completely out of my control getting modified/upgraded. Oh well.

Tuesday, January 18, 2011

Oracle A.I.M. Retired

This morning I started doing some reading on Oracle Application Implementation Method (A.I.M.) 3.0. I ran across the multitude of documents associated with it. I remember back reading books on Oracle's CASE*Method. Well while surfing for more information about A.I.M. I noticed that Oracle is retiring A.I.M. as of the end of this month (January). Now I need to see if I can dig up information about ORACLE® UNIFIED METHOD (OUM)

Tuesday, April 27, 2010

Oracle's Database History

I have been working with Oracle since version 5 (1986). It is always interesting to try to remember when certain feature was added to the database. I found a link to an Oracle Magazine article which lists Oracle's database history and more:

http://www.oracle.com/technology/oramag/oracle/07-jul/o4730.html

Friday, December 18, 2009

No code changed, but now ORA-01841. Mistery Solved

A report that is coded in PL/SQL that has existed for years "all of sudden" started generating a "ORA-01841: (full) year must be between -4713 and +9999, and not be 0" error. Why and why all of sudden?

I discovered that a data problem has existed for years. When reports run they save results to a shared database table. Later on in the reports, the reports delete some of the data that does not meet a given time period. The table has both YEAR and MONTH columns which are both numeric along with a unique primary key value generated from a sequence. You guessed it, the YEAR column for a different type of report for some reason had a zero in it. A DELETE statement in the report assembles a date value from the YEAR and MONTH values. With a value of zero, this caused the error.

What made it worse is I would then rerun the report and it would run through fine with no errors giving the correct expected values. What was happening behind the scenes was the report with the bad data had finished and deleted all its zero year rows out of the table by the time I reran the report. So the rerun went through fine with no errors.

That explained why the error was occurring, but not why it had never appeared before. The answer to this is our friend the Cost Based Optimizer (CBO). I had computed new statistics on the report table. With the prior statistics the CBO was applying a primary key WHERE clause criteria before assembling the date value from the YEAR and MONTH columns. So the report never hit the "zero year" rows from the other reports running at the same time. When I recomputed statistics on the report table it caused the CBO to change it access path and assemble the date value before applying the primary key restriction causing the Oracle error to appear. The old CBO statistics were masking the fact that there was a data error in the table i.e. a year value of 0.