StackOverflow is a collaborative programming Q&A community venture
Note: The content of this blog is the opinion and thoughts of the blogger and does not necessarily represent the opinions of IDUG.
Unable to connect to Informix db2
Unable to connect to Informix db2 from Fluent Migrator (.net/c#) on the local instance. (Windows 10 running on AWS EC2)
Getting this after invoking the migrator executable:
[+] Beginning Transaction
!!! ERROR [HY011] [IBM] CLI0126E Operation invalid at this time. SQLSTATE=HY011
I am able to connect to the db instance via the dbaccess cli utility.I also tried to remove all the actual migration sql statements and scripts from the migration solution and the same error happens if trying to run a totally empty migration, so the issue is likely a connection or transaction issue.
Any ideas will be appreciated. Thanks.
More detials as requested from responses:
The connection info is this:
Both the database and the application that connects to it are located on the same machine, which is hosted on AWS. So the connection it's trying to make is to the DB on the same box.
fail to create event monitor db2detaildeadlock in aix
Base on this link, http://www-01.ibm.com/support/docview.wss?uid=swg21193054 I am trying to create the event monitor db2detaildeadlock in my db2 database.
I am running the following command:
I am running my db2 database in AIX server, is it any other syntax changes on this command?
And is there any way to check my event monitor
.NET BeginTransaction fails on IBM.Data.DB2 provider
I've got a connection to Informix DB (providerName="IBM.Data.DB2") and it fails on
I tried all possible isolation modes, e.g.
It fails on each one of available isolation levels. However when I try to bypass this and execute some sql without a transaction, it works.
Any help would be appreciated.
Additional info:Informix returns error when trying to open the connection in .NET code"!!! ERROR [HY011] [IBM] CLI0126E Operation invalid at this time. SQLSTATE=HY011"There is not much info online on this error, and I tried increasing the size of the physical log file, checking user privileges, running as an admin.
The DB access is from .NET code that is Flient Migrator (https://github.com/eoin55/fluentmigrator). Eventually I ended up recompiling it from source after adding extensive logging in order to locate the issue and narrowed it down to the Connection.BeginTransaction statement.
get the date along with year and month
The date condition below is good for fetching current year and current month I would like to add current date to it ,please append the query to get current date .
thanks in advance
Oracle flashback database feature in db2
Is there a feature in DB2V10.1 LUW similar to oracle flashback feature.We have a load test that runs for 4 hours inserting test date into the DB and my goal is to recover the database prior to load test without doing the full restore as its a large database(3TB). Please let me know if there are any other ways in DB2 to achieve this.
What is the optimal way in DB2 to delete rows from a table and a subselect?
I have the following code, where on a NODE table I have about 135k rows and a NODE_LIST common table that has about 4k rows, and deleting all the rows from NODE that can be found in NODE_LIST takes about 48 seconds.
I would like to run the query such that it completes in under 5 seconds.
Inserting records in one table getting records from 2 different tables
Hey Geeks I am new in DB2 I want to generate surrogates by getting maximum from one table and for that I am doing that
the above statement is used in insert statement.In the above code I want to maximum which I get from last line.
May You guys got it and thanks in advance
Sample Data is here First table data
Second table data from where i have to get maximum
How to write insert query from slect result which retuin more then one row using max+1 syntax
I am trying to write a SQL like below in DB2.
Here the aim is copy all the record of tableA from -1 to -2 and here col1 is primary key and this should be increment by 1.
Now the problem is the select query will return more then one row like below
And it is not able to insert as the key is same.
Is there any way I can write the select sql so that it can return like below
and my insert will work, or is there any alternative way to the same with easiest way.
Note: The table do not have any trigger or some thing to auto increment the primary key.
Original select query
Get columns of index on DB2
How can I get the columns, which an index of a table uses, in DB2?
But I get the error message
Ideally I want information of all indexes a table uses with their corresponding columns.
I am using DB2 for z/OS V9.1
Code page issue
We have recently upgraded Java(7 to 8), Spring(3 to 4), Hibernate(3 to 4) in our application. Afterwards we are facing issues with special characters like (öüä).These values are getting replaced with some junk characters in the database.
When i checked the jsp page i found the code page is "iso-8859-1", so i changed to "UTF-8".Now the special characters are working fine but again we are facing issues with euro(€) symbol.
When i searched in google i found that it could be related with data base code page issue. I checked the data base(DB2) code page and it is is "iso-8859-1. But it is not possible to change the code page in database.
In production environment still all the special characters including euro symbol is working fine with "iso-8859-1" code page. I am still not able to understand how is it working.
Upgrading Java(7 to 8), Spring(3 to 4), Hibernate(3 to 4) really creating the code page issue. How can i resolve euro charcter issue now.
Could any one provide some suggestions.