Hi I am currently doing an automation testing script. And I have a portion where I would like to extract the data from the database and input them in text-fields.
This is how I have written my codes:
Retrieve and Input
Connect To Database Using Custom Params cx_Oracle '${Database Username}/${Database Password}#${Database Host}:${Database Port}/${DatabaseName}'
${ETD_Day}= Execute Sql String SELECT EXTRACT(DAY FROM 'DECL_UNBTHG_DT') FROM BAS_BERTH_APPLN_MASTER WHERE ABBR_VSL_M='APL';
Input Text ${FlexiStack_Day} ${ETD_Day}
Disconnect From Database
However when I am running for testing, this error showed up when trying to execute the sql string.
DatabaseError: ORA-00911: invalid character
I have tried to run the SQL statement in SQL developer and it works. May I know what is the issue here?
Related
I have SQL Server 2014 installed on my PC, working on a same project in my company, a worker send me a database to import.
I followed the steps described here, but I get this error :
Error 0xc002f210: Preparation SQL Task 1: Executing the query "CREATE TABLE [dbo].[~TMPCLP14521] (
[Champ1] nvar..." failed with the following error: "Culture is not supported.
Parameter name: culture
3072 (0x0c00) is an invalid culture identifier.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
What is wrong?
Solved , after reading this issue i found that in order to make the import work ,apparently ,the sqlserver and the system should have the same language format ;
My Sql Server is in french ,my windows was in english format changing it to french format in setting>region>region format solved my problem.
We are getting below error msg in the pop-up windows, when trying to view the generated XML in SSMS - Sql Server.
Microsoft SQL Server Management Studio
Unable to show XML. The following error happened: Unexpected end of
file while parsing Name has occurred. Line 1, position 2097154.
You will not be able to fix this beyond what SSMS can support when it comes to viewing the XML data in SSMS. I would suggest any of the following resolutions:
Change the parameters of what is pushing that XML data into your server so that the overall size can be limited. For example, if this XML data contains all values for a data point for the past year, perhaps break it up into quarters instead and push them separately into the server.
Export the data instead of trying to view it in SSMS.
I am working on an ssis package to process data from text file into as400 system. In one of the steps, i have to create a copy of an existing file object in iseries and i am executing the below command from execute sql task.
{CALL QSYS.QCMDEXC('CRTDUPOBJ OBJ(CKFMTWRK) FROMLIB(MYWRKLIB) OBJTYPE(*FILE) TOLIB(MYWRKLIB) NEWOBJ(CKFMTWRKPN) DATA(*NO)',0000000101.00000)}
This command works fine when i run it from the IBM Personal Communications terminal but throws below error when i do it from SSIS package.
[Execute SQL Task] Error: Executing the query "CALL QSYS.QCMDEXC('CRTDUPOBJ OBJ(CKFMTWRK) FROMLIB..." failed with the following error: "Routine *N in *N not found with specified parameters. SQLSTATE: 42884, SQLCODE: -440". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Further information on my environment:
I'm using sql server data tools 2015.
I've established the connection to as400 using Microsoft OLEDB provider for DB2.
I have sufficient permissions on the server (i guess, coz i am able to execute the commands from the terminal)
This is my first ever with as400 and I am stuck here in this step. I tried looking up online but there is nothing much that could help me in resolving this.
Any suggestions/help on this would be much appreciated.
Thanks.
Dvr
You are trying to perform AS/400 OS level command from a SQL environment (SSIS) which is not correct. QCMDEXEC is AS/400 command line interpreter while CRTDUPOBJ is creation of an identical object from the source with the option to duplicate its data as well.
Personal Communication terminal is fine cos you think you are using SQL service but actually not. It's AS400 command.
End up, you better do it over AS/400 terminal for duplicating object. Just use
CRTDUPOBJ OBJ(CKFMTWRK) FROMLIB(MYWRKLIB) OBJTYPE(*FILE) TOLIB(MYWRKLIB) NEWOBJ(CKFMTWRKPN) DATA(*NO)
The last keyword DATA(*NO) means create the object only but not the data, so you will get an empty file after completion.
I am having a weird error.
My task is to import data from Oracle 11g to MS Access (Legacy VBA-Code with a lot of business logic) which is then shipped to MS SQL Server as our new backend via the integrated ODBC-Provider.
The VBA-import works fine until I encounter fields with only space-characters in it which causes the following error in the line rst.Update:
run-time error -2147217887(80040e21), ODBC-call failed
The field (Birthplace) is not mandatory, there are many null-entries or entries with spaces inbetween (New York). The error only occurs when there is nothing in the field except spaces.
The spaces are of the form Chr(32) which is equal to normal space on the keyboard which shouldn't be a problem
When working with an Access frontend/backend, there is no problem with the fields, but when saved to the SQL Server backend, the ODBC Error occurs.
Thanks for your help
I am trying to import Oracle data to SQL Server and keep getting an error telling me that it cannot convert between unicode and non-unicode string data types but the SSIS package works when I run it initially.
I am dropping the table (which is completing successfully) at the beginning of the job, but when the proxy trys to start inserting the data into the new table it creates it fails...
I am using a proxy and /DECRYPT with the password and that part seems to be working fine it is just not wanting to accept the field formats...