How to connect to DB2 in robotframework (using Ride) - python-2.7

I can connect to the DB2 (IBM AS400) in Java Spring successfully using library jt400.jar and JDBC Driver: com.ibm.as400.access.AS400JDBCDriver
But not successful in Robotframework
I tried to use below code:
Connect To Database Using Custom Params jaydebeapi 'com.ibm.db2.jcc.DB2Driver','jdbc:db2://10.53.x.x/XABZ:user=USER1;password=PASS1'
Check If Exists In Database select * from lib.btmtran where tmtxseq = 187822
Disconnect From Database
I got the error
***** Out of Package Error Occurred (2018-07-24 16:55:25.3) *****
Exception stack trace: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error:
SQLCODE=-805, SQLSTATE=51002, SQLERRMC=NULLID.SYSSH200;00;S6576b3b
, DRIVER=4.21.29
com.ibm.db2.jcc.am.kd.a(kd.java:815)
com.ibm.db2.jcc.am.kd.a(kd.java:66)
How to fix it ?

Related

How to set parallelLoadThreads to a target connection attribute in AWS DMS

Im using AWS DMS to set connection attributes to my target endpoint
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html
However when i append parallelLoadThreads the connection test fails with:
Test Endpoint failed: Application-Status: 1020912,
Application-Message: Cannot connect to ODBC provider Fatal error has
occurred, Application-Detailed-Message: RetCode: SQL_ERROR SqlState:
42000 NativeError: 1064 Message: [unixODBC][MySQL][ODBC 8.0(w)
Driver]You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'parallelLoadThreads=5' at line 1
initstmt=SET FOREIGN_KEY_CHECKS=0 parallelLoadThreads=5
Removing parallelLoadThreads the connection test works again, have i applied this attribute incorrectly?

Unable to connect to sql server with odbc on QT ubuntu

I'm trying to connect to locahost sql server but all the time I receive error:
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Loggin faield for user 'user'. QODBC3: Unable to connect;
I'm using Qt 5.4 on ubuntu.
Connection string:
QString connectionString = QString(("DRIVER=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.2.1;SERVER=localhost;DATABASE=FightClubDB;UID=kudryavii;PWD=Pass;"));
QSqlDatabase db{QSqlDatabase::addDatabase("QODBC", connectionId)};
db.setDatabaseName(connectionString);
return connectionId;
If you installed mssql-server via this article: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15
then to connect to sql server you will have to use "SA" username not you account name...

Unable to connect to database: Login failed for user 'sa'

I am using jtds jdbs driver (net.sourceforge.jtds.jdbc.Driver) to connect jasper with SQL Server 2000 SP2 but i always getting error Unable to connect to database: Login failed for user 'sa'. I am using centos7.
I have tried replacing several drivers with different versions but I always get the same error message.
This is my code:
java -jar /var/www/clients/client1/web73/web/vendor/cossou/jasperphp/src/JasperStarter/lib/jasperstarter.jar pr /var/www/clients/client1/web73/web/storage/app/uploads/presensi/report/report1.jrxml -f pdf -t generic -H 192.168.22.2 -u sa --db-driver net.sourceforge.jtds.jdbc.Driver --db-url jdbc:jtds:sqlserver://192.168.22.2:1433;instance=MYINSTANCE;databaseName=MYDB
Unable to connect to database: Login failed for user 'sa'

Web deploy issue with sitecore media files

I am using File system for media and trying to get Web Deploy to work between CM and CD but running into issue when I try to publish media item.
My WebDeploy.config looks like this:
<targetDatabase>web</targetDatabase>
<targetServer>cd-site</targetServer>
<userName>Administrator</userName>
<password>pwd</password>
<localRoot>C:\inetpub\wwwroot\CM\Website</localRoot>
<remoteRoot>C:\inetpub\wwwroot\CD\Website</remoteRoot>
<items hint="list:AddPath">
<media>App_Data/MediaFiles</media>
</items>
I cant seem to get pass this error in sitecore after publish, any ideas?:
5652 02:01:11 INFO Job started: Publish to 'web'
ManagedPoolThread #13 02:01:11 INFO MSDEPLOY: Performing synchronization for App_Data/MediaFiles
ManagedPoolThread #13 02:01:11 ERROR MSDEPLOY: Failed to synchronize folder App_Data/MediaFiles. Please verify that the folder exists and is accessible.
Exception: Microsoft.Web.Deployment.DeploymentAgentUnavailableException: Remote agent (URL http://cd-site/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer. ---> Microsoft.Web.Deployment.DeploymentException: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.CreateStatusThread(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Sitecore.Publishing.WebDeploy.DeploymentTaskRunner.Execute()
I fixed this by installing Web Deploy from WebPI. For some reason when I only installed Web Deploy 3.6 independently the services were not registered properly. After installing via WebPI the publishing job instantly started working.

NoHostAvailable exception connecting to Cassandra from python

I am obtaining an exception when trying to connect to my local instance of Cassandra from Python. I can connect to Cassandra with no problems using cqlsh. The version I am running is Cassandra 3.01 on ubuntu:
cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.1 | CQL spec 3.3.1 | Native protocol v4]
The exception I obtain is below:
ERROR:cassandra.cluster:Control connection failed to connect, shutting down Cluster:
Traceback (most recent call last):
File "cassandra/cluster.py", line 840, in cassandra.cluster.Cluster.connect (cassandra/cluster.c:11146)
File "cassandra/cluster.py", line 2088, in cassandra.cluster.ControlConnection.connect (cassandra/cluster.c:36955)
File "cassandra/cluster.py", line 2123, in cassandra.cluster.ControlConnection._reconnect_internal (cassandra/cluster.c:37811)
NoHostAvailable: ('Unable to connect to any servers', {'127.0.0.1': InvalidRequest(u'code=2200 [Invalid query] message="unconfigured table schema_keyspaces"',), 'localhost': InvalidRequest(u'code=2200 [Invalid query] message="unconfigured table schema_keyspaces"',)
I have checked my cassandra.yaml file and it looks ok:
egrep 'rpc_port:|native_transport_port:' /etc/cassandra/cassandra.yaml
native_transport_port: 9042
rpc_port: 9160
Anything else I can look at ? Suggestions are most welcome.
It looks like you are attempting to connect to a 3.0.1 server using an older install of cqlsh or you are (somehow) using an older python driver.
The error message you are getting:
(u'code=2200 [Invalid query] message="unconfigured table schema_keyspaces"',)
indicates that the client driver is attempting to get table metadata from the schema_keyspaces table which pre-dates 3.0. This information is now held in the system_schema.keyspaces table.
Use pip install --upgrade cassandra-driver to upgrade cassandra-driver.
You could type python -c 'import cassandra; print cassandra.__version__' to confirm the version of this driver.