flyway, added additional JDBC driver, still getting "No database found to handle" [duplicate] - db2

This question already has answers here:
Is there a way to use Flyway on AS400?
(2 answers)
Closed last month.
The driver in question is jt400.jar; I copied it to the driver directory of my flyway installation.
This is the content of the file flyway.config in my project directory:
flyway.locations=filesystem:.
flyway.url=jdbc:as400://192.168.1.1/myschema;naming=system;errors=full
flyway.user=myschema
flyway.password=***
Calling flyway in my project directory produces the error:
No database found to handle jdbc:as400://192.168.1.1/myschema;naming=system;errors=full
With networking debug tools I checked that it didn't even try to establish the connection to the db, so the problem should be the driver.
Calling flyway with -X option to get more detail for the error, i get the following:
PS C:\Users\alex\Documents\myprj> flyway migrate -X
DEBUG: Loading config file: C:\Program Files\Red Gate\Flyway Desktop\flyway\conf\flyway.conf
DEBUG: Unable to load config file: C:\Users\alex\flyway.conf
DEBUG: Loading config file: C:\Users\alex\Documents\myprj\flyway.conf
DEBUG: Using configuration:
DEBUG: flyway.driver -> com.ibm.as400.access.AS400JDBCDriver
DEBUG: flyway.jarDirs -> C:\Program Files\Red Gate\Flyway Desktop\flyway\jars
DEBUG: flyway.locations -> filesystem:.
DEBUG: flyway.password -> ***
DEBUG: flyway.url -> jdbc:as400://192.168.1.1/myschema;naming=system;errors=full
DEBUG: flyway.user -> myschema
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: No database found to handle jdbc:as400://192.168.1.1/myschema;naming=system;errors=full
at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForUrl(DatabaseTypeRegister.java:441)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:496)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:476)
at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:2062)
at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:1341)
at org.flywaydb.commandline.Main.getLegacyConfiguration(Main.java:675)
at org.flywaydb.commandline.Main.main(Main.java:509)
I tried to add an explicit reference to my driver class adding the following line to flyway.conf:
flyway.driver=com.ibm.as400.access.AS400JDBCDriver
The result is the same.

Currently you cannot use flyway with i-series (as400) as there is no published code for that purpose. Flyway at currently documented versions only supports the Db2-LUW variant of Db2 (Linux/Unix/Windows).
You are free to write your own module to support the i-series, or pay others to do that.

Related

MySQL-Workbench Connection Fail

Try to ask a question because the DB connection in MySQL Workbench continues to fail.
Enter connection information and Test Connection was successful.
However if i select the appropriate DB Connection in workbench home, the connection success window does not appear.
local DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
Server DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
MySQL Workbench Version : mysql-workbench-community-8.0.16-winx64
The same error occurs even if the version of Workbench is changed to 19 or 20.
How to solve it?
Manage Server Connections - screenshot
MySQL Workbench - screenshot
------More details---------
If you check the log file in the top Help tab of Workbench, you can see the log as below.
11:23:15 [INF][SQL Editor Form]: Opened connection 'DB Name' to mariadb.org binary distribution version 10.3.14-MariaDB
11:23:15 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.3.14-MariaDB
However, the connection is normally established on the other coworker's PC.

SSIS: Data integration between SQL server 2008 R2 To PostgreSQL 9.5

I have a SSIS package where I take data from SQL Server Table, data conversion and load that into a table in PostgreSQL.
Package details:
Source : OLEDB Source
Transformation : Data Conversion (varchar data type conversion)
Destination : ADO NET Destination
Database connected is successfully using ADO.Net
Mapping has been done properly between Data conversion to Destination.
While executing package getting following error:
[ADO NET Destination [192]] Error: ADO NET Destination has failed to
acquire the connection {B63BB8E1-515E-4687-89D9-990575FBD5F0}. The
connection may have been corrupted.
We have to do some settings to overcome with this problem.
Settings:
Setting properties of data flow task:
Go to Properties -> Execution
DelayValidation = True
Setting properties of control flow task:
Go to Properties -> Execution
DelayValidation = True
Setting properties of Solution:
Go to Configuration Properties -> Debugging -> Debug Options
Run64BitRuntime = False

How to direct the result of mongoquery to a file

I'm trying to send the result of mongo query to a file using mongo shell. I had used this following command.
C:\>mongodb\bin\mongo localhost/mydb –eval "db.docs.count()" >> counttest.txt
Actually my text file got created with this stack trace.
2016-05-13T12:35:51.485+0530 I CONTROL [main] Hotfix KB2731284 or later update is not installed, will zero-out data files
MongoDB shell version: 3.2.1
connecting to: localhost/mydb
loading file: –eval
2016-05-13T12:35:51.541+0530 E - [main] file [–eval] doesn't exist
failed to load: –eval
With --eval, I'm facing this error:
Error parsing command line: unrecognised option '-ΓÇôeval' try 'mongo --help' for more information
Can anyone please help me out regarding this issue?

