ssis oledb source, as400 parameter not found - ssis

I'm using ssis 2008 and I'm trying to get data from an as400 database.
I have a Data Flow Task, and inside it, I have an Oledb Source and in there, I have Data access mode to Sql Command, and I have a query:
select *
from table1
where name = ?
Then i click on the Parameters button and set "name1" for the name of my parameter.
When i ran the ssis, i got error:
Error: The SQL command requires a parameter named ""00001"", which is
not found in the parameter mapping.
So I changed the parameter name to ""00001"" and the ssis worked fine.
Now, the problem is that this same ssis needed to be ran on another as400 server, and older one, and when it ran it showed error:
Error: The SQL command requires a parameter named "", which is
not found in the parameter mapping.
So, now the other server requires a different parameter name.
Is there another way of doing this process using something different than Oledb Source in order to avoid the problem?
What can I do?

We are using sql 2012 and a as400 system and we use a ODBC source for the as400. For our setup it seems to be working. So try the ODBC.

Well, this seems to be an as400 bug, as seen here : [link]http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/5d6ef4f9-1a67-45d1-8a49-eb08becf1408/
On that thread a user says: "This bug is directly related to IBMDA400 from IBM Client Access Tools. There is a bug with the driver passing a parameter to the AS/400. I have proved this out using a third party driver from HiT Software. Passing 00001 is correct using their drivers."
So as I see, it wont matter the method you use, what's need to be done in order to get it working is to pass the parameter with name that AS400 requires. If the parameter with the correct name is passed then the query will work correctly.

Related

Parameter Value: "Get values from a query" not working on host

I'm having problems when using the option "Get values from a query" in my Parameter settings.
On the server everything works like a charm.
But when I deploy and then launch the report on my hosting, I get an error message:
If I use the option: "None", then everything works fine.
I've placed a test Tablix, to see the result of the dataset on the host, and also this causes no problem.
So the issue is only with the "Get values from a query" section AND only on the hosting.
Anybody got an idea?
EDIT: I turned EnableRemoteErrors on, as requested by the errormessage, but no additional info is given.
The detail of the error is in the SSRS log file located at -->
<SSSRS_INSTALL_DIR>\Report Server\Log Files.
That is where I would go. Based how you describe the dataset driving the parameters works but not when given a value then I would expect this to be a parameter mismatch or missing parameter. Make sure that you are feeding the dataset the parameters you think you are. Also, if you don't allow nulls then make sure you are supplying a default value.
You said, you placed a tablix on the report showing the results of the YearsDOW dataset and this fails. If this also fails when you set your available values to 'None' then we can assume, as the error states, that the issue was with executing the query itself, not your report design.
As this seems to work when you run it from your local machine in development but fails when run from the server I would suspect it's an authentication/permissions issue.
Check the credentials on the datasource in your development environment and compare these to the SSRS server's version of the datasource. Remember, by default datasources do not get overwritten so it maybe that you deployed the datasource initially with one set of credentials then then changed them in your development environment.
If this is the case and the datasource is not used for other reports on the server, then you can either change the project properties to overwrite datasources but personally I prefer to delete the datasource from the server and then redeploy, that way future changes won't affect the servers version unintentionally.
If the datasource is used in other reports without problems then you could just rename the datasource to something unique so it will get redeployed under the new name and your report will point to that new version.

Unusual Message Source Name in SSIS standard Report

