File System Task Editor closes when selecting DestinationVariable
How to pass a variable for a SQL query in OLEDB source?
Hi All,
I am new to SSIS and working on it past few days. Can anyone please help me getting through a scenario where I need to pass a variable in the SQL statement in OLEDB source connection. Please find below for the details.
eg:
1) I have a SQL table with the columns SerialNumber, Name, IsValid, FileName with multiple rows.
2) I have the file Name in a variable called Variable1.
3) I want to read the data from my SQL table filtering based on the FileName (Variable1) within a data flow task and pull that data to the destination table.
Question: In the data flow task, added source and destination DB connection with a script component in between to perform my validations. When trying to retrieve the data from source using the variable (i.e. SQL Query with variable), I am not able to add the query as the SQL statement box is disabled. How to filter the data based on the variable in the source DB ?
Any help/suggestions would be of great help.
Thanks,
Sri
Fuzzy lookup without Ms-SQL
Hi
Normally one needs for fuzzy lookup to load a (lookup) table in MS-SQL. Is it also possible to use / define such a table in Excel? I mean, is it possible to do fuzzy lookup without MS-SQL?
Thanks!
Gabi
gec
How to Install SSIS
Can someone tell me how to install SSIS?
I've gone through Add/Remove programs, and attempted to update SQL Server 2005 but cannot seem to find the correct components to add, and since I cannot see the SSIS name in my Services panel, i assume it hasn't been installed.
Extracting excel data using script task
Hi All,
I have a requirement in which the task is to read data from .xls file and put it into a text file. The SSIS should read data from Excel cell A:4 to L:15 and also it should capture 1/16/2015 in a seperate column. The Month-Year value on the row is dynamic. Every month old month-year gets deleted and new month-year gets added to the excel sheet. For example one month from now, Feb-15 will be deleted and Jan-16 will be added to the end.
I tried this using SELECT * FROM [SHEET1$A4:L15], then i used unpivot transformtaion to get my data. But when i tried changing for example Mar-15 to March-15 it failed bcoz metada has changed. similarly suppose if i delete Feb-15 and add Jan-16 again my package failed. I think we need to use script transformation to do this. any idea how to do it using script.
Any help would be greatly appreciated.
I am using SSIS 2008R2
I have attached the input file(Excel Sheet) and also i have attached the expected output file(Text File).
error while using oledb source
hi
i need to execute stored procedure in my OLEDB source.
i dont have any parameter in my sp , but i have temp table.
i am getting error like "Invalid object name #temp"
what to do
SSIS 2014 Application and Database server
I have a database server with SQL Server 2014. I have and application server with SSIS 2014.
I am running SSIS on the application server under a service account that should have the correct priviledges.
I have created an SSISDB catalog on the database server.
I have altered the config file for SSIS (MsDtsSrvr.ini.xml) and changed the server name from . to<dbserver>
What else do I need to do to configure these two servers to talk to each other?
I have two licenses of SQL Server, one for the database server and another for the application server.
Thanks for your help!
Additional info:
I have also ran DComConfig and allowed the service account to local and remote launch. I can now see MSDB on the database server. What do I need to do to see SSISDB?
SSIS 2008 R2 : XML issue with
hi Friends,
Please help me in below error , I am using XML data source with below encoding
<?xml version="1.0" encoding="iso-8859-1"?>
While generating xsd, i am getting below error.
'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1.
the xml is parsing correctly as i am using XML spy to check the xml.
Any help is appritiated.
Thanks in advance,
Pari
Batch insert from object variable
Any way to do this excluding the foreach loop container? I have millions of rows and if it goes through them 1 by 1 it will take hours maybe days. How can you do a batch insert from an object variable without putting the sql task inside a foreach loop container?
thanks,
Mike
Mike
Need to load the data from oledb source(sql server table to ) ODBC destination table. )
I have around 700,000 records that is needed to be moved from a table that exists in my sql server 2012 database table to the DB3 database table. I am using currently oledb source and ado.net as destination to do this transfer. But its taking more than 2 hrs, I need to get this done fast, there should be a way. but I am not able to get it done faster can any one help please....
Thank you
insert value in execute sql task
hi
i am using execute sql task in order to insert value ,
INSERT INTO FileSequence
SELECT 'BP_'+?.+'TXT'
go
here in place of ? i need to to use current date for which i have used 1 variable and mapped it as a parameter,
but getting error
how to use it
OLEDB Source sql query with parameter
I have a dataflow in a for each loop container.The OLEDB Source is pointing to oracle database.The sql query to fetch the data should take a variable value.
Example : select * from tablename where colname = @variablevalue
the variable value changes each time since the dataflow is in a for each loop container.
can anyone please help me configuring the source??
when i try to use ? i get the following error message
Thanks,
Rahul
Importing flat file csv with variable column widths
Hi,
I need to find a way to load csv files with variable column widths as right now, I'm tearing my hair out (and I don't have much left!)
Here's what happens:
I run the SQL Server Import and Export Wizard; I point it to a csv file; I ask it to suggest column types, I go all the way to finish & then it complains that it can't load the file without truncating a field - but IT suggested the length of the field in the first place!
So, I drop the table, go back to the beginning, fix the offending row, and try again. Sometimes I can go through this loop a dozen times trying to get the right sizes.
Is there an option I'm missing - like read the WHOLE file before suggesting a size? Or perhaps even an external program or script which could scan the data & tell me which sizes to set?
Less optimal would be some way to give me some whacking great size (like 5000) as the size of the field & then I can work out something better once I get the data into SQL.
I know I could turn off the error messages & just let the truncation happen... but I *need* the data in SQL.
Any suggestions would be appreciated.
Thanks in advance,
(Nearly Bald) Robert
SSIS Script task code
Hi All, I am trying to understand the below function GetLatestFolder, i can see that this might be giving the latest folder in the directory results
I am not able understand the below functions
- Directory.GetDirectories
- DirectoryInfo
// Call to the GetLatestFolder function is as below // where "lstrExtractDirectoryPath" contains path // C:\File_Extract\results string lstrLatestExtractFolderPath = GetLatestFolder(lstrExtractDirectoryPath); //Method to get latest folder in a directory public string GetLatestFolder(string pstrDirectoryPath) { DateTime ldtLastHigh = new DateTime(1900, 1, 1); string lstrHighFolder = ""; foreach (string lstrFolder in Directory.GetDirectories(pstrDirectoryPath)) { DirectoryInfo fi1 = new DirectoryInfo(lstrFolder); DateTime ldtCreated = fi1.LastWriteTime; if (ldtCreated > ldtLastHigh) { lstrHighFolder = lstrFolder; ldtLastHigh = ldtCreated; } } return lstrHighFolder; }
Neil
Print PDF file from a SSIS Script
Hi,
Is it possible to print a PDF file from a SSIS script?
Thanks!
Développeur Applications Informatiques Computer Applications Developer
Excel error 64-bit version of SSIS
How do I changed the ssis project to 32 bit. I have this error:
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC00F9304 at Package, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.
Error: 0xC020801C at Data Flow Task, Excel Source [1]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC00F9304. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: component "Excel Source" (1) failed validation and returned error code 0xC020801C.
Joe
Script Data Component - System.DateTime.TryParseExact Method not validation date value
Hello
I have Script data component in my data flow task and i am trying to validate whether the date fields has valid date values or not.
So i added below code to validate the date fields
in below code TestDate is datetime and ValidTestDate is datetime as well.
System.DateTime.TryParseExact is not validating to true even the TestDate is valid.
I have even tried converting the datetime field to DT_DATE but it did not work.
I appreciate any suggestion to accomplish the check whether it is valid date or not.
Regards
Harris
Which service pack should I install if I have SQL Server 2012 RTM version 11.0.2100.60
I read the recommendation "SQL Server 2012 RTM is no longer in mainstream support. If you wish to continue getting fixes, you should absolutely plan on migrating to the SP2 branch;" fromhttp://blogs.sqlsentry.com/team-posts/latest-builds-sql-server-2012/. I am not quite sure how I can migrate from RTM to SP2. Thank you in advance.
cy
SSIS package with OData connection - can't connect
I need to read some data from a SP list. I have the OData connection manager setup. When I test the connection to my sharepoint site, it says it's successful. I added in a data flow task and then an OData Source. In the OData Source editor, I select the Odata connection manager. I want to use a collection. However, it says "Unable to load collection for the connection Odata Source, reason: Cannot open this connection"
Anybody know how to resolve this?
Script Component As Destination To Write XML
Hello
I have to create below xml output and
<Form ID="123" Status="N">
<TestDate>1/1/15</TestDate>
<TestId1 Id=1>
<TestValCd1>123</TestValCd1>
</TestId1>
<TestId2 Id=1>
<TestValCd2>123</TestValCd2>
</TestId2>
</Form>
below code let me iterate through the columns but i need to know how i can create nested elements and in the format above.
Form, ID and Status are columns and i need to know how i can create above by looping the columns with below properties.
The above code is from one of the forum post and i thank for their guidance.
I appreciate any recommendations.
Regards