I would like to import an excel sheet to a DB table which is having around 100 columns having data type varchar.However as we know that by default excel source take unicode data type for these columns which ends in conversion error while importing to table.Is there a way except advanced editor to change the data type of all columns of excel source in one shot instead of doing for every columns one by one manually fron advanced editor.
↧
Data Type Conversion of Excel Source
↧
ForEach Loop forEXCEL File
Hi,Any sample code/steps for conversion of EXCEL file into CSV file using ForEach Loop?Thanks
↧
↧
Foreach Loop (Text Files as Flat File Source and Excel files as Excel File Destination)
Hi,I'm pretty new to SSIS. Is it possible if I already have those existing text files (a_points.txt, b_points.txt, c_points.txt) and then create those same file names in excel so they will be like this: a_points.xlsx, b_points.xlsx, c_points.xlsx and so on? I already have Foreach loop container and I placed the data flow task inside it. On the data flow, I have a dynamic flat file source connected to data conversion then derived column and finally excel destination. I also added a variable to the watch list, it successfully loops through text files and writes each output to an excel file (I also tried to make this dynamic but no success so far) but I want multiple outputs. For example, each ouput from a_points.txt flat file source will go in a_points.xlsx excel destination, the next file b_points.txt will go in b_points.xlsx...any idea? i need help...i've been struggling with this for a couple of weeks now.
↧
SSIS and dealing with embedded double quotes
Is there a way for SSIS to overlook embedded double quotes in the data so when I run my package and the "for each loop" gets executed and imports all the files in a folder into a table the columns wont shift because of the embedded double quotes?I've read about the Undouble add-on that you download from the microsoft website but I have not had any luck with the installation so I couldn't test to see if it would work. I also tried using OPENROWSET command but anything after the column with a double quote would be NULL.So basically, here's an example from the csv I'm working with:"ID","Name","City","Age","Title"1,"John "The Man, II" Doe","Gotham",30,"Villian"There are no double quotes around 1 and 30 because those are numeric fields when they were extracted into a csv file. The city, age, and title are shift one or two columns over and the name would only be "John".Does anyone have any ideas on a work around for this?
↧
SSIS unique records load and keep the duplicate records in another text file
Hi , I have been given an task to load a text file to a database which is simple but the file may contain the duplicate records which are already present in the DB table. So i want to load the correct records and keep other records which are not loaded to table in another text file.Example:text file with source data:ID,Name1,john2,maya3,amir4,nehaDatabase table:ID(primary key),name(varchar(50))101,sneha102,michael1,john4,nehaNow i want the rows in text file with ID=2,3 get loaded to database table and new text file is created with data 1,john and 4,neha...Can you please help me in this .
↧
↧
"Could not bulk load because SSIS file mapping object 'Global\DTSQLIMPORT' could not be opened. Operating system error code 5(Access is denied.).
I've created a set of SSIS packages which run fine in our test environment. The packages access a SQL server database on the local server. I can change the data source to use Windows or SQL Server authentication and both work.We've transferred the packages to another server, and again are running them against a local sql server database. Using Windows authentication they work fine, but when I change them to use SQL Server authentication they fail with :-An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Could not bulk load because SSIS file mapping object 'Global\DTSQLIMPORT ' could not be opened. Operating system error code 5(Access is denied.). Make sure you are accessing a local server via Windows security.".From the documentation I understand that the SQL Server Data Flow Destination needs permission to create Global Objects - but what needs that permission assigned? Or any other ideas how to cure the problem?
↧
SSIS Child package file locking issue
I'm calling a child package in a for each loop from the parent, the child loads data from a flat file then returns to the parent. Back inside the parent, I want to delete the file we've just loaded but I get this error... And it's doing my nut in!An error occurred with the following error message: "The process cannot access the file "c:\YourStupidFile.txt" because it is being used by another process.". I've tried putting wait times in a script task but to no avail. Any help would be awesome.Cheers
↧
Multiple Child XML Destination
Hello All,I'm having trouble trying to transform data from a basic flat file to a multiple level XML destination.I have basic Pipe delimited flat file in this format[code]contract_obj|batch_reference|transaction_narration|due_date|amount COLL COM|STO20090622|Stop Order Receipt Run|20090622|000009721.550000000 COLL VAT|STO20090622|Stop Order Receipt Run|20090622|000001361.020000000[/code]I need to produce (Segment of XML):[code]COLL COM STO20090622 Stop Order Receipt Run 2009-06-22 9721.55 COLL VAT STO20090622 Stop Order Receipt Run 2009-06-22 1361.02 [/code]Any ideas?Can SSIS do this? I'm currently using another ETL tool that can do this, but it's heavy on resources and an adminitration nightmare.Regards,Gary
↧
to rename a file by attaching datestamp at the end of filename using SSIS File task
Hi SSIS Gurus,I have a dataflow task that creates a text file and posts it in a FTP share.In need to rename the file attaching datestamp(current date of package execution) at the end of filename.For ex: My dataflowtask creates a file called 'Samplename.txt'I need to rename it to : 'Samplename20080225.txt.I think it can be done using the File task...I see an option to rename the file but not sure of how to configure the task to attach current datestamp.Suggestions and Help would be highly appreciated.Thanks,
↧
↧
Getting error trying to exe msdb.dbo.sp_send_dbmail in EXE SQL Task
Im trying to run the following in an exe sql task in ssis 2008 [code="sql"]EXEC msdb.dbo.sp_send_dbmail @recipients = 'danny.daughtery@MyEmail.com' ,@copy_recipients = 'danny.daughtery@MyEmail.com' ,@subject = 'Menu Controls (AS400LS) - Associate Menu Change' ,@body = 'html code in here' ,@body_format = 'HTML' ,@profile_name = 'WPNOA0DDPDB'[/code]But Im getting the following error. CAn someone please assist?[Execute SQL Task] Error: Executing the query "EXEC msdb.dbo.sp_send_dbmail @recipients = ? ,@c..." failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
↧
Teradata provider is not listed in the SSIS connection manager
Hi,We need to retrieve the records from teradata by using SSIS.We installed the teradata provider from the Teradata download site.After that: we tried to create the ADO.NET connection manager and select the teradata provider. but we are not able to see the Teradata provider listed in it.Could you please let us know what could be the issue and the resolution for this issue.Thanks in Advance!.Regards,Mareeswaran.6122035530
↧
Creating instances of excel file
I'm using SQL Server 2008 BI. I have an oledb source outputting data into an excel destination. I want the file to be created as different instances with the timestamp. I've created one variable called: ExceptionReportName. The value is C:\Reports\ExceptionReport.xls. The expression for that variable is: (DT_I1) (DT_WSTR, 2)Datepart("mm", GetDate()) < 10 ? @[User::ExceptionReportPath] +"ExceptionReport_" + (DT_WSTR, 4)Datepart("yyyy", GetDate()) + "0" + (DT_WSTR, 2)Datepart("mm", GetDate()) + (DT_WSTR, 2)Datepart("dd", GetDate()) + (DT_WSTR, 2)Datepart("Hh", GetDate()) + (DT_WSTR, 2)Datepart("mi", GetDate()) + (DT_WSTR, 2)Datepart("ss", GetDate()) + ".xls": @[User::ExceptionReportPath] + "ExceptionReport_" + (DT_WSTR, 4)Datepart("yyyy", GetDate()) + (DT_WSTR, 2)Datepart("mm", GetDate()) + (DT_WSTR, 2)Datepart("dd", GetDate()) + (DT_WSTR, 2)Datepart("Hh", GetDate()) + (DT_WSTR, 2)Datepart("mi", GetDate()) + (DT_WSTR, 2)Datepart("ss", GetDate()) + ".xls"The value for for the variable ExceptionReportPath is C:\Reports\ and the expression is: C:\Temp\. The value for the ExcelFilePath property of the Excel Connection Manager is C:\Reports\ExceptionReport.xls and the expression is @[User::ExceptionReportName].When I run the report it adds the rows from the oledb source to C:\Reports\ExceptionReport.xls instead of creating a file as C:\Temp\ExceptionReport_20130329022012.Am I not suppose to use the ExcelFilePath property to create an instance of an excel file? After reading other posts I thought the right way was to use the ExcelFilePath property. What am I missing?Thanks!
↧
Conditional Split error
Hi All,I am facing issue with conditional split, i am very new to MSBI. while trying to fetch male and female records individually using following ConditionGender == "M"Gender == "F"But it is generating the output in conditional split default output along with all records its not passing the condition and not creating any buffersi cant identify where the problem please help me to find out this
↧
↧
Nz(FieldName,'') Equivalent in SSIS for Microsoft Jet Ole db provider
Hi All, I'm trying to access the MS access tables in SSIS using Microsoft Jet Ole db provider. I'm trying to find the Null values and replace it by some value.When i use Nz(FieldName,'') i'm receiving an error saying invalid function Nz. But if I use the same in MS Access db it is running successfully.Is there any equivalent of Nz function that I can use in SSIS using Microsoft Jet Ole db provider for accessing MS Access data?
↧
SSIS and dealing with embedded double quotes and coma
I posted my problem in other thread also but no go, I think this is the right forum to post my problem. This has been discuss couple of years ago in this [url=http://www.sqlservercentral.com/Forums/Topic638571-148-1.aspx]forum [/url]but I dont think it lead to any solution. Many people may have faced this problem and I searched many solutions but somehow I could not hit the right one. Sorry for repeatative question.Here is my data in csv file and I am trying to import into sql server table but it does not import the way it should.field1,field2,field3,field4,field5,field6n1,n2,n3,stringWithout Quotes,"String in Quotes with ""words"" and coma , in the string",some moren1,n2,n3,"stringWith Quotes","String in Quotes with coma , in thestring",some moreI need outputRecord 1:Field1: n1 Field2: n2Field3: n3 Field4: stringWithout QuotesField5: String in Quotes with "words" and coma , in the stringField6: some moreRecord 2:Field1: n1Field2: n2Field3: n3Field4: stringWith QuotesField5: String in Quotes with coma , in thestringField6: some moreI tried to cleanup with Regex in script task ,mentioned in some other blog but it did not work and I am not expert to change RegEx to get desired output. Can anyone please help to find solution? Regex should work but any other solution is also welcome.Thanks. P.S. I tried to import same csv file in Access and it worked perfactly, so I know the csv format is correct.
↧
Change SSIS package owner to SA
Hi,Previous dba has created some SSIS package. He is the owner of the package.Recently I joined and started using SSIS packeges without any issues.Now network admin want to disable the previous DBA all accounts. Question is..as long as I am logging in with my account and executing packges. I am goodOr Do we need to change the owner to SA. If so how ? I have some 20 SSIS packages
↧
thread count for ssis package and .bat file
hello all-i have 6 threads available. my ssis package has 4 containers which are using 4 threads. if each one of those containers kicks off a .bat file, do those .bat files take an separate thread or use the same thread?
↧
↧
IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()
Job fails with following error. Any help is appreciated.Executed as user: xxx Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 11:00:00 PM Error: 2012-08-28 23:03:33.20 Code: 0xC0202009 Source: Load Change Order Signature Insert Change Order Signature [1124] Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support. ". An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Location: pageref.cpp:922 Expression: IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage () SPID: 84 Process ID: 1196". End Error Error: 2012-08-28 23:03:33.21 Code: 0xC0209029 Source: Load xxx Signature Insert xxx Signature [1124] Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (1137)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (1137)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. End Error Error: 2012-08-28 23:03:33.21 Code: 0xC0047022 Source: Load xxx Signature SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Insert Change Order Signature" (1124) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (1137). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. End Error Error: 2012-08-28 23:03:33.22 Code: 0xC02020C4 Source: Load xxx STG xxx Signature [1] Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. End Error Error: 2012-08-28 23:03:33.22 Code: 0xC0047038 Source: Load xxx SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "STG xxx Signature" (1) returned error code 0xC02020C4. 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. End Error Error: 2012-08-28 23:03:33.79 Code: 0xC001410E Source: xxx Connection manager "xxx ODS" Description: The connection manager failed to defect from the transaction. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:00:00 PM Finished: 11:03:33 PM Elapsed: 213.051 seconds. The package execution failed. The step failed
↧
Data Migration with SSIS in multiple steps
I am new to SSIS.I am planning to use SSIS for data migration. I have a big source table (record count: 35M). I would like to start the migration from old table to the new table before the actual release day. In that way, on the actual release day, the execution time is low.How can I do that?For example, today is April 03. And our actual release date is April 10. The source table has a record count of 35 Million (as of today). May be by April 10, it will grow up to 37 Million records. Option 1: I can run the SSIS package on April 10, and it will have to take care of 37 Million records. Option 2: Can I run the SSIS package on April 08 for records upto that point. and then run the package again on April 10 for the rest of the records?If option 2 is possible, how can I do that?Thanks in advance for your kind advise.
↧
SSIS 0xC020801e Connection Manager Issue
I have a job that runs nightly. Intermittently it gets Code: 0xC020801E ---The connection manager "Microsoft OLE DB Provider for SQL Server" is an incorrect type. The type required is "FILE". The type available to the component is "OLEDB". End Error. It will run fine for days or a week in a row without this error but then have it twice in one week. I kick the sql agent off manually the next morning without rebooting or any other changes and it will work fine.I have seen response for jobs that have not run at all ,but this job runs each night and has run over a week successfully at times without this error.Any suggestions would be appreciated.
↧