SchemaCrawler couldn't connect to Oracle base - oracle

Schemacrawler couldn't connect to Oracle base. The cmd line is below:
java -classpath ../../_schemacrawler/lib/*;lib/* schemacrawler.Main -url=jdbc:oracle:thin:#localhost:port:sid -u=user_name -password=pw -infolevel=minimum -schemas=target_schema -c=count -loglevel=CONFIG
And error is
Could not find a suitable JDBC driver for databse connection URL, jdbc:oracle:thin:#localhost:port:sid
What am I doing wrong?
Thanks in advance.

As Alex Poole says, you need to download the Oracle JDBC driver, and place it in the SchemaCrawler lib folder. Please read the documentation on the Database System Support page very carefully. Also, please make sure that you are using the latest version of Java 8, and the latest version of SchemaCrawler.
Sualeh Fatehi, SchemaCrawler

Related

How to install IBM db2 cli drivers on mac osx mojave

In order to use db2 with node.js on my mac. I have installed the db2 drivers - DB2 v11.1.4.5.
I also configured my environment paths so that the correct config files will be used by unixODBC
I configured the odbcinst.ini, ODBC.ini , db2cli.ini, and the db2dsdriver.cfg files
The issue is that I get the error below when I run the iqsl command or the db2cli validate command
My Error
[S1000][unixODBC][IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3".
unixODBC isql command syntax
isql usrProd userid password
db2cli validate command syntax
db2cli validate -dsn alias -connect -user userid -passwd password
Environment path stored in file ~/.bash_profile
export PATH=$PATH:/usr/local/share/odbc_db2/clidriver/bin/
export DB2CLIINIPATH=/usr/local/share/odbc_db2/clidriver/cfg/
export DB2DSDRIVER_CFG_PATH=/usr/local/share/odbc_db2/clidriver/cfg/
I have been documenting the steps that I took to install the db2 command line drivers.
My documentation
locations of the IBM DB2 Drivers I have installed:
Client Version (level/bit): DB2 v11.1.4.5 (special_39510/64-bit)
Client Version (level/bit): DB2 v11.1.1.1 (s1703232000/64-bit)
UPDATE --- 20200413----
I got it to work on my Mac. I did get it to work with Node.js
I contacted a few IBM developers who are working directly on this project, and they gave me access to the proper "IBM i Access ODBC Driver" to connect to the as400 from the mac.
It is being beta tested now. At some point, it should be released. to the general public.
db2cli drivers are not needed, db2cli.ini is not needed:
IBM has specific odbc drivers for the iseries. I dont have permission
to share the drivers with the public, but do know that it will be
possible soon for everyone to connect to db2 installed on the iseries
I got it to work on my Mac and I did get it to work with Node.js
I contacted a few IBM developers who are working directly on this project, and they gave me access to the proper "IBM i Access ODBC Driver" to connect to the as400 from the mac. It is being beta tested now, i assume that at some point, it should be released to the general public.
Note : db2cli drivers are not needed, db2cli.ini is not needed, and setting environment paths are not needed:
IBM has specific odbc drivers for the iseries. I don't have permission
to share the drivers with the public, but do know that it will be
possible soon for everyone to connect to db2 installed on the iseries
For IBM DB2 Warehouse on the IBM CLoud you can go to this url
https://your_tenant.cloud.ibm.com/console/#connection/overview
In above replace your_tenant with your tenant id.

Oracle | Unable to exlude database link while export of a schema

can you please advise how to exclude DB links when exporting DB schema by:
exp userid=USER/PASS#server File=/export/schema_20170605.dmp
I do not need them in the dump but need to keep them on the server 11g.
When trying to export it as is getting error:
. exporting database links EXP-00106: Invalid Database Link Passwords
EXP-00000: Export terminated unsuccessfully
I have tried also expdp which could works but it requires dedicated folder directly on the DB server.
Thanks, Reddy
I had the same problem using exp version 10.2.0.1.0 against server version 11.2.0.4.0.
Using newer exp version 11.2.0.2.0 fixed it for me.

How to fix "Unable to instantiate JDBC driver" Flyway command line error?

I'm new to Flyway. I'm using Flyway 3.2.1 on windows 64bit and just tried the command line tool with my local Oracle database installation (11g). I'm getting the following error:
ERROR: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver
What did I do wrong? In flyway.conf I configured my jdbc url and also username and password.
Thanks in advance
Matze
Problem solved. For Oracle you have to put the jdbc driver jar in the drivers sub directory.
This is documented here.
In summary: Go to http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html and choose the required Oracle JDBC driver version. Then download the "ojdbc6.jar" file and move it into the drivers folder beneath where Flyway is installed. The next time you run Flyway this should be picked up automatically.

Export from Oracle 10g database with 11g client - detailed

Database Version : 10g Enterprise Edition Release 10.2.0.4.0
Client Version: 11g Enterprise Edition Release 11.2.0.1.0 (windows 7 64bit)
When I try to export (exp) a table from database:
exp usr/pass#remote_db file=f.dmp tables=table
I get the following error:
EXP-00008: ORACLE error 904 encountered
ORA-00904: "POLTYP": invalid
identifier EXP-00000: Export terminated unsuccessfully
I know this question was answered earlier (the answer is "install 10g client to use its exp utility"), but I still didn't understand correctly:
Is Oracle 10g client 10.2.0.4 is ok for this? Do I need to setup TNS etc?
If I use the previous command to export the DB will the system automatically use the Ora10g client exp tool?
1) Yes, the 10.2.0.4 client would be OK. Yes, assuming that you use a tnsnames.ora file to connect to the database, you would need to configure a tnsnames.ora file in the Oracle Home for the newly installed 10.2.0.4 client or set the TNS_ADMIN environment variable to point at a single tnsnames.ora file for all Oracle Homes on the server. If you don't use a tnsnames.ora file to connect to the database, you would not need to configure one.
2) The command you posted will use the operating system's name resolution logic to determine which executable to invoke. Generally, that will be the executable in whichever Oracle Home is first in the operating system's PATH environment variable. Of course, you could specify an explicit path or change the current directory to the %Oracle Home%\bin of the 10.2.0.4 Oracle Home if that home was not first in the path.

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

Resources