Generate ER diagram from SQL Script - oracle

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.

Related

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

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.

Open several SQL Scripts on Toad starup

i am using Toad for Oracle V11.
And i'm already using View>Toad Options> File to execute on new connections to set some parameters when i start a new connection.
Here is also the option File to load on startup, but here i can only select a single file to open on startup. But I always need three different scripts when I open Toad and i don't want to merge them to one file.
Is it somehow possible to always open those three different scripts when i open toad?
You can't do that, as far as I can tell.
See whether creating a project (using the Project Manager; it's the 6th icon in my TOAD 14 toolbar) helps, as you can add folders or folder items (that would be your scripts) to it.

SQLite .DB file contents shown in Visual Studio Form DataGridView component

So I have a database file (name.db) on my desktop, as well as a project folder containing my program. I want to create a form to test my program, however I cant seem to get my contents from my database into the form, so I can't even test my code. I try to "connect a database" from the tools menu, but none of the options will allow me to connect my ".db" file.
Below are the images of what I'm trying to do, so you can get an idea.
The Form
The menu of different database options, none of which work
The code for the form
Files on the Desktop
The Problem is, that you never make any requests/queries to your database. Since your database could and most probably does contain mutliple tables you should run a corresponding sql query and then display the result. The following link should give you a good starting point how to integrate sqlite with c++.

Is there a way to find ddl scripts for creating users in Oracle Sql Developer

In Toad, it's easy to look for a ddl script that creates a user with all its grants and roles:
In Oracle SQL Developer, I find a similar option but it's not complete:
Is there a way to have same Toad's information in Oracle SQL Developer?
It's a bit more convoluted, and might make more sense with pictures but I can't create those right now... but if you go to the 'View' menu and choose 'DBA' you get a second panel on the left (titled 'DBA', unsurprisingly).
Click the green + button and pick your connection from the drop-down list in the dialog box; it will then appear under 'Connections' in that panel. Expand that connection, then 'Security', then 'Users'. You'll see all the database users listed.
Right-click on a user and choose 'Create like...' from the contextual menu, which will give a new dialog that's very similar to the one you already found.
Enter a user name and password to make the next step make more sense, then go go the 'SQL' tab, and you'll see something similar to what Toad produced.
You can also use the DBMS_METADATA package to extract the DDL manually; that has been covered here and on DBA.SE.

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

Resources