Hy guys,
I'm trying to setup a DB2 (V11.1) stress test using Jmeter (3.1).
I've downloaded JMeter and the jdbc driver.
I've copied the jdbc driver into JMETER_DR/lib/db2jcc4.jar
I've created a Thread Group with 10 users
I've created the JDBC connection (disabling the Connection validation by Pool). Database URL: jdbc:db2://10.40.2.157:50000/TEST . JDBC Driver Class: com.ibm.db2.jcc.DB2Driver
I've created the JDBC Request: Query Type: Select Statement. Query: select * from TEST.TESTTABLE;
When I run the test plan I got the error:
1489682525237,5,DB2 JDBC select,42601 -104,"com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=;;from TEST.TESTTABLE;END-OF-STATEMENT, DRIVER=4.16.53",DB2 Thread Group 1-1,text,false,,108,0,1,1,0,0,0
I've tested the same connection parameters and query using another Software (RazorSQL) and they are fine.
What it could be?
You received the illegal symbol error.
Using semicolon after a single statement may produce this error.
Try to remove the semicolon ;
Related
Couldn't find anything on the Internet for this at all and wondered if someone could help me.
Using Apache Derby with a query in a Spring Boot app:
The query starts like this:
WITH dbName AS {
(Then goes on to select data from tables)
}
When running my test cases I get an exception which reads:
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "with" at line 1, column 1
Does Apache Derby support WITH? I can't see any other reason why this shouldn't work.
After some more research, I can confirm that Derby does not support recursive queries
Found this Issue https://issues.apache.org/jira/browse/DERBY-11
I have a designed a report which works well. I am trying to add another sql query in it. Previewing the sql query works without any hiccups.
But when I try to add the parameter for the same query, I get two different errors depending on which mysql-connector I am using.
Earlier I was using the mysql-connector-java-5.0.8-bin and the error
was
org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query: (a few lines down )
Caused by: java.sql.SQLException: Stopped by user.
Then I changed the mysql-connector to mysql-connector-java-5.1.36-bin. The error changed to :-
org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query:
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
Any suggestions would be helpful. I am using Pentaho 5.3.0.0-213 on Windows 8.1 Pro. Although the same problem exists when I run Pentaho 5.3.0.0-213 on Ubuntu 14.04
Thanks
I've googled for a few days and can't get this working.
I'm using SQL 2014 and the adventureworks database.
I've got SAS 9.3.
I've tried different ODBC settings, as in setting a default database, using Windows login, or SQL login. Different drivers. Still nothing, used complete and noprompt:
libname mylib odbc complete='TrustedConnection=True;DSN=test2;SERVER=MYSERVER\SQLEXPRESS;DATABASE=AdventureWorks2012;'stringdates=yes;
proc print data=mylib.Person;
Error message:
NOTE: Libref MYLIB was successfully assigned as follows:
Engine: ODBC
Physical Name: test2
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
Inserting white space between a quoted string and the succeeding identifier is
recommended.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 5.48 seconds
cpu time 0.34 seconds
700 proc print data=mylib.Person;
ERROR: File MYLIB.Person.DATA does not exist
I've tried with Person.Person and also in the connection string using schema=Person.
However if I use the following it works. I put the default database in the ODBC:
proc sql;
connect to odbc as mycon
(required = "dsn=awlt32;uid=sa;password=mypassword");
select *
from connection to mycon
(select *
from Person.Person);
disconnect from mycon;
quit;
I know this is a super simple question but I can't seem to get it working, no matter what example code I find. Thanks in advance.
Add the database connection to your ODBC driver; you will need the name of this connection in your libname,
Use the libname below and update the datasrc, sql user and password
LIBNAME mylib ODBC DATASRC=name from step1 SCHEMA=dbo USER=sql user PASSWORD="xxx" ;
proc datasets lib=mylib ;
quit;
I'm using the Impala JDBC driver (or I guess it's actually the Hive Server 2 JDBC driver). I have a view created in another database -- let's call it "store55".
Let's say my view is defined as follows:
CREATE VIEW good_customers AS
SELECT * from customers WHERE good = true;
When I try to query this view using JDBC as follow:
SELECT * FROM store55.good_customers LIMIT 10
I get an error such as:
java.sql.SQLException: AnalysisException: Table does not exist: default.customers
Ideally, I'd like to specify the database name somewhere in the JDBC URL or as a parameter but when I try to use this JDBC url, I still get the same error:
jdbc:hive2://<host>:<port>/store55;auth=noSasl
Doe the Hive2 JDBC driver just ignore the database part of the URL and assume all queries are executed against the default database?
The only way I was able to have the queries return is to change the view definition itself to include the database name:
CREATE VIEW good_customers AS
SELECT * from store55.customers WHERE good = true;
However, I'd like to keep the view definition free of database names.
Thanks!
You might want to specify in JDBC the "use database xxxxx;" statement.
Also, if you are already using the database try "invalidate metadata" statement.
The URL is jdbc:hive2://:/store55;auth=noSasl correct
Can you run few diagnostics such as:
SHOW TABLES - to ensure that the view is created in store55
Are you using the USE DATABASE command in the DDL's
I’m installed oracle 11g R2 in my system. But when I connect to the database in sql developer it shows the error as following:
An error was encountered performing the requested operation:
The Network Adapter could not establish the connection
Vendor code 20
I know it was due to the incorrect CLASSPATH for oracle
My CLASSPATH for oracle and java are:
E:\app\JamesPJ\product\11.2.0\dbhome_1\jlib\orai18n.jar.;E:\app\JamesPJ\product \11.2.0\dbhome_1\jdbc\lib\ojdc6_g.jar.;E:\app\JamesPJ\product\11.2.0 \dbhome_1\BIN.;C:\Program Files\Java\jdk1.7.0_09\bin.;C:\Users\JamesPJ\Documents.;E: \app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib.;E:\app\JamesPJ\product\11.2.0\dbhome_1\jlib.;E:\app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar.;E:\app\JamesPJ\product\11.2.0\dbhome_1\oc4j\jdbc\lib\orai18n.jar.;E:\app\JamesPJ\product\11.2.0\dbhome_1\oc4j\jdbc\lib\ocrs12.jar
I don’t know those variables are correct or not.
If any one know the solution for it, please answer me….
Thanks in advance….
Try to replace all found .; in your CLASSPATH with ; and eleminate whitespaces such as in:
E: \app\JamesPJ\product\11.2.0\dbhome_1\jdbc\lib
then try again, your classpath doesnt look normal now.