SPSS ODBC Strange Column Value Repeating With DataReader Source
Hello,
I am having an issue when attempting to retrieve data from SPSS via a ADO.NETDBC Connection
using the DataReader source. What seems to be occurring is that the DataReader is reading a column that
has a length of 255 and what it is doing is taking the first 200 characters and starts repeating the
characters starting at character 201, in this way erasing any data held in positions 201 to 255.
Another way of saying this:
This statement returns data in the results but I have noticed the data is incorrect. It seems to only
be selecting the initial 200 characters of the 255 in the field. Then it starts to repeat the
first 200 characters again to complete the full selection of the 255 characters
Here is an example:
Instead of:
€œXXXXX changed my life before it got worse. It was very informative. They gave me the information. They left it up to me to ponder over it and make the decision on what I wanted to do. It informed me on what drugs do to your body and mind. I was stress€?
I end up getting:
€œXXXXX changed my life before it got worse. It was very informative. They gave me the information. They left it up to me to ponder over it and make the decision on what I wanted to do. It informed XXXXX changed my life before it got worse. It was very€?
Source Column Datatype that SSIS can see is of Unicode string [DT_WSTR] type. Also it correctly identifies
the length is 255 in both the External Column, and Output Column section.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
SSIS Datareader ODBC Source Error
I am trying to import data from an ODBC source using the Datareader but have come accross a problem, can anyone help? Whenever I try to do a 'SELECT * FROM sometable' I get the following error: Error at Data Flow Task [DTS.Pipeline]: The output column "notes" (521) has a length that is not valid. The length must be betewwn 0 and 4000 Most of the tables we require have this field. Is there any way to by pass this error and import the field as DT_WSTR type and convert to DT_NTEXT? Our original DTS package (2000) worked well but we would like to move forward. Thanks in advance. John
View Replies !
View Related
DataReader Source And ODBC Connection To PostgresSQL
Hi, I am trying to use the DataReader Source to import a table from a PostgresSQL database into a new table in SQL 2005 database. It works for all tables except one, which has over 80,000 records with long text columns. When I limit the import to fraction of records (3,000 to 4,000 records) it works fine but when I try to get all it generates the following errors: Source: DataReader using ADO.NET and ODBC driver to access PostgresSQL table Destination: OLE DB Destination - new table in SQL 2005 (BTW - successful import with DTS packagein SQL 2000) ---Errors Error: 0x80070050 at Import File, DTS.Pipeline: The file exists. Error: 0xC0048019 at Import File, DTS.Pipeline: The buffer manager could not get a temporary file name. The call to GetTempFileName failed. Error: 0xC0048013 at Import File, DTS.Pipeline: The buffer manager could not create a temporary file on the path "C:Documents and SettingsmichaelshLocal SettingsTemp". The path will not be considered for temporary storage again. Error: 0xC0047070 at Import File, DTS.Pipeline: The buffer manager cannot create a file to spool a long object on the directories named in the BLOBTempStoragePath property. Either an incorrect file name was provided, or there are no permissions. Error: 0xC0209029 at Import File, DataReader Source - Articles [1]: The "component "DataReader Source - Articles" (1)" failed because error code 0x80004005 occurred, and the error row disposition on "output column "probsumm" (1639)" specifies failure on error. An error occurred on the specified object of the specified component. Error: 0xC02090F5 at Import File, DataReader Source - Articles [1]: The component "DataReader Source - Articles" (1) was unable to process the data. Error: 0xC0047038 at Import File, DTS.Pipeline: The PrimeOutput method on component "DataReader Source - Articles" (1) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. ---End Any idea why it can't create a temp file or why it complains about the "The File exists", which file, where, etc. Any help or alternative suggestions are greatly appreciated. What I am missing or doing wrong here? Best, Michael Sh
View Replies !
View Related
DataReader With ODBC As Source Using A User Variable In The Sqlcommand
Does anyone know how I can use a user variable in a sqlcommand in a Datareader source with an ODBC connection as the source? I am storing a date value in a user variable(Date) I fill with a SQL Task and then want to use the value in the sqlcommand I use in the Datareader Source. It won't let me use the @variablename in the sql command. Can anyone help with some advice on how I can make this work? Appreciate any help I can get. Thank you
View Replies !
View Related
Datareader Source Connects To No Longer Existing ODBC-link
I am connecting to a MsAccess-database using ODBC. While developing the package we have changed mappings for this database. The ODBC was changed accordingly and the old definitions were deleted. However SSIS is still using the old ODBC-links even when deleting all existing connections and adding a new connection. Somehow the old settings have been saved and are being reused in the DataReader Source. If so where are they saved and how can I change/delete them ???? Note: I suspect the Server Explorer because every time I add a data connection using the ODBC, the Datareader Source starts using the wrong definition (even when Server Explorer uses the correct one).
View Replies !
View Related
DataReader Source And Column Types
Is there a way to control the types for output columns of a DataReader Source? It appears that any System.String will always come out as DT_WSTR. As I have my own managed provider, and I know what went in, I can say that really it should be DT_STR. The GetSchemaTable call from my provider will always say System.String as it does not have much choice, but GetSchemaTable does contain a ProviderType which is different for my DT_STR vs DT_WSTR, or rather when I want each. I think something like MappingFiles as used by the Wizard would work, but can I do anything today?
View Replies !
View Related
Weird!! &&"&&<&&" Sign Doesn't Work Within DataReader Source Connecting To Mysql Using ADO.NET ODBC Option
my package contains Two connections ==> one is using OLEDB connecting to SQL server 2005 and the other using ADO.NET's ODBC option to connect to mysql; Two "Execute SQL Task" ==> one gets maximum ID(bigint) from a SQL server table and the other gets the maximum ID(unsigned) from a mysql's table and bind them to two variables ID1(string) and ID2 (int 64). http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1902297&SiteID=17&mode=1 ; And one DataFlow whose data source is DataReader Source which queries mysql "select * from table where ID > cast(@ID1 as signed) and ID <= cast(@ID2 as signed) ". To debug, I put a DataViewer between Data Flow Source and Data Flow Destination. Run the package, I found no data coming into DataViewer and no error message as well. However if I remove the "<=" sign and change the DataReader Source query to "select * from table where ID > cast(@ID1 as signed)", It works perfectly. Initially I thought it's variable @ID2's issue. But if I replace "<=" sign with ">=" sign in the query ==> "select * from table where ID >= (cast(@ID2 as signed) -100)", there is no problem. After tried many times, I found that query just doesn't work with "<" sign or "between". Plus the result of running package tells it's successful but just no records got inserted into Data Flow Destination. Anyone could help? Thanks!
View Replies !
View Related
Datareader Destination As Source For Other Datareader Source ?
HI! as far as I know from docs and forum datareader is for .NET data in memory. So if a use a complex dataflow to build up some data and want to use this in other dataflow componens - could i use data datareader source in the fist dataflow and then use a datareader souce in the second dataflow do read the inmemoty data from fist transform to do fursther cals ? how to pass in memory data from one dataflow to the next one (i do not want to rebuild the logic in each dataflow to build up data data ? Is there a way to do this ? and is the datareader the proper component ? (because its the one and only inmemory i guess, utherwise i need to write to temp table and read from temp table in next step) (I have only found examples fro .NET VB or C# programms to read a datareader, but how to do this in SSIS directly in the next dataflow? THANKS, HANNES
View Replies !
View Related
DataReader Source Output Help
I have configured my DataReader to use an ADO.net (ODBC) connectivity (entered Select * from AMPFM) in Sqlcommand and can see my database columns listed in the Advanced Editor / Column mappings window. My process needs to perform a straight column to column population from AMPFM table into my dbo.visitfinancials table. How do I point the output to the above table?
View Replies !
View Related
Run Variable In DataReader Source?
Hi all, I am trying to have a DataReader Source that can run a variable which I used to store the SQL statement. For example, I have: Variable #1 Variable name: tablename Data Type: string Value: "name_of_table" Variable #2 Variable name: sql_stmt Data Type: string Value: "SELECT * FROM " + @tablename I want to use DataReader Source to run Variable #2 in the SqlCommand that connects to an ODBC connection. If it is possible by any way, please let me know. Thanks in advance. Daren
View Replies !
View Related
Expressions And Datareader Source
Greetings my SSIS friends, Apologies for asking a similar question again but I am still non the wiser with this problem! Let me explain to you my situation and the method I've adopted to try and solve it. I have some source data residing in a SQL Server 6.5 database. The source data consists of a single table. For this example I will assume that my table contains only 2 columns, an ID column called result_ID and a Result_Name. The idea is to retrieve new data each time the package is run. We will know this because the result_IDs in the source table will be greater than the maximum result_ID in my destination table . The way the package should work is like this : 1) Retrieve maximum result_ID from destination table 2) retrieve data from source table where result_ID > maximum result_ID from destination table. My package consists of a 1) SQL Query Task which retrieves the maximum result_ID and places it in a user variable (type Int32). 2) A Data flow task with a Datareader source adapter which uses an expression to retrieve the data. My expression looks like this : "select * from result where result_id > " + (dt_str, 10, 1252) @[User::max_result_id] When I run my package the first time all the rows are retrieved (as my destination table is empty to begin with). BUT when I run it the second time the same thing happens again!! All rows are retrieved. I placed a breakpoint at the point where the variable gets populated with the maximum result_ID and true enough, the variable gets populated with the correct result_ID BUT then that variable gets reset to 0 in my expression! This problem is driving me crazy! Has anybody out there experienced this kind of problem before?! What are the ways to solve it?! Thanks for your help in advance.
View Replies !
View Related
DataReader Source Can Not Configurate
when I configurate the datareader source using the ODBC connection manager. it show the follow error message: "Error at Data Flow Task[DataReader Source [562]]: Cannot acquire a managed connection from the run-time connection manager" this ODBC is connect to IBM DB2. Can anyone help on this?
View Replies !
View Related
Error On DataReader Source
I have a problem with DataReaderSource. I'm trying to get data from Notes table. I created a Connection manager and the connection was successful. The SQLCommand in "Component properties" tab is a simple "select * from <table_name>". When I switch to the "Column mappings" tab, only the first column from the table is displayed. Pressing the "Reftesh" button resulst in the following error: Error at Data Flow Task {DTS.Pipeline]: The "output column <column_name> has a length that is not valid. The length must be between 0 and 4000. When I go to the "Input and Output Properties" tab, the DataType for the output column is not populated and the error message "Error in Data Flow Task [DTS.Pipeline]: The output column <column_name> had an invalid datatype (0) set." The DataType property is not populated at all. Changing the data type to DT_STR results in error: "Property value is not valid". Details: Error at Data Flow Task [DataReader Source]: The data type of output columns on the component "DataReader Source" cannot be changed". I read on a previous post to explicitly convert field , and tried to explicitly covnert the dataype on the field in my query (ex. select convert(varchar(50) from fieldname) It then gives foll err: ERROR [42000] [Lotus][ODBC Lotus Notes]Incorect syntax near ',' [Lotus][ODBC Lotus Notes]Name, constant or expression expected. Any idea on how to resolve this?
View Replies !
View Related
MDX OLEDB Source Vs Datareader
Hi, I am running an MDX query in SSIS but I don't know what is the best way of doing this, performance wise. I know I can run the MDX query through an openquery in the OLEDB, and also run it through a Datareader, no openquery needed. I know the datareader is slower in a normal basis due to .Net, but in this case the OLEDB is running an open query to a linked server which won't be fast like running a regular SQL. If anyone knows which of this two run faster in this scenario I'll appretiate if you let me know.
View Replies !
View Related
Using Parameters With DataReader Source
Hello, I have a DataReader souce configured to an ADO.NET connection manager that uses a .NET ODBC Data Provider. The DSN configured in the connection manager uses the IBM DB2 ODBC Driver. I have a package variable, the value of which I want to use in the WHERE clause of the query contained in the Data Reader source. The query is as follows: SELECT T1."IRK_ACCT_CD", T1."IRK_COMPANY_NBR", T1."IRK_ACCT_NAME", T1."IRK_ADDRESS_1", T1."IRK_ADDRESS_2", T1."IRK_ADDRESS_3", T1."IRK_STATE_CD", T1."IRK_POSTAL_CD", T1."IRK_AR_TYPE", T2."RK502_ITEM_RE_NO", T2."RK502_TRANS_CD", T2."RK502_TRANS_TYPE", T2."RK502_ITEM_AMT", T2."RK502_ITEM_DT", T2."RK502_PURCH_ORD_NO", T2."RK502_GL_EFF" FROM "CBDBOW"."IRK_RECORD" T1, "CBDBOW"."RK502_OPEN_ITEMS" T2 WHERE T1."IRK_COMPANY_NBR" = T2."RK502_COMP_NO" AND T1."IRK_ACCT_NUMBER" = T2."RK502_ACCT_NO" AND T2."RK502_ITEM_DT" < ? I'm not very sure as to how to map the package variable this way. I think for ODBC parameters, I need to represent the parameter with a question mark. What else do I need to do to set this up? Thank you for your help! cdun2
View Replies !
View Related
Datareader Source Error
I get an error at the end of a 47 million row job when I use the datareader source. It goes through all the records and then the package fails. The error (DataReader Source [1]] Error: System.NullReferenceException: Object reference not set to an instance of an object. ) occurs at the datareader source. I suspect it's because my record set returns a null value at some point. Any ideas?
View Replies !
View Related
DataReader ODBC Query Timeout
Hello ! I get in my SSIS Package a Query Timeout in the Datareader! I Use the ADO.Net OBC Connection with the Connection String: Dsn=xxx;uid=xxx;connection timeout=0;command timeout=0;query timeout=0 Is there any Option to set the Query Timeout ? Thanks ! Pseudo
View Replies !
View Related
SSIS Error On DataReader Source
I have a package that runs every hour. It runs fine most of the time but once in a while I get this not very helpful error message "the component 'xyz' is unable to process data" on DataReader Source component. when i try to run it again on the same data it works fine. So i dont think it has to do with data. Is there a way i can get more information on this error?
View Replies !
View Related
How To Configure DataReader Source For DataFlow
Dear Friends, I have to import dBASE files to SQL Server. For this I have created one ODBC connection manager for those dBASE files. This I have to set for DataReader Source. But I am unable to configure the DataReader Source. So, Please tell me how to configure DataReader Source for ODBC connection Manager. Eagerly waiting for your valuable reply............ Santosh INDIA
View Replies !
View Related
Pass Variable Value To DataReader Source
Dear All, I have created a DTS Package in Integration Services 2005. Within the DTS Package declared a variable named xxx and passed a value 1234. In the control flow i dropped a Data flow task and in the Property Expression Editor of DataFlow Task i defined Property = [DataReader Source].[sqlCommand] Expression = Variable name. Now in the DataFlow Task Canvas dropped DataReaderSource. How can i pass variable value to the SQLCommand ="Select * from table where name = Variable value. regards Sufian
View Replies !
View Related
Error When Changing The Length On DataReader Source
Hi, I am trying to import data from Oracle RDB into SQL Server 2005 using SSIS. Created a ODBC data source to connect to Oracle and used DataReader Source component and ADO.net to connect to the ODBC data source. Under the Component properties tab, the SQL Command looks something like this. Select ID, ADDRESS, REVISED from ADDRESS The data type for the source columns are Integer, Varchar(30) and DATE VMS. Now when I look at the Input and Output properties window, The External columns has the following data types. ID - four-byte signed integer [DT_I4] ADDRESS - Unicode string [DT_WSTR], length = 0 REVISED - database timestamp [DT_DBTIMESTAMP] The Output columns has the following data types ID - four-byte signed integer [DT_I4] ADDRESS - Unicode string [DT_WSTR], length = 0 REVISED - database timestamp [DT_DBTIMESTAMP] When I tried to change the length of the ADDRESS on the output column, I get the following error. Error at Data Flow Task [DataReader Source [1]]: The data type of output columns on the component "DataReader Source" (1) cannot be changed. Error at Data Flow Task [DataReader Source [1]]: System.Runtime.InteropServices.COMException (0xC020837D) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.SetOutputColumnDataTypeProperties(Int32 iOutputID, Int32 iOutputColumnID, DataType eDataType, Int32 iLength, Int32 iPrecision, Int32 iScale, Int32 iCodePage) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostSetOutputColumnDataTypeProperties(IDTSManagedComponentWrapper90 wrapper, Int32 iOutputID, Int32 iOutputColumnID, DataType eDataType, Int32 iLength, Int32 iPrecision, Int32 iScale, Int32 iCodePage) Is this the default length for the Unicode string type. I was not able to load the ADDRESS column as it gets truncated before I load it into destination. Even if I use Derived or Data Conversion transformation, the ADDRESS is getting truncated before it reaches this transformation. Any thoughts. Thanks, SK
View Replies !
View Related
Datatype Migration Problem Using DataReader Source
I am trying to migrate data from MySQL 5.0 to SQL Server 2005. The MySQL database has a table which stores the profile description in different languages like (Arabic, Spanish etc). I use MySQL ODBC 5.1 driver for creating the ODBC connection and creating a ADO connection in SSIS using that ODBC. The datareader source connection is set to this ADO connection. When I view the properties of columns in Datareader source it shows as Unicode, which is good. But when I migrtae to SQL Server 2005 I get junk data instead of the data in Arabic, Spanish etc. Am I missing something or is there any other alternative to do the data transfer correctly?
View Replies !
View Related
Problem Determining If IDTSComponentMetaData90 Is A DataReader Source
I'm attempting to iterate package components of a package created in the SSIS designer, but have run into a problem identifying the DataReader Source managed component. For instance, if iterating the dataflow task components like so: Application app = new Application(); MainPipe pipe = taskHost.InnerObject as MainPipe; foreach (IDTSComponentMetaData90 component in pipe.ComponentMetaDataCollection) { if (component.ComponentClassID == app.PiplineComponentInfos["DataReader Source"].ID) { // THIS IS NEVER REACHED } } The ComponentClassID of the component is a GUID, but the PipelineComponentInfo.ID AND PipelineComponentInfo.CreationName are both the fully qualified assembly name of the data reader source adapter, which is: "Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter, Microsoft.SqlServer.ADONETSrc, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" From reading another post i attempted to get the ProgID of the component from the class ID (ole32 ProgIDfromCLSID) but that only yields a ProgID of DTS.ManagedComponentWrapper.1 How can I properly identify this type of dataflow component? I am running SQL Server SP2 (Developer Edition) on XP Pro SP2.
View Replies !
View Related
Advanced Editor For DataReader Source / SQLServer 2005
I want to import data from a remote MySql Database So, I created an New Connection (ADO.Net), connection Test is successful but when I try to set the sql string in the advanced editor i get the following error: Error at Data Flow Task [DataReader Source [2182]]: System.Data.Odbc.OdbcExeption: ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a] ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a] ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a] ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a] ...... bei System.Data.Odbc.OdbcDataReader.NextResult(Boolean.disposing, Boolean allresults) bei System.Data.Odbc.OdbcDataReader.Close(Boolean Disposing) bei System.Data.Odbc.OdbcDataReader.Close() bei Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.ReinitializeMetaData() bei Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.ReinitializeMetaData(IDTSManagedComponentWrapper90 wrapper) the sql string is very simple, this should not be the problem: SELECT Objektnr FROM m02a_tblObjektstamm Thank you very much for your support Martin
View Replies !
View Related
Can't Assign Connection Manager Object To DataReader Source
I'm trying to create a DataReader source object using a working ADO.NET Oracle Client connection object that exists in the connection manager. Problem: When I open the editor the DataReaderSrc component shows only one row under the Connection Managers tab: Name=IDbConnection Connection Manager=blank Description=Managed connection manager I cannot assign the ADO.NET connection (or any connections). I see a warning at the bottom of the Connection Managers tab: "Not all connection managers have been set. Set all connection managers." When I click refresh the warning message changes to: "The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID." I am prevented from removing the IDbConnection or assigning my Connection Manager object to the DataReader Source. Thanks, -- Mike
View Replies !
View Related
Error Assigning Connection Mgr To Datareader Source Component
Synopsis: Attempting to create a data flow task to copy data from AS/400 (DB2) to SQL2005, using an existing System DSN ODBC connection defined on the SQL2005 host. Problem: When adding the DataReader Source component to the package, I cannot assign the Connection Manager. Designer issues the error message: "The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID." Editing the DataReaderSrc component shows only one row under the Connection Managers tab: Name=IDbConnection Connection Manager=blank Description=Managed connection manager The datareadersrc component editor displays the warning message: "Not all connection managers have been set. Set all connection managers.". Clicking the Refresh button causes the error message to be displayed "The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID." I am prevented from assigning my Connection Manager object the DataReaderSrc. The package already contains one Connect Manager object: Provider: .Net Providers/Odbc Data Provider System DSN Test Connection operation succeeds Any help would be appreciated. Fraser.
View Replies !
View Related
PrimeOutput() And NullReferenceException Problems With DataReader Source In SSIS
Hi I have an integration services script that was working ok until a recent database upgrade. When I run the script in gui debug mode it behaves as follows. The data flow reads in data from an oracle server table VALNREQ & then uses it to populate a sqlserver table (with a little manipulation of the fields in between). For some reason although it populates the destination table with the correct number of rows (& the data looks ok) it errors out with the messages listed below. The DataReader Source dataflow source box turns red & all the other boxes turn green including the destination one. I have run out of ideas ... any suggestions? Have I inadvertently changed a property without noticing? I can't see anything obvious & the input data itself looks clean enough. Any pointers in the right direction would be great, thanks. I've been thrown in at the deep end with this s/w so I imagine there are a number of large gaps in my knowledge so apologies if there is a simple solution to this. B [DataReader Source VALNREQ [1]] Error: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket) [DTS.Pipeline] Error: The PrimeOutput method on component "DataReader Source VALNREQ" (1) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
View Replies !
View Related
Repeating Groups When Group By DateTime Column...
I wirte my query as: select mydate from mytable group by mydate ordre by mydate The datatype of mydate column is DateTime. The result is showing me same repeating groups e.g. 2/27/2008 12:00:00 AM 2/27/2008 12:00:00 AM 2/27/2008 12:00:00 AM Please help so that my query can give me unique groups. Regards, Professor Corrie.
View Replies !
View Related
Passing A Table Programmatically To Datareader Source Component In Ssis
Hi There, I am loading/executing packages from c# and I need to populate a temp table from user input and pass this table as a variable to the datareader source components sql command. I am using expression to build this query, but I am getting design time error when I have this command.. "select id, (SysDate + 28) as ExpiresDate from Table1 where id in (Select Id from" +@[User::Table2]+")".. I have declared Table2 as a variable of type Object and I am creating Table2 in C# and I am assigning that Table to the user Table. But in the design mode, I am getting an error...expression cannot be evaluated. Can anybody please tell me when I cannot do this? Thanks,
View Replies !
View Related
DataReader Source Freezes In Validation Of MySQL Stored Procedure
I have a package that hangs in the designer after I change the sql statement in a DataReader Source from a 'select' to a 'call stored procedure'. The stored procedure takes 2 date parameters. I use an expression to build the 'call stored proc' statement and the 2 date strings. The data reader source uses an ADO.Net connection manager. The ADO.Net connection manager uses the provider for MySQL (Connector/.Net 5.1) which I installed from MySQL.com (http://dev.mysql.com/downloads/connector/net/5.1.html). Before creating the stored procedure I had been using an expression to build a 'select' statement with two date variables as follows: select ... where ads.last_seen >= "" + (DT_STR,10,1252) Year(@[User:: StartDate] ) + "-" + (DT_STR,10,1252) Month(@[User:: StartDate] ) + "-" + (DT_STR,10,1252) Day(@[User:: StartDate] ) + "" and ads.first_seen <= "" + (DT_STR,10,1252) Year(@[User::EndDate] ) + "-" + (DT_STR,10,1252) Month(@[User::EndDate] ) + "-" + (DT_STR,10,1252) Day(@[User::EndDate] )+ "" group by sm.service_provider_id,lm.location_id,lm.web_sublocation_id;" The sql for the data reader source is set via the sql command property of the data flow component. After testing the sql, I created a stored proc from this sql and then changed the expression (using the sql command property of the the data flow component) to build the 'call stored proc' statement, like this. "call usp_SEL_Rollup ("" + (DT_STR,10,1252) Year(@[User:: StartDate] ) + "-" + (DT_STR,10,1252) Month(@[User:: StartDate] ) + "-" + (DT_STR,10,1252) Day(@[User:: StartDate] ) + "","" +(DT_STR,10,1252) Year(@[User::EndDate] ) + "-" + (DT_STR,10,1252) Month(@[User::EndDate] ) + "-" + (DT_STR,10,1252) Day(@[User::EndDate] ) +"");" then when I tried to switch to the data flow tab, the editor froze, with the status bar saying "validating datareader source". The data flow tab says "Loading...". I don't know how to troubleshoot this. Each time I have tried I have had to kill the application. Any ideas/suggestions? Thanks, Al
View Replies !
View Related
DataReader Source Error - Cannot Change The Datatype, Precision Or Scale In The Output Columns
I have a data source that I access via odbc in a DataReader Source component in SSIS. I can access the data fine. However, I am having problems with certain fields that are numeric (specifically home prices ranging from 100,000.00 to 99,999,999.00). In the advanced editor for my data reader source under the input and output properties tab, in data reader output under the external columns and output columns, these fields for some reason default to numeric data types with a precision of 4 and a scale of zero, not large enough to hold the data that is coming in. This causes errors that make the data come in as null (after i specify to ignore the errors). I can change the precision and scale to 18 and 4 in the external columns, but when I try to change the datatype, precision or scale in the output columns I get the following message: Property Value is not valid. The details are: Error at Import DataReader Source: The data type of output columns on the component "DataReader Source" cannot be changed. Error at DataReader Source: System.Runtime.InteropServices.COMException (0xC020837D) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.SetOutputColumnDataTypeProperties(Int32 iOutputID, Int32 iOutputColumnID, DataType eDataType, Int32 iLength, Int32 iPrecision, Int32 iScale, Int32 iCodePage) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostSetOutputColumnDataTypeProperties(IDTSManagedComponentWrapper90 wrapper, Int32 iOutputID, Int32 iOutputColumnID, DataType eDataType, Int32 iLength, Int32 iPrecision, Int32 iScale, Int32 iCodePage) Any help is greatly appreciated. Dave
View Replies !
View Related
MS OLE DB For ODBC With Oracle ODBC Source Headaches
Hi all,I am having trouble getting linked Oracle 9 server in MS SQL Server2005 Express to work properly. My machine is running Windows XP.The Microsoft and Oracle OLE DB Providers have problems dealing withOracle's Numeric Data Type, so I decided to use Microsoft's OLE DB forODBC Provider and an Oracle ODBC source. When using the Microsoft ODBCfor Oracle Driver in my ODBC source I have inconsistent behavior.Sometimes my queries are processed properly, then other times I get thefollowing errorOLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttrfailed".OLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttrfailed".OLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC driver for Oracle][Oracle]".Msg 7303, Level 16, State 1, Line 1Cannot initialize the data source object of OLE DB provider "MSDASQL"for linked server "ODBCBEAST".I have no idea why sometimes I can connect to the linked server with noproblems andwhy other times it performs like this. I'm not changing anything aboutthe system I can think of. When I use an Oracle client (PL/SQL) I haveabsolutely no problems connecting. TNSPING returns that the connectionis good.This is unacceptable so I decided to try my luck with the Oracle 10gODBC driver. However when I use this and perform an openquery selectagainst the linked server I get back only 11 rows, when I know that thedatabase has over 100 rows (in fact when using the Microsoft ODBCdriver and it works that's what I get). I figured maybe the buffersetting needed to be raised in the ODBC configuration so I took it from64000 to 600000 (a magnitude of 10) but I still get back only 11 rows.I'm at my wit's end.Any suggestions on resolving one or the other problem would be muchappreciated.Thanks much
View Replies !
View Related
How To Solve :Error: 0xC0047062 At CTPKPF, DataReader Source [1]: System.NullReferenceException: Object Reference Not Set To An
hi i need help to solve following error in ssis package when i aun :: Error: 0xC0047062 at CTPKPF, DataReader Source [1]: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket) Error: 0xC0047038 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (1) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. Error: 0xC0047021 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. Information: 0x40043008 at CTPKPF, DTS.Pipeline: Post Execute phase is beginning. Information: 0x40043009 at CTPKPF, DTS.Pipeline: Cleanup phase is beginning. Information: 0x4004300B at CTPKPF, DTS.Pipeline: "component "OLE DB Destination" (1993)" wrote 0 rows. Task failed: CTPKPF
View Replies !
View Related
Strange Update Performance Using ODBC
Hi All, Not sure if this question belongs in this area or the server area but I'll start here. Here is my problem. We have an C/C++ app that was originally written for SQL 2000 and uses DBLibrary. We have converted it to SQL 2005 and are using ODBC/Native client to access the SQL 2005 database. This all works great. So we were doing some performance testing and we noticed that our update performance seems slower in the SQL 2005/ODBC case than it did in the SQL 2000/DBLibrary case. Inserts and queries all perform great, in fact the inserts are significantly faster in the SQL 2005/ODBC case which is good. We are using Array inserts/updates/queries wherever possible as this is faster obviously. In our update case, it takes 1.14 seconds to update 2000 rows in table in the SQL 2005/ODBC case, while SQL 2000/DBLibrary case takes .39 seconds to the exact same thing. The table in question is a 12 column table with all integer columns, with an index on the first three columns. So my question is this. Is there something different about Array Updates in SQL 2005 ? I've looked thru the list of hot fixes available since SQL 2005 SP2 and haven't seen anything that directly mentions Updates so I'm hesitant to go off and start applying the hot fixes to our server to see if the behavior changes. It seems strange to me that Array Inserts would be very fast, but Updates wouldn't be. I've checked the ODBC Data Source and we aren't doing anything fancy there. I'm not actually even sure if this problem is client side or server side as I said earlier. If anyone has any ideas or thoughts that would be great since this is really bugging me. Here is a sample of what our C code is doing. This is simplied and I've removed a lot of our own code but these are the SQL calls that we are making in order so maybe can see something wrong I'm doing. //----Sample Code ------------------------------------------------------------------------------------- pSQL = "Update bob set VV=? where VI=?" // not done this way actually in our code but just to show the update text status = SQLPrepare ( hS, (UCHAR *)pSQL, SQL_NTS ); // Called twice with nCol = 1 and then with nCol = 2 status = SQLSetParam ( hS, abs(nCol), cType, // cType = 5 = SQL_C_LONG sqlType, // sqlType = 4 = SQL_INTEGER 38, // size needed in case the column is numeric or decimal 0, p16Data, // Pointer to my array of data NULL ); SQLSetStmtAttr(hS, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)numrows, 0); // numrows = 2000 SQLSetStmtAttr(hS, SQL_ATTR_PARAMS_PROCESSED_PTR, &p16cRows, 0); status = SQLExecute (hS); SQLParamOptions(hS, 1, NULL); SQLFreeStmt ( hS, SQL_RESET_PARAMS ); //----Sample Code ------------------------------------------------------------------------------------- Thanks, Nick
View Replies !
View Related
Strange Behaviour In XML Source Component
A colleague of mine has discovered some behaviour in the XML Source component that I am having trouble understanding or explaining. Here is the (obfuscated) XML document that we are looking to parse: <?xml version="1.0"?> <ArrayOfWellPatternAssociation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <WellPatternAssociation OfficeCode="Office ABC" PatternName="18 0500" API14="04029597380001" ActiveIndicator="I" AllocationToPattern="0.50" /> <WellPatternAssociation OfficeCode="Office ABC" PatternName="18 0500" API14="04029632710001" ActiveIndicator="I" AllocationToPattern="1.00" /> <WellPatternAssociation OfficeCode="Office ABC" PatternName="18 0500" API14="04029632910001" ActiveIndicator="I" AllocationToPattern="0.50" /> <WellPatternAssociation OfficeCode="Office ABC" PatternName="18 0500" API14="04029632930001" ActiveIndicator="I" AllocationToPattern="0.33" /> </ArrayOfWellPatternAssociation> When we use the 'Generate XSD...' button it comes up with the following schema: Code Snippet<?xml version="1.0"?> <xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://Chevron.UpstreamSolutions.Nau/CommonReferenceData/CommonReferenceData/"> <xs:element name="ArrayOfWellPatternAssociation"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="WellPatternAssociation"> <xs:complexType> <xs:attribute name="OfficeCode" type="xs:string" use="optional" /> <xs:attribute name="PatternName" type="xs:string" use="optional" /> <xs:attribute name="API14" type="xs:unsignedLong" use="optional" /> <xs:attribute name="ActiveIndicator" type="xs:string" use="optional" /> <xs:attribute name="AllocationToPattern" type="xs:decimal" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xsd:schema> I'd like to draw your attention to the bit I've highlighted in red. SSIS has incorrectly defined this attribute as an unsignedLong. if you look at the data above you'll see that it has leading zeros therefore we need it to be interpreted as a string. Unfortunately (and here's the problem) there doesn't seem to be a way for us to change the generated xsd and thus refresh the external column metadata. The only way to change it is to go into the Advanced Editor and manually change the external column and output column metadata. Is this by design? It seems very limiting if you ask me to not let us have control of what the metadata should be. If I'm missing something please let me know. Thanks Jamie
View Replies !
View Related
DataReader Output Column Length
Hello, I have an ODBC connection manager to a Progress database. In that database there is a column declared as a string of 10 characters long. However, some data in this column is actually up to 15 characters long. This makes my DataReader Source fail everytime I try to run my package because it sets the output column like this : Datatype : Unicode string [DT_WSTR] Length : 10 Is there any way to solve this without changing the datatype in the Progress database (that is beyond my control) ? tanks in advance ...
View Replies !
View Related
Strange Issure When Importing Data From ODBC
Hi, there; I have a SSIS package that importing data from ODBC source. It failed because of those long exception. To find out what causes the problem, I tried to import data by DTS package in SQL 2000. I just select small chunk of data(about 27 rows), the package gives error: The number of failing rows exceeds the maximum specified. Insert error, column 45('PrevStmtBal',DBTYPE_NUMERIC), status 12: Invalid status for bound data. Insert error, column 45(LastSTmtBal,DBTYPE_NUMERIC), status 12: Invalid status for bound data. .......: same error for other columns with same data type. But, if tried these 27 rows one by one, I can import those data without any problem! This tells me that there is no data format issue with that part of data. My ODBC source is D3. Does anybody know what the problem is? Thanks.
View Replies !
View Related
Strange Behaviour Of Data Source View
I have a fact table which is a custim query in the data source view, I process and work with the data, after somewhile I make some changes in the data source view query but all my changes does not reflect in the cube after processing the same old data returned. please help ASAP, I want to fix this issue
View Replies !
View Related
The Product Level Is Insufficient For Component &&"datareader Source&&"
I have created an SSIS On my PC, That extracts data out of Lotusnotes. When I run it manaully from Visual studion-execute package, it works just fine. However, when I go tO Management studio, chose the servername, then go to Stored Package-MSDB- And chose Packagename, and hit Run PKG from there, it gives me the error below. Server has 2005 AND IS WINDOWS 2003 OS. The product level is insufficient for component "datareader source" Can you tell me why the same pkg will work fine when executed from Visual studio-But when I go the run it from Storedpackages-MSDB-it fails.
View Replies !
View Related
DataReader Source - ERROR [42000] XML Parse Error At 162:1338: Not Well-formed (invalid Token)
Hello, I get the following error when I run my package interactively. From the logs written out by the driver, it appears that all is working well as far as connecting to the data source and pulling data. It seems as if this error occurs when the DataReader source tries to process the received data. SSIS package "MyPackage.dtsx" starting. Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning. Information: 0x40043006 at Data Flow Task, DTS.Pipeline: Prepare for Execute phase is beginning. Information: 0x40043007 at Data Flow Task, DTS.Pipeline: Pre-Execute phase is beginning. Error: 0xC0047062 at Data Flow Task, DataReader Source [1]: System.Data.Odbc.OdbcException: ERROR [42000] XML parse error at 162:1338: not well-formed (invalid token) at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PreExecute() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper90 wrapper) Error: 0xC004701A at Data Flow Task, DTS.Pipeline: component "DataReader Source" (1) failed the pre-execute phase and returned error code 0x80131937. Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning. Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "OLE DB Destination" (691)" wrote 0 rows. Task failed: Data Flow Task SSIS package "MyPackage.dtsx" finished: Success. I am not sure where to look next. Any help is much appreciated. Dave
View Replies !
View Related
How Do I Add An ODBC Connection Data Source As A Data Flow Source
I have set up a new connection as a connection from data source, but I cannot see how to use this connection to create my Data Flow Source. I have tried using an OLE DB connection, but this is painfully slow! The process of loading 10,000 rows takes 14 - 15 minutes. The same process in Access using SQL on a linked table via DSN takes 45 seconds. Have I missed something in my set up of the OLE DB source / connection? Will a DSN source be faster? Thanks in advance ADG
View Replies !
View Related
Derived Column Usage When Column Does Not Exist In Source (but Exists In Destination)
Posted - 09/10/2007 : 15:53:26 Hey all - got a problem that seems like it would be simple (and probably is : ) I'm importing a csv file into a SQL 2005 table and would like to add 2 columns that exist in the table but not in the csv file. I need these 2 columns to contain the current month and year (columns are named CM and CY respectively). How do I go about adding this data to each row during the transformation? A derived column task? Script task? None of these seem to be able to do this for me. Here's a portion of the transformation script I was using to accomplish this when we were using SQL 2000 DTS jobs: '********************************************************************** ' Visual Basic Transformation Script '************************************************************************ ' Copy each source column to the destination column Function Main() DTSDestination("CM") = Month(Now) DTSDestination("CY") = Year(Now) DTSDestination("Comments") = DTSSource("Col031") DTSDestination("Manufacturer") = DTSSource("Col030") DTSDestination("Model") = DTSSource("Col029") DTSDestination("Last Check-in Date") = DTSSource("Col028") Main = DTSTransformStat_OK End Function *********************************************************** Hopefully this question isnt answered somewhere else, but I did a quick search and came up with nothing. I've actually tried to utilize the script component and the "Row" object, but the only properties I'm given with that are the ones from the source data. thanks in advance! jm
View Replies !
View Related
Import Of SPSS-files
Hello i'm trying to find out if SSIS is a right toolbox for importing of many SPSS-files into the large market research data warehouse. A simplified version of SPSS-datasheet looks like this: - many columns (up to 3000). some of them are interview attributes (InterviewID, Date, etc.) and variables, representing survey questions - relative few rows with "cases" or "interviews" - in cells there are answers to the questions (in columns) by respondent (in rows) As first step i would like to unpivot the dataset in the following way: - Pass-Through: all interview attributes, that shouldn't be unpivoted - Input Columns: rest 2990 columns - Destination Column: Question - Pivot Key Value Column Name: Answer It works allright, except that i has to manually define destination column for all 2990 input columns, which takes a lot of time (multiplied by the number of SPSS-files i want to import). Is there a way to automate this (default value for destination column and/or scripting?) Many thanks for your help!
View Replies !
View Related
SPSS Vs. SQL Server 2005
Can anyone provide me with any insight or personal experience with the SPSS data mining product, vs. what's available in SQL Server 2005? Also, what's available in little ol' Express in terms of BI and mining? Someone has contacted me, looking to bring an existing SPSS and Excel survey data solution in-house, as their consulting statistician has passed away. They are leaning towards using SPSS because they wish to avoid getting into anything overly proprietary, to remain compatible with as many of their clients as possible. (I suppose one could always set up an SPSS/SQL Server import/export process ...) They may or may not have a Standard or better installation available via another project. They may only have Express available. I appreciate any input, thanks in advance! --Andrew
View Replies !
View Related
ODBC Data Source
I'm trying to import tables from COBOL thru Relativity client. With SQL Server 2000, I used Other (ODBC Data Source) to do this. I cannot find a comparible data source in SQL Server 2005. What do I do?
View Replies !
View Related
ODBC Data Source
I am new to SSIS packages and want to use an ODBC data source connected to an old Btrieve set of data files. I set up the ODBC DSN, and my SQL Server Data Connection, and can browse the tables in the Server Explorer. However with regards to my SSIS package, I'm not sure whether to use an OLE DB Source or Data Reader Source. I have futzed with both of them but haven't had any luck at seeing the tables. Can someone please give me some tips. Thanks, Carson
View Replies !
View Related
ODBC Data Source
I am trying to use the ADO.NET bridge to connect to an old database on RISC6000 via an ODBC connection, but I receive an error. So, I would use a script component to retrieve data directly from an ODBC connection, using a stored procedure. Any sample code ? Any idea ? Thanks
View Replies !
View Related
Merging From An Odbc Source
Hi, Im pretty new to SQL Server, but was able to create a dsn conenction to our dbf database, and then use sql script to import the table into sql server using this script below: use cameodata; /* Drop stock Table */ IF EXISTS ( SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'stock' AND TABLE_SCHEMA = 'dbo' AND TABLE_TYPE = 'BASE TABLE' ) BEGIN DROP TABLE stock END /* Import stock Table */ select * into stock from openrowset ('msdasql','dsn=stock', 'select * from stock') So basically everytime i run this script, it deletes the table in sql server and then imports the latest copy. The problem is that this table is huge and it takes a while. What Id rather have is a script that i could run that would compare the dsn connected table with the table currently on sql server and if there are any updates then update sql server, if there are items on the sql server that are not the the latest copy, then delete that record on the sql server table and also if there are new items on the lastest copy then add the new record to the sql server table. Is this possible? thanks, Anthony.
View Replies !
View Related
|