Informatica Error during SQL server table load - informatica

I am new to Informatica and I am getting the below error while running a simple DB to DB table load using Informatica.
Message Code: WRT_8229
Message: Database errors occurred:
FnName: Execute -- [Informatica][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near '$'.
FnName: Execute -- [Informatica][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Statement(s) could not be prepared.
FnName: Execute -- [Microsoft][ODBC Driver Manager] Function sequence error
I am not using any parameter in the mapping and I do not understand why I am getting that:
'Incorrect syntax near '$'' error.
I have another mapping that loads the same table, but that is working without any issues.

This error can occur when the target table contains a column name with a space or special character. For your case it seems its $. Now, you need to add QuotedId=Yes to your odbc.ini file for target connection entry. Check if you are using same connection as the mapping that works. If not, you need to append below parameter to your connection.
open .odbc.ini. This exists in $ODBC_INI location.
append below entry and save it.
[TGT_CONN]
...
QuotedId=Yes
Explanation - QuotedID parameter determines whether the driver uses quoted identifiers while writing/reading. So Infa should use sql like SELECT "abc_$" from "table"

Related

Informatica powercenter power exchange PWX-00267 DBAPI error

I am executing a workflow in informatica which is supposed to inset values in a target file.
Some of the records are getting inserted but i get an error after a few insertions saying:
[Informatica][ODBC PWX Driver] PWX-00267 DBAPI error for file……… Write error on record 119775 Requested 370 SQLSTATE [08S01]
Is this because of file constraints of how the record can be or due to some other reasons?
I'm not sure if this is exactly the case, but looking for the error code 08S01 I've found this site that lists Data Provider Error Codes. Under SQLCODE 370 (assuming this is what your error message indicates) I've found:
Message: There are insufficient resources on the target system to
complete the command. Contact your server administrator.
Reason: The resource limits reached reply message indicates that the
server could not be completed due to insufficient server resources
(e.g. memory, lock, buffer).
Action: Verify the connection and command parameters, and then
re-attempt the connection and command request. Review a client network
trace to determine if the server returned a SQL communications area
reply data (SQLCARD) with an optional reason code or other optional
diagnostic information.

How to fix `column "xlog_position" does not exist` error when using AWS DMS for Postgres to Postgres data migration

I'm trying to migrate and synchronize a PostgreSQL database using AWS DMS and I'm getting the following error.
Last Error Task error notification received from subtask 0, thread 0 [reptask/replicationtask.c:2673] [1020487]
RetCode: "SQL_ERROR SqlState: 42703 NativeError: 1
Message: ERROR: column "xlog_position" does not exist; No query has been executed with that handle; RetCode: SQL_ERROR SqlState: 42P01 NativeError: 1
Message: ERROR: relation "pglogical.replication_set" does not exist; No query has been executed with that handle; RetCode: SQL_ERROR SqlState: 42703 NativeError: 1 Message: ERROR: column "xlog_position" does not exist; No query has been executed with that handle;
Could not find any supported plugins available on source; Could not resolve default plugin; Could not assign a postgres plugin to use for replication; Failure in setting Postgres CDC agent control structure; Error executing command; Stream component failed at subtask 0, component st_0_JX7ONUUGB4A2AR2VQ4FMEZ7PFU ; Stream component 'st_0_JX7ONUUGB4A2AR2VQ4FMEZ7PFU' terminated [reptask/replicationtask.c:2680] [1020487] Stop Reason FATAL_ERROR Error Level FATAL
I'm using two PostgreSQL instances as both source and target. I have already tested and verified that both database instances are accessible by replication instance. Target instance user has full access to the database. Do I need to install any plugins or do additional configurations to get this migration setup working?
I managed to resolve the issue by following the steps mentioned at
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html.
The issue was due to the fact that I was using DMS engine v3.1.4 which required some additional configuration for the replication process to start. These instructions can be found at https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.v10
If you are experiencing this issue double check the DMS replication engine version. This can be viewed under Replication Instances in Resource Management.
To enable logical decoding for an Amazon RDS for PostgreSQL DB instance
The user account requires the rds_superuser role to enable logical
replication. The user account also requires the rds_replication role
to grant permissions to manage logical slots and to stream data using
logical slots.
Set the rds.logical_replication static parameter to 1. As part of
applying this parameter, we also set the parameters wal_level,
max_wal_senders, max_replication_slots, and max_connections. These
parameter changes can increase WAL generation, so you should only set
the rds.logical_replication parameter when you are using logical
slots.
Reboot the DB instance for the static rds.logical_replication
parameter to take effect.
Create a logical replication slot as explained in the next section.
This process requires that you specify a decoding plugin. Currently
we support the test_decoding output plugin that ships with
PostgreSQL.
The last item can be done with the following command:
SELECT * FROM pg_create_logical_replication_slot('test_slot', 'test_decoding');
Reference: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication

Flyway migrations: [WARNING] Unable to restore connection to having no default schema

I'm encountering a warning when running my migrations and I don't understand what the message means.
The message is: [WARNING] Unable to restore connection to having no default schema: Access denied for user ''#'%' to database ''
My migrations appear to be running correctly, so I know my DB connection is ok.
What is the significance of "having no default schema" in this message?
I did some googling around this issue and here's what I have found: https://github.com/flyway/flyway/issues/793
Apparently, at a certain point of time, there is a DB connection with no schema selected, which causes that warning to be thrown.
As a solution, you could make sure to always have the default schema name in your JDBC connection string.

Sybase DB Error : Database driver error...Send failed

When I am trying to execute a simple select query (from C++ application , Sybase DB) , I get this error .
Database driver error...Send failed
Database driver error...
Function Name : Execute
There is nothing wrong in the query
If I try to execute this same query , from the console query execution goes fine and get the result .
Searched online, no info about this . Whether you guys faced this problem ever,Or what are all the other parameters I can check
I figured out what the issue is . This error comes when DB client (C++ app) not able to send request to server because one more is connection is still open and has some pending results , hence the error. I have closed connections explicitly , that solves the problem

Pentaho Kettle- run check db connections without stopping job

I have read blogs and one question close to mine, but have not found a solution to my problem. I have a transformation job setup to extract three tables from 84 DBs to generate one report. My problem is when a DB connection is not available, the whole job stops.
I would like to be able to check DB connections before initializing the job, log errors for inaccessible DBs and create a new dynamic list of successful tests from which I will then run my job. I have used the check DB connections step but it still stalls when a connection is false.How can I process my list of DBs, running through to the end, without aborting the job?
First of all you have absolutely used the correct step to check the DB Connections. Now for your question, i would try to explain in parts (hope i am correct):
Case I: "My problem is when a DB connection is not available, the whole job stops"
This scenario is obvious. Whenever a step finds any error, it would throw an exception and would stop the entire execution of the Job.
But does it mean that the step "Check Db connections" would stop checking the db connections if it gets an error connecting. Answer is NO. The Step would complete testing all the connections even if it gets an error in some connection in middle. Try observing the logs carefully, it would give you a final consolidated list of all the checked db connections (check the image below):
I tried testing with 4 db connections out of which i got One error and 3 Success.
Now for the "Whole Job Stops" portion: Since the stopping behavior is obvious (as i have mentioned above), what you can do is to pass the flow using "Error hop" so that if a job finds an error, it will take the error hop. Check the image below:
Here i have used two hops: One Success and One Error. If the Job fails, it would take the error path (red colored hop) else it would take the Success path (green colored hop).
CASE II: "log errors for inaccessible DBs and create a new dynamic list of successful tests"
You can either log the errors into a separate log files or table (depends on your requirement) and then read through the log to generate a list of DB connections. Check the image below:
The output generates a list of Connections along with an Error flag.
Y : Failure in connecting to Database
N : successful connection
Note: i have used text file input since i have logged the previous step into a text file instead of database. You can customize as per your req.
I have placed sample code in gist. You can check for your ref.
Hope it helps :)