Two SQL Developer Tricks: DBMS_XPLAN and Code Templates

thatjeffsmith SQL Developer 0 Comments

We recently (18.2) added a new way to generate execution plans in SQL Developer – we generate a call to DBMS_XPLAN for the SQL ID at your cursor position. DBMS_XPLAN is a package, and one of it’s procedures is ‘DISPLAY_CURSOR’: This table function displays the explain plan of any cursor loaded in the cursor cache. In addition to the explain …

Adding Common Columns to Tables via Templates and Transformation Scripts

thatjeffsmith SQL Developer 10 Comments

In Oracle SQL Developer Data Modeler, you can create a table in your relational design that stores columns that you want to be added to all of your other tables. Call it, ‘table_template.’ Now call the transformation script. Tools > Design Rules & Transformations > Transformations. Before After These are cool, but they don’t belong in my Logical model! So …

Oracle SQL Developer: Code on Demand

thatjeffsmith SQL Developer 10 Comments

I’ve recently spent a few hours debugging some user defined reports. A post on how to add trace/disconnect context menus to a session report required that I figure out what session my worksheet was running under. The code was easy… SELECT SYS_CONTEXT (’USERENV’, ‘SID’) FROM DUAL; …but I’m lazy. So this: The Setup Open your preferences and go to the …