pycharm and postgres: ERROR: Unsupported startup parameter: extra_float_digits

Having issue to connect to PostgreSQL 9.0 database from PyCharm. I already tried adding older jdbc driver manually but still getting the same error: "ERROR: Unsupported startup parameter: extra_float_digits".
The "fix" is to add this to the config.ini under the [pgbouncer] section:
ignore_startup_parameters = extra_float_digits
Details here: https://github.com/Athou/commafeed/issues/559
I had this error using the PostgreSQL JDBC driver connecting to PgBouncer. The fix was to add the following to pgbouncer.ini (which was already in the file but commented out):
ignore_startup_parameters = extra_float_digits
(similar to the previous answer but different config file)

Can't Connect to MongoDB from play app with salat: command failed [listDatabases]

I am trying to get started with the salat plugin in playframework. I have configured the database in application.conf and added all the dependencies to Build.scala and added salat to the play.plugins file. I haven't actually added any code to the project yet, I just followed the instructions on the github page, and then tried to run the project. I am getting the following error message
(Server started, use Ctrl+D to stop and go back to the console...)
[info] play - mongodb [default] connected at heroku_app4620908#ds031907.mongolab.com:31907/heroku_app4620908
[error] application -
! #6bchnaacn - Internal server error, for request [GET /] ->
play.api.Configuration$$anon$1: Configuration error [couldn't connect to [ds031907.mongolab.com/107.21.153.211:31907]]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:71) ~[play_2.9.1-2.0.3.jar:2.0.3]
at play.api.Configuration.reportError(Configuration.scala:258) ~[play_2.9.1-2.0.3.jar:2.0.3]
at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:105) ~[play-plugins-salat_2.9.1-1.0.8.jar:1.0.8]
at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:98) ~[play-plugins-salat_2.9.1-1.0.8.jar:1.0.8]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library.jar:0.11.3]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library.jar:0.11.3]
Caused by: com.mongodb.CommandResult$CommandFailure: command failed [listDatabases]: { "serverUsed" : "db-uri" , "errmsg" : "need to login" , "ok" : 0.0}
at com.mongodb.CommandResult.getException(CommandResult.java:88) ~[mongo-java-driver-2.8.0.jar:na
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134) ~[mongo-java-driver-2.8.0.jar:na]
at com.mongodb.Mongo.getDatabaseNames(Mongo.java:356) ~[mongo-java-driver-2.8.0.jar:na]
at com.mongodb.casbah.MongoConnection.getDatabaseNames(MongoConnection.scala:190) ~[casbah-core_2.9.1-2.4.1.jar:2.4.1]
at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:103) ~[play-plugins-salat_2.9.1-1.0.8.jar:1.0.8]
at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:98) ~[play-plugins-salat_2.9.1-1.0.8.jar:1.0.8]
I am stumped because I added my password and everything to the conf file. From the log it looks as though whatever is trying to connect to the database for me, is not logging in first, using the info I provided.
As you say, it looks like the root issue is that MongoDB is rejecting the command "listDatabases". This command requires administrator access to the MongoDB process since it reveals information about the other databases hosted there.
Unfortunately, the message it returns, "need to login", is a little misleading. You have logged in! You just don't have permission to list the databases.
Here's a simple experiment you can try yourself with the MongoDB shell. See that "show dbs" fails with the same error message you got in your app, but "show collections", which doesn't require access to any other databases outside your own, succeeds?
% mongo ds031907.mongolab.com:31907/heroku_app4620908 -u heroku_app4620908 -p your_password
MongoDB shell version: 2.0.7
connecting to: ds031907.mongolab.com:31907/heroku_app4620908
> show dbs
Fri Aug 17 13:12:10 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
> show collections
system.indexes
system.users
(Note: I did this with my own MongoLab account and modified the text when copying and pasting here so you could just copy it into your terminal.)
Is there a way to avoid making the listDatabases call? I'm not familiar with the framework you're using.
I've the problem as well...
it should come with the SalatPlugin's onStart method that is requesting all database names: source._2.connection.getDatabaseNames().
This code is just testing the aliveness of the server...
I'm gonna check with leon how we could this differently! Sadly, you won't be able to connect until this will be fixed!
Stay tuned on this issue https://github.com/leon/play-salat/issues/23
This is fixed in the latest version of play-salat, it now uses getCollectionNames instead
use admin
db.addUser('userName', 'userPassword')
db.auth('userName', 'userPassword')
show dbs
java:
DB db = mongo.getDB("YouDBName") ;
db.authenticate("userName", "userPassword".toCharArray()) ;
System.out.println(mongo.getDatabaseNames()) ;