Npgsql syntax error at or near "DISCARD" - amazon-redshift

I'm running a standard query against Redshift, and every other time I run it, I get:
[ConciergeClientException: We encountered a problem fulfilling your request: 42601: syntax error at or near "DISCARD"]
I'm opening and closing the connection properly, and the query looks fine. I've queried Redshift's STL_QUERY and the statement looks fine. I turned on logging, and I can't see where this DISCARD command is being sent.
Yet every other query gives me this error.
Thoughts?

Assuming you're using Ngsql 3.2.0, this looks like a duplicate of https://github.com/npgsql/npgsql/issues/1426. In a nutshell, Npgsql's pooling was changed in 3.2.0 in a way which is incompatible with Reshift.
As a workaround, specify No Reset On Close in your connection string. This will be fixed for 3.2.1.

Related

ERROR: cannot execute CREATE TABLE in a read-only transaction - Jasper reporting

I'm facing this annoying problem in Jasper. I have created a report based on a PostgreSQL function. When I watch the preview, I do not have any problem with the results. However, when I publish the report and try to execute it, I get this error:
org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE in a read-only transaction
I've checked on the internet for a possible solution, so far this is the only thing that I have found with a similar problem:
https://community.jaspersoft.com/questions/814793/report-execution-fails-due-read-only-transaction-mode
However, adding the property to the URL does not work, or I'm not so sure if I have to write it in this way:
jdbc:postgresql://server:5432/data_base?defaultReadOnly="false"
In Jasper, what else can I do? I only can query the function, and requiring any change in it is an HUGE bureaucratic issue.
Jasper Studio 6.3.0
According to the documentation the JDBC connection parameter would be readOnly=false.
Have you verified that you are not connecting to a streaming replication standby server?

Orientdb: Error executing live query subscriber

Orientdb throws on each live query subscripion using binary protocoll following Nullpointer exception:
Error executing live query subscriber. java.lang.NullPointerException at com.orientechnologies.orient.server.network.protocol.binary.OLiveCommandResultListener.onLiveResult(OLiveCommandResultListener.java:113)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect$2.call(OCommandExecutorSQLLiveSelect.java:134)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execInSeparateDatabase(OCommandExecutorSQLLiveSelect.java:144)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.onLiveResult(OCommandExecutorSQLLiveSelect.java:131)
at com.orientechnologies.orient.core.query.live.OLiveQueryQueueThread.run(OLiveQueryQueueThread.java:69)
The Live Query is subscribed by one client: "live select from Account where CheckInDateTime like "2018-02-25%"", Orientdb returns also the live request token ID gracefully. But when another client updates Account with "update Account set CheckInDateTime = "2018-02-25 13:00:00"" the mentioned NullPointerexception is thrown. I've tried to use versions 2.2.30 and 2.2.32 Comunity, DB Administrator and Server Administrator accounts. Also loading of plugins seems not to work (even the used version is 2.2.30 and 2.2.32 where Live Query should be enabled at server by default). Nothing seems to help to get that work, also queries like "live select from account" (without where ...).
Any further ideas? Thx.
Currently live queries do not support the WHERE clause you included in the query.
You can only select entire collections or V and E (which is what I use to get all updates)
If you would like to filter using that where, you will have to write it yourself in code.
Thx for answering mitchken! Fortunately, I found the mistake. The TCP connection from client to DB was in wrong state (must be all the time in waitforreadyread).

Meteor - Mongo Write error

I am getting an unexpected error when i attempt an update with the latest version of meteor.js. The type error doesn't specify which field it fails on and i am not sure if this is a mongo related issue or not. Has anyone seen this error before?
Error in Mongo write: TypeError: boolean is not a function
I20130901-19:44:56.515(-5)? at writeCallback (packages/mongo-livedata/mongo_driver.js:206)
I20130901-19:44:56.515(-5)? at Meteor.bindEnvironment.runWithEnvironment (packages/meteor/dynamics_nodejs.js:69)
I was able to stop my client from blocking by specifying a callback to the server side call.
https://gist.github.com/warsamebashir/6408451
This usually happens to me when I pass {multi:true} as a second argument to Collection.remove on the server.
You're calling Collection.update with 5 arguments, which is a little bit too many. Read about it in the docs.
I'm getting the same thing on this code:
Templates.remove({_id: {$in: templateIDs}}, {multi:true});
Just for the record, I am still on 0.7.0 and this type of query was working perfectly before the 0.8.1 release. How the hell is it affecting the old 0.7.0 without me even updating is beyond comprehension. Did they change the behavior of remove to now automatically do {multi: true} on everything it finds, because that's what I understood from Peppe L-G's link.
Edit1: Follow-up, yes removing the , {multi:true} fixed the problem, while it still does delete all the matched documents in mongodb. It's either me updating mongodb to 2.4.10 from 2.4.9 or they did an update on the 0.7.0 release that fixes Meteor's behavior.

SSRS: Dropdown is not populated in filter in Report Builder

Whenever I try to apply filter to an attribute, which has ValueSelection= Dropdown, the dropdown is not populated and error message "The requested list could not be retrieved because the query is not valid or a connection could not be made to the data source" is shown instead.
If I set up ValueSelection=List I am getting a different error message:
An attempt has been made to use a semantic query extension associated with the data extension 'SQL' that is not registered for this report server.
(Microsoft.ReportingServices.SemanticQueryEngine)
This happens within BIDS environment and was observed both in SQL 2005 and SQL 2008.
I've already studied articles, which discussed the similiar problem, but neither of them applied to my case. The user account in data source has all necessary rights, data could be retrieved without any problem (for example if i try "Explore data" in data source view). The SQL profiler shows that no query is being sent to SQL Server when there is an attempt to populate dropdown. So nothing is wrong with the query, it is simply never executed.
Your connection is not working. Try to test you connection by trying a simple table and query output.
This will enable you to test the connection before trying anything advanced.
Got this problem and in my case it was caused by wrong connection string in Data Source - instead of just having a SQL Server name like "SOMESQLSERVER_MACHINE" I had for some reason "SOMESQLSERVER_MACHINE.our.corp.domain". It had to be the same, but then I realized that the domain is wrong, after removing it all works like a charm again. That said: it's always good idea to start with detailed checks on your basic settings.
Otherwise this could be a problem with permissions to the folders on Report Manager.

Db2 error : SQL0901N, SQLSTATE=58004

Can i use Atomic in the parrent procedure as well as in the procedure which the mail procedure calls.
My procedure compiles perfectly, but sometimes when I execute it. I receive following error:
DB2 Database Error: ERROR [58004] [IBM][DB2/NT64] SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "Sdir len bad: 1542!=1520+14".) SQLSTATE=58004
However, surprisingly when i commented the "ATOMIC" keyword in the main procedure and ran again it ran perfectly. But when I ran it again after uncommenting it still did not give any errors and ran perfectly.
So the error that I recieve is not something that I recive everytime.Could some one please let me know what could be the issue and what needs to be done to resolve this. As on goolgeing I did not find any leads on this.
Thanks,
Harveer
Found the following statement from an IBM employee on DeveloperWorks. Not sure if this helps.
3 In running rebind of all packages , I get an error
"SQL0901N The SQL statement failed because of a non-severe system
error.
Subsequent SQL statements can be processed. (Reason "Sdir len bad:
1171!=1160+9".) SQLSTATE=58004"
SQLSTATE 58004: A system error (that does not necessarily preclude the
successful execution of subsequent SQL statements) occurred."
How do we identify which stored procedure,function is creating this
error?
SQL0901 means: call IBM. There is
nothing you can do about this (only
work around it, possibly).