DB2 Database Export in Oracle SQL Developer gives an empty connection list - db2

I need to backup my DB so I use Tools --> Database Export.
However, when I want to choose my connection I got no connection in drop down list.
Just to mention that I can see my connection list in "Connections" tab and also all connections in "C:\Users{MyUser}\AppData\Roaming\SQL Developer\system3.0.04.34\o.jdeveloper.db.connection.11.1.1.4.37.59.31\connections.xml" file
Same behavior happens also in "Database Copy", "database Diff" and in "Monitor SQL"
Any idea ?
Thanks in advance

The Database Export feature is built for Oracle Databases only. That's why you aren't seeing your DB2 connections in the Export, Copy, or DIFF wizards in ORACLE SQL Developer (keyword, Oracle).
If you want to backup your IBM DB2 database, you need to use the tools that IBM gives you for managing DB2.

Related

Can you use DBeaver without connecting to a database?

I would like to develop a ER diagram using DBeaver (Eclipse plugin) for a database that doesn't yet exist. Also, the database server doesn't exist.
Can DBeaver be used to develop a ER diagram without connecting to an existing database server? I can only find documentation for working with an existing database or connecting to an existing database server.
Nope, sorry.
DBeaver tools are always associated with the current connection.
For example, in the ERD when adding tables, DBeaver often sends requests to the database of foreign keys.
You can use standard sample SQLite database in DBeaver for experiments.

Oracle SQL Developer database diff doesn’t list my connections

I’m trying to perform a Diff on two DB2 schema’s and when I try to select my source and destination connections it doesn’t list my NEW connection. I’m using latest version. I can connect to DB2 manually and query as well, but just can’t sect that connection during database Diff.
Where are the connections saved in sql
Developer?
That feature is reserved for Oracle Database connections.
DB2 connectivity is provided for migrations to Oracle only.
We have limited support for DB2 in the Data Modeler (which is part of SQL Developer), and you can compare models, but the generation of DDL synch scripts is reserved for Oracle data models only.

I am in need of connecting to DB2 AS/400 database from Oracle Apex.

Is there any feasibility from Oracle to have a connection established to DB2 database so that I can query on DB2 database and generate reports from Oracle Apex?
OR
Is it possible to create a View in Oracle from a remote DB2 database?
OR
What options do i have in order to develop reports in Oracle Apex from the data i have in DB2 database?
(I know, this is an old question and you've already found a workaround. Anyway,) the keyword you might be interested in is gateway. This is Oracle 10g Database Gateway for DB2/400 Installation and User's Guide. I don't know which database you use, but - if 10g is not the one, I hope you'll manage to find the right documentation.
Shortly: after installing the gateway between Oracle and DB2, you'd create a database link. Then, in your Oracle schema, create a view that selects data over that database link from DB2 database. Finally, fetch data in Apex from the view.
As i didn't find a way to directly connect to DB2 from Oracle PL/SQL, i used a work-around. As this is a reporting tool, we are ok to have this tool running with the data which is 1 day off, we did the following:
1) Extract the data required from DB2 database to CSV files. We used a DB2 command which can be run at command line to extract the data into a CSV
2) Then we imported the data into Oracle tables using sqlldr

Redshift SQL Workbench doesnot show Object Explorer

I am relatively new to Redshift but have used the SQL Server Management Studio(SSMS) to work with SQL Server.
Now I have a project with Redshift and am using the SQL Workbench to query the Redshift Cluster.
However I dont find an Object Explorer kind of window on the SQL Workbench interface. Is there such a window on the SQL workbench?
Also, how do i select the active Redshift database on the SQL Workbench?
Used to be pretty simple in SSMS(Select the active database from a drowp down option list), but i am lost when it comes to SQL Workbench?
Thanks!
The comment above from #a_horse_with_no_name is correct. The tab you're trying to find is called "Database Explorer" and it can be opened Tools -> Show Database Explorer.
Credit goes to #a_horse_with_no_name for answering first.

Oracle SQL Developer and PostgreSQL

