In Oracle Apex, is there a set of hot keys to activate the Run Command? - oracle

In Oracle Apex SQL Workshop, is there a set of hot keys to activate the Run Command? I've researched this online and have not found an answer. It seems laborious to have to type out my query and then have to use my mouse to click on Run, when hot keys can help keep my hands on the keyboard. I'm using a Mac and typically through Firefox. Thank you.

In SQL Workshop? Ctrl-Enter
If you have multiple queries, highlight the relevant query first.

Related

Generate ER diagram from SQL Script

I have some SQL scripts written in a .sql file
I need to generate ER diagram using those scripts, so that I can verify the relationships and then get them executed in the DB.
Can anyone help me on how I can achieve this?
I would prefer doing this in SQLDeveloper
EDIT: As ismetguzelgun suggested me in his answer to execute the scripts first and then export the diagram through data modeler. I do not have the permission to execute DML commands in the Database and I do not have any other database as well where I can execute this. So that option is not going to work out for me.
Just use the import feature.
File - Data Modeler - Import - DDL Script
Point to one or more .sql files.
A dialogue will appear showing what's about to be added to your design. Make sure everything's checked and hit the Merge button.
Your new/existing design is ready!
If you don't see anything in the diagram area, zoom out or use the Navigator window to make sure you're in an area with your tables. Or use the tree on the left, pick a table, and right click, 'Go to Diagram' - it will take you directly to that object in the diagram.

Restore Previous Command in Oracle

Is there is an easy way to access the previous commands entered in Oracle? For example, when using a Linux terminal, one can press the "up arrow" key and traverse through the command history. Does Oracle offer a similar convenient feature?
Thanks in advance.
not built in, no.
In DOS SQL*PLUS this happens for you (i.e. up arrow goes to the prior command).
in linux sql*plus it does not. Having said that, there is a nice utility on linux called rlwrap that can do it for us. first install that utility and then set an alias (stick this in your .profile so that you don't have to run it every time you open a shell):
oracle#dazza-linux64:~$ alias sqlplus='rlwrap sqlplus'
now whenever you start sql*plus:
oracle#dazza-linux64:~$ sqlplus / as sysdba
you'll get the up/down arrow functionality you wanted.
In the Windows client there are two SQL*Plus command line utilities: one that's DOS-looking (sqlplus.exe) and one that's Windows-looking (sqlplusw.exe). The DOS-type version has the "uparrow" feature, plus you can press F7 for a list of previous commands, but note that it doesn't play well with multi-line commands.
The Windows-type version doesn't support uparrow or F7, but you can highlight a prior query, and copy/paste. You can also do the *nix trick of right-clicking while still holding down the left button to do the immediate copy/paste. It behaves well with multi-line commands but I have to admit I'd really love to have the uparrow here too :)
It's not a function of "Oracle" per se, it's a function of the client and/or OS. If I run SQL*Plus on Windows, for example, the up/down arrow functions as you describe.

Exporting data from Oracle query to excel using query

I am having a select query, the result of which i want to be exported in a excel file using Oracle query and not any in-built operations.
I am using TOAD for Oracle. I am not sure if this is possible or not.
Any help would be of great use.
Thanks in Advance!
In Toad, it's pretty straightforward:
Run your query
click the "Export dataset" button
change export format to "Excel File"
enter a filename
Instead of pushing it into Excel, why not "pull" it into Excel? See get external data. An added bonus is that you can add this to your windows task scheduler that will update it for you.
http://office.microsoft.com/en-us/excel-help/connect-to-import-external-data-HP010089898.aspx

how to fix opensuse GUI on VNC display?

our server has opensuse 12.1, whenever I try to access through VNC viewer the GUI of opensuse is appearing raw. I guess its the problem with X11 or X-windows. how do I fix this to get a better GUI for all the views?
And also when we create a new user we need to modify the xstartup file to append startkde & to have a GUI. Is there a way that I can modify it at one place and xstartup is modified for all the new users created?
Thank you
Can you explain more clearly what "raw GUI" means? is it the resolution, no kde effects?
As to second part of your question - basically u don't need to start X session to create / set user accounts see the link link - get familiar with user* commands - it really speeds up the work. Cheers!

PL/SQL Developer: How to find variable references?

In a Oracle package, How can I find out all the references for a variable? Like you would do it in Eclipse or Visual Studio.
Is this feature supported in any Oracle IDEs like TOAD, Sql Developer or PL/SQL Developer? I am using PL/Sql developer?
In PL/SQL Developer I'd use the "Find Database Objects" tool (Tools menu, "Find Database Objects", or hit the binoculars button on the browser). Enter the text you want to find (e.g. the name of your variable) in the "Text to find" box, enter the schema name of the object you're interested in in the Owner box, and enter the package name you're interested in in the "Name" box. Select the objects types you want to search (Functions, Procedures, etc) and then click the Search button.
If you're interested in fully-qualified uses of a variable you can just enter something like SCHEMA_NAME.PACKAGE_NAME.VAR_NAME - or try PACKAGE_NAME.VAR_NAME for partially-qualified uses.
Share and enjoy.
Two ways, you can find
1) hit the binoculars button
2) Using Query(Works for Oracle)
select * from ALL_SOURCE where text like '%some string%';
There is PL/Scope, but to be honest it's a bit of a beast and I've never tried it myself.
Of course you can search within the current package and see all occurrences highlighted, but that isn't ideal as a text search doesn't take scope into account and there could be more than one variable with the same name.
PL/SQL Developer's Refactor option can parse variable scope, so I don't see why it couldn't highlight all references in the current package at least. maybe you could propose it on the Allround Automations PL/SQL Developer forum and get one of marco's famous 'I have added this to the list of enhancement requests' answers. (Be sure to remind him about it with a follow-up post every 5 years or so.)

Resources