How to DDL results from SQL Developer Database Diff tool - oracle

I have run my Database Diff tool to compare two Oracle schemas in SQL Developer. I have my results, and want to save these. I know how to generate a script for the recommended changes, but how do I save the DDL output showing the differences between each of the objects? Many thanks.

how do I save the DDL output showing the differences between each of the objects?
We don't have a report for that. You can only save the DDL change scripts today.

Related

Oracle Database 19c Sample Schemas :: import sample from Oracle SQL Developer GUI instead of command line

I have a Microsoft background and I'm learning Oracle products.
I was able to import Oracle Database 19c Sample Schemas on a Docker Oracle image from command line following this guide.
I now would like to know if there is a way to import the same sample through a GUI using Oracle SQL Developer.
With SSMS is quite simple to import/export databases, row data, CSV, etc... but I don't see the same tool for Oracle SQL Developer.
EDIT:
#thatjeffsmith suggested to right click on tables > Data Import Wizard, but when I select "db-sample-schemas-master" I only find the samples with .sql files in it and .sql files cannot be imported with this tool
It depends.
The .SQL files can be ran through the SQL worksheet via F5 no problem.
The sqlldr scenarios, you could rename the .dat files to .dsv files.
Right click on your table, like Sales History SH entries, choose Import Data, and walk the wizard.
But, it would be much easier to just follow the instructions as is, especially if you are new to Oracle.

Compare two schemas using toad and Redgate?

How do I compare two Oracle schemas (DEV vs Pre-prod) using Redgate, Toad and create a definition file (.def/.onp)?
RedGate has "Schema Compare for Oracle" tool. Take a look at short video - you will get an idea.
As a source and target you can use live connection to database, snapshot or directory with scripts generated by "Source Control forr Oracle" (which is quite useful too).
Snapshots are very handy if you don't have direct connection to Prod databases, e.g. You can just ask Prod team to generate snapshot and then use it to compare with non-Prod databases.
As a result of comparison you'll get the list of different objects, you can filter them by types and then generate deployment script for target database (right side). Then you can save it or execute immediately.
I'm using command line tools to automate this.
So, just take some time and play with the tools during evaluation period.
You might see some unsupported objects to compare, etc. but the world is not ideal ;-)
I cannot comment about TOAD - don't use it.
Toad menu database
Database -> Compare -> Schemas
You must be connected to both instances.

PL/SQL (Toad) auto format all database objects

For development within our Oracle 11g database we use Toad for Oracle and Git (in TeamCoding).
One of our development rules is to use the Toad Autoformatter to have a persistent "code appearance". Since we want to change this rule set (towards less line usage), every file would be entirely in the changelog when switching from old to new formatting, making it impossible to see the actual change diff.
Also db objects would only switch to new formatting when being changed.
Is there a way to apply the Toad Formatting rules to all objects (in the database via Toad or maybe in the Git directory)? Then we could make a minor Version which only switches all objects from old to new formatting. :)
Thanks in advance!
ps: manually doing this would be possible ofc, but could take some time since we have a lot of objects in the database :D
Facing the same problem, I could not find a complete massive way; the best thing I can do is:
go to Schema Browser
select all the objects
do "Create script"; in "Script options" panel you'll find the format option, so you can download formatted code.
compile all the objects to save formatted code on DB
In this way you neeed to navigate a bit through the browser, but I hope this can help anyway.
(tested on Toad 12.1.0.22)

VS 2010 database projects and tables created by "select into"

I am trying to move an existing database into a VS 2010 database project. This database has been around for a very long time and has a lot of stored procedures. Many of those stored procedures create working tables using the SELECT ... INTO syntax. This was done at the time to reduce the amount of data going through the transaction log. When I import the database into the project I deselected the work tables. Now when I look out the warning I see all of my stored procedures are saying that they can't find the work tables. Does anyone have a way of dealing with this? I am slowing converting as much as I can to SSIS but there is some logic that will have to remind in the stored procedures.
Thanks.
In this case you either have to ignore the warnings or import those working tables that are absolutely required for the stored procedures to work. I don't think the project will build properly if the tables are not present, but are expected.
If those tables are already present in the database, you should be fine as they won't be re-created. You can slowly deprecate them as you clean up your stored procedures.

Crystal Reports - Browse Data Shows Nothing

I just created a new table and filled it with data. When I run a simple select query, I can see all the data.
But when I try to build a report in Crystal with this table, I get no data. It doesn't matter if I have other tables included or not, so it isn't a linking issue.
If I right click a field and choose "browse data", I get nothing, which tells me that somehow Crystal can't read the data at all.
I created the table with the same user name/password that I used when connecting to the database from Crystal Reports.
Any ideas?
(If it matters, I'm using Oracle 10g Release 1 and Crystal Reports XI Release 2. We use a direct Oracle connection, not an ODBC.)
I found the problem. I hadn't yet committed the data on the database.
This taught me something about Oracle. I rarely use the "commit" command - but when I have created tables and filled them with data it's been via a "select" statement. Those tables have always worked. This time I did it via the insert all command. I needed to commit for that to work!

Resources