I'm trying to connect to a PostgreSQL 9.1 database using Oracle SQL Developer 3.0.04, but I'm not having any success so far.
First, if I add a third party driver on preferences, when adding a new connection there's no tab for PostgreSQL (it works fine for MySQL though). I'm using a JDBC4 version 9.1 driver, but I tried a JDBC3 of the same version and still get the same thing.
Second, there's nothing like manual configuration tab when adding a new connection. The closest is the Advanced option on Oracle tab, where I can provide a custom URL, but it fails because complains about the selected Driver (of course).
Finally, I got connected importing a connection from an XML file (contents below), but it displays only my schemas and doesn't show my tables inside them.
So, my question is: does Orable SQL Developer support PostgreSQL connections? Is there any other way to have my tables being displayed in the ObjectViewer?
<?xml version = '1.0' encoding = 'UTF-8'?>
<References xmlns="http://xmlns.oracle.com/adf/jndi">
<Reference name="Lumea" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="Lumea" xmlns="">
<Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
<RefAddresses>
<StringRefAddr addrType="user">
<Contents>lumea</Contents>
</StringRefAddr>
<StringRefAddr addrType="subtype">
<Contents>thirdParty</Contents>
</StringRefAddr>
<StringRefAddr addrType="customUrl">
<Contents>jdbc:postgresql://localhost:5432/versates</Contents>
</StringRefAddr>
<StringRefAddr addrType="SavePassword">
<Contents>true</Contents>
</StringRefAddr>
<StringRefAddr addrType="password">
<Contents>myencryptedpass</Contents>
</StringRefAddr>
<StringRefAddr addrType="driver">
<Contents>org.postgresql.Driver</Contents>
</StringRefAddr>
<StringRefAddr addrType="DeployPassword">
<Contents>true</Contents>
</StringRefAddr>
</RefAddresses>
</Reference>
</References>
Oracle SQL Developer 4.0.1.14 surely does support connections to PostgreSQL.
download JDBC driver for Postgres (http://jdbc.postgresql.org/download.html)
in SQL Developer go to Tools → Preferences, Database → Third Party JDBC Drivers and add the jar file (see http://www.oracle.com/technetwork/products/migration/jdbc-migration-1923524.html for step by step example)
now just make a new Database Connection and instead of Oracle, select PostgreSQL tab
Edit:
If you have different user name and database name, one should specify in hostname: hostname/database? (do not forget ?) or hostname:port/database?.
(thanks to #kinkajou and #Kloe2378231; more details on https://stackoverflow.com/a/28671213/565525).
I've just downloaded SQL Developer 4.0 for OS X (10.9), it just got out of beta. I also downloaded the latest Postgres JDBC jar. On a lark I decided to install it (same method as other third party db drivers in SQL Dev), and it accepted it. Whenever I click "new connection", there is a tab now for Postgres... and clicking it shows a panel that asks for the database connection details.
The answer to this question has changed, whether or not it is supported, it seems to work. There is a "choose database" button, that if clicked, gives you a dropdown list filled with available postgres databases. You create the connection, open it, and it lists the schemas in that database. Most postgres commands seem to work, though no psql commands (\list, etc).
Those who need a single tool to connect to multiple database engines can now use SQL Developer.
Oracle SQL Developer doesn't support connections to PostgreSQL. Use pgAdmin to connect to PostgreSQL instead, you can get it from the following URL
http://www.pgadmin.org/download/windows.php
I managed to connect to postgres with SQL Developer.
I downloaded postgres jdbc driver and saved it in a folder.
I run SQL Developer -> Tools -> Preferences -> Search -> JDBC
I defined postgres jdbc driver for the Database and Data Modeler (optional).
This is the trick.
When creating new connection define Hostname like localhost/crm? where crm is the database name. Test the connection, works fine.
If there is no database with the same name as the username, then clicking "Choose Database" will fail with an error like "Status : Failure -FATAL: database "your_username" does not exist"
To work around this, put 5432/database_name? in the Port field, where 5432 is the port of your Postgres instance and database_name is the name of at an existing database that your_username has access to. Then click "Choose Database" again and it should work. Now you can choose the database you want and remove the extra /database_name? from the Port field.
I think this question needs an updated answer, because both PostgreSQL and SQLDeveloper have been updated several times since it was originally asked.
I've got a PostgreSQL instance running in Azure, with SSLMODE=Require.
While I've been using DBeaverCE to access that instance and generate an ER Diagram, I've gotten really familiar with SQLDeveloper, which is now at v19.4.
The instructions about downloading the latest PostgreSQL JDBC driver and where to place it are correct. What has changed, though, is where to configure your DB access.
You'll find a file $HOME/.sqldeveloper/system19.4.0.354.1759/o.jdeveloper.db.connection.19.3.0.354.1759/connections.json:
{
"connections": [
{
"name": "connection-name-goes-here",
"type": "jdbc",
"info": {
"customUrl": "jdbc:postgresql://your-postgresql-host:5432/DBNAME?sslmode=require",
"hostname": "your-postgresql-host",
"driver": "org.postgresql.Driver",
"subtype": "SDPostgreSQL",
"port": "5432",
"SavePassword": "false",
"RaptorConnectionType": "SDPostgreSQL",
"user": "your_admin_user",
"sslmode": "require"
}
}
]
}
You can use this connection with both Data Modeller and the admin functionality of SQLDeveloper. Specifying all the port, dbname and sslmode in the customUrl are required because SQLDeveloper isn't including the sslmode in what it sends via JDBC, so you have to construct it by hand.
I got the list of databases to populate by putting my username in the Username field (no password) and clicking "Choose Database". Doesn't work with a blank Username field, I can only connect to my user database that way.
(This was with SQL Developer 4.0.0.13, Postgres.app 9.3.0.0, and postgresql-9.3-1100.jdbc41.jar, FWIW.)
Oracle SQL Developer 2020-02 support PostgreSQL, but it is just the basics by adding postgreSQL driver under jdbc dir and configure by adding as a 3rd party driver.
The supported functionality:
multiple databases which can be selected at connection definition
CRUD operations like query tables
scheme operations
basic modelling support: show tables without pk, fk, connections
Not supported functionalities:
no table or field completion
no indexes are shown in a tab
no constraints are shown in a tab like: fk, pk-s, unique, or others
no table or field completions in the editor
no functions, packages,triggers, views are shown
The sad thing is Oracle should only change the queries behind this view in case of PostgreSql connections. For example for indexes they need to use this query: select * from pg_catalog.pg_indexes;
Except that it will not work if your user name and database name are differents. It sounds like an SQLDeveloper bug and i can't find any workaroud
Maybe there are some bugs in Oracle SQL Developer when it connect to the postgresql.However I connect postgresql with navicat successfully.(My postgresql username and database name are different
host= localhost/postgres? worked for me if you need a schema/database use:
localhost/postgres?currentSchema=myschema
ex: localhost/postgres?currentSchema=public
once connected, you can also use the
[Choose Database] button and pull down
sql developer postgres jdbc url for the rest of us