Usually, in a dtsx Standard Report, there is a column "Message Source Name" that indicates which dtsx threw the error or raised the event.
Now i get "Transact-SQL stored procedure" and of course I don't have such a dtsx.
So, question #1 is: Where should I go to check the error?
Besides, the error is: An error occurred while setting the value of a property "InitialCatalog". The error returned is 0x80020009. The connection string components cannot contain unquoted semicolons....
My dtsx were doing fine and I was publishing dtsx on a regular basis with no problems. Then, I changed the name of a ConnectionManager and took care of changing this name wherever it appeared.
After this fateful move, I cannot manage to restore the previous situation. Even rollbacking all changes through TFS and going back to the previous names doesn't solve the matter.
I checked also the environment I am using and the configuration of the job that launches the dtsx, to no avail.
If I execute the dtsx on my development machine, from visual studio, it works fine. The problem arises in production enviroment when I use the job configured with the environment. In the project configuration and in the environment configuration I don't see what an "unquoted semicolumn" could be.
The value of the connection string that is indicated as having an error looks like:
Data Source=11.1.1.11,1111;Initial Catalog=MyDB;Provider=SQLNCLI11.1; Integrated Security=SSPI ;Auto Translate=False;
Question #2 is: Where could this connection string with unquoted semicolon be?
Thx.
With much effort I managed to find an answer to Question #2:
I am using parametrized connection managers, so I have a project parameter (let's call it PP1) in my dtsx with the connString.
During configuration of the SSIS project I need to give a value ONLY for the parameter PP1, and NOT for the connection string.
What I did wrong was to give the Environment Variable with the connString to the Property "Initial Catalog". Therefore, SSIS was lamenting of the presence of ";" (the ones in the connString) in the InitialCatalog.

SSIS: Unable to retrieve column information from the data source.

I know there is similar question, but it didn`t helped me.
When I execute a package data flow task fails with the error:
"Unable to retrieve column information from the data source. Make sure your target table in the database is available."
I refreshed the source component, the destination components also. The table do exist in database. I tried with setting some parameters like "Always Use Default Code Page" to true but didn`t helped.
Connections are also ok.
Any idea?
Sounds like a permissions issue. Try, running Visual Studio as administrator or if that doesn't work, make sure your Windows Account has access to the data you require in SQL Server.

Report showing 'The definition of the report is invalid' in SSDT 2015

I have a SSRS 2008 project with some reports, and recently we update the version, now I open the project with the SQL Server Data Tools 2015, and all is fine, I can deploy, edit, update all fine.
The problem comes when I want to create a new report, when I add a DataSet to the report, the preview tab says:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
and nothing more happens, I can't preview the report anymore.
Does anyone know if it is a issue of upgrade/open a SSRS 2008 solution with SSDT 2015?
After some research... I couldn't find anything.
So I tried to create the report in Reporting Services 2008, and when trying to preview the report after adding a DataSet it show me the same error:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
But now, it has an aditional line:
The shared dataset definition is not valid. details the required
attribute 'name' is missing
And after enter the first search result in Google, it looks like the problem was that my DataSet was a Shared DataSet, JoannaK found the same problem and also found a workaround:
Found a workaround for now: Create the data set as embedded> Convert
to Shared Data set Looks like the Name property is set when you start
with embedded. report runs and can data sets can be uploaded to the
report server
This solves my problem. Hope it helps someone in the future.
Source: JoannaK from SQL Server Data Tools Preview update for April 2016
SSDT is generating a broken dataset definition. To fix it:
Open up the shared dataset's .rsd file in a text editor.
In the xml therein find the <DataSet> opening tag.
Add the attribute Name (case-sensitive) to that tag, e.g: <DataSet Name="SomeDataSet">
Probably should set the Name to be the same as the filename but doesn't seem to make any difference as far as I can see.
Thanks to the existing answer as without that I never would have got it to work at all.
VS2015 / SSRS2012
I experienced similar error. It mostly occurs as of change in 'SHARED DATASET'.
Check for query fields in 'Shared Database Properties', if no fields are there , simply add fields you have included in your query.
Check for database connection
Check for 'Stored Procedure' and it's result if you have used stored procedure.
One can delete old dataset and re-create with same name.
As a last option, one can create 'New Dataset' (another one) and bind the new one with the report(take care to map all fields again once you choose to create new dataset.

SSIS dBase data source - "Opening a rowset for "x" failed. Check that the object exists in the database"

I'm trying to load some data from a dBase file with SSIS. I've never worked with dBase.
The files are created by a third party application.
The database contains one table, C:\dbf\exceptions.dbf
In SSIS, I've created a Microsoft Jet 4.0 OLE DB Provider, put in C:\dbf as the file name, put in dBASE III for the extended properties (the first byte of the file is 0x03 which indicates III accoring to this). The connection tests fine.
I then try to add an OLE DB source, using that connection manager. When I click on the Name of the table or the view: dropdown, it correctly populates Exceptions as the only table. If I select it and hit preview, I get
Exception from HRESULT: 0xC02020E8
Error at ETL Exceptions [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
Error at ETL Exceptions [OLE DB Source [1]]: Opening a rowset for "exceptions" failed. Check that the object exists in the database.
I can open the exceptions.dbf file in DBF Viewer 2000 without any issue.
As far as I know there aren't any credentials that need to be entered (DBF Viewer 2000 doesn't ask for any, and I can update rows without issue), but the connection manager insists on filling in Admin for the username.
Update: according to DBF Viewer 2000, the file type is FoxBase+/dBASE III PLUSE, no memo
Update 2 I tried opening some of the other tables the application generates. Some open, some give that error.
I've found a workaround. By changing the provider to Microsoft OLE DB Provider for Visual FoxPro, entering the directory path, and leaving everything else default, I can now open the table. I now get the warning:
The component reported the following warnings:
Warning at {FBAE0F44-DE41-4862-8C53-228C63D87A01} [OLE DB Source [1]]: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.
Choose OK if you want to continue with the operation.
Choose Cancel if you want to stop the operation.
Which is perfectly acceptable since we're all about the 1252.
I had the same issue in one of my projects, and I found if your file name is more than 8 characters without extension then you get this error, change your fine name to shorter name and it will work fine.
This error comes when we have a different excel work sheet name in the open set(when you select that excel input component -> properties -> bottom end open set will come). Please check that name from excel work sheet name. if it is having spaces then it is different.
Hence, we have to create that excel connection manager again and remap it to the database component.
Thanks!