Hello,
Does anyone know how to enable "Treat Consecutive Delimiters as one." option to work with txt files on SSIS?
if this exists in excel, should be exist everywhere... or not ?
Gilberto H.
Hello,
Does anyone know how to enable "Treat Consecutive Delimiters as one." option to work with txt files on SSIS?
if this exists in excel, should be exist everywhere... or not ?
Gilberto H.
I have inherited some SSIS packages that are used to populate a data warhouse using SAP SQL Server DB as a source. I am fairly new to SSIS so I've been doing a lot of research on best practices as part of my education.
One of the data flow tasks pulls material related data and looked like a prime target for optimization as it was utilizing 6 separate OLE DB Source tasks each with their own SSIS Sort all merged within SSIS. I was able to duplicate the logic with a single query and incorporate server-side sorting. This should have, from all I've learned, increased performance and reduced the execution time. Instead the execution time went from 1:02.200 to 2:35.580.
Confused I tried another tact and just removed the Sort Tasks from the original package by moving the sort to the OLE DB Sources. Execution time was better than the attempt at consolidation but still greater than the original at 1:32.259.
Does anyone have any idea what's going on here and why it is behaving contrary to expectations? The total output is only about 6500 rows. If there is any additional info needed to make a prognosis let me know I just didn't want to bloat this post any more that it already is.
Thanks
I am reengineering a crude data mart that was created in SQL Server 7. (It consists of tables based directly on mainframe extracts, with no data cleaning or conforming, etc.) The new system is starting to take shape in SQL Sever 2008 R2, but I am under pressure to make like-for-like data available immediately, which means the complete data modelling and cube building will have to wait. My problem is: How should I expose the data to the users?
Currently, people are using Access to link to views on the tables in the old (SQL Server 7) database. This creates a recurring PITA problem with the scheduled database refreshes: If the extracts are late coming out of the mainframe, people have already connected to the database by the time the ETL tries to run, and it fails because of table locks. I suppose the same situation will arise in the new data mart if I again grant user access to views on the tables -- unless I modify the ETL to allow new versions of the tables to be built while the clients are still pointing to the old ones.
Should I simply deny direct access to these tables, and instead provide stored procedures for use by Access and Excel clients? (I haven't tried this before, and I'm worried about provoking a backlash if it doesn't go smoothly).
Whatever I do, it may be necessary to create a messaging solution that informs users of which data they are using (i.e. last week versus this week) while the tables are getting refreshed (or the extracts are late). Any tips?
Hi,
I need to create dynamic .csv files with each deptname and systems date using sis2008 package
i created package with sql query execute for eachloop data flow container oldb container and flat file destination.
every thing is good but flat file connect is giving errors saying the filename property is not valid. the filename is a device or contains invalid characters.
my expressition connection string for dynamic creation of a file i gave following code
@[User::path]+ @[User::Client] +"_"+(DT_STR, 4, 1252) DATEPART("yy" , GETDATE()) + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("mm" , GETDATE()), 2) + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("dd" , GETDATE()), 2)+".csv"
but the eeror is :: file name property is not valid
please help
Thanks
Madhavi
Madhavi Pasapula
Hi All,
I was trying to use the SQL Server as the external reference for the Execute package task for my parent package but it was showing me the msdb database content when I created the connection to the SQL server instance with catalog as SSISDB so that i could use the deployed packages as my child packages.
Actually my denali msdb doesnt have any packages deployed to it.
My questions are:
Can anybody help me on this?
Thanks, Franco.
I have a Code that extracts the Active Directory User information from various Domains. It works fine for the most part but then it keeps failing with output buffer error. If i remove one column then the pacakge runs fine. I have few columns i need to extract data from . Any suggestion or help to get the data from n-number of columns will be helpful
Here is the error i get
SSIS SCRIPT COMPONENT ERROR : “The value is too large to fit in the column data area of the buffer”
I am assuming their should be some property to set that will extract the data .. I tried both String and integer , same issue.
Not sure if their is in limitation of number of columns i can extract
Imports System Imports System.Data Imports System.DirectoryServices 'You must Add This, Since I am not fully qualifying the Class names with the namespace. Imports System.Math Imports System.Text 'namespace for the StringBuilder class Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper Imports Microsoft.SqlServer.Dts.Runtime.Wrapper<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute()> _<CLSCompliant(False)> _ Public Class ScriptMain Inherits UserComponent Public Overrides Sub CreateNewOutputRows() Dim de As New DirectoryEntry Dim searcher As New DirectorySearcher Dim search_result As SearchResultCollection Dim result As SearchResult Dim props As ResultPropertyCollection Dim MemberOfList As StringBuilder Dim PropertiesList, s As String Using (de) de.Path = Me.ReadOnlyVariables("gLDAPQuery").Value.ToString() Using (searcher) searcher.SearchRoot = de searcher.Filter = Me.ReadOnlyVariables("gLDAPFilter").Value.ToString() searcher.SearchScope = SearchScope.Subtree ' List of ActiveDirectory columns to retrieve searcher.PropertiesToLoad.Add("SamAccountName") searcher.PropertiesToLoad.Add("EmployeeID") searcher.PropertiesToLoad.Add("GivenName") searcher.PropertiesToLoad.Add("Mail") searcher.PropertiesToLoad.Add("SN") searcher.PropertiesToLoad.Add("Description") searcher.PropertiesToLoad.Add("DN") searcher.PropertiesToLoad.Add("createTimeStamp") searcher.PropertiesToLoad.Add("homeMDB") searcher.PropertiesToLoad.Add("mDBStorageQuota") searcher.PropertiesToLoad.Add("mDBOverHardQuotaLimit") searcher.PropertiesToLoad.Add("mDBOverQuotaLimit") searcher.PropertiesToLoad.Add("mDBUseDefaults") searcher.PropertiesToLoad.Add("msRTCSIP-UserEnabled") searcher.PropertiesToLoad.Add("extensionAttribute9") searcher.PropertiesToLoad.Add("Pwdlastset") searcher.PropertiesToLoad.Add("useraccountcontrol") ' limited to some threshold. searcher.PageSize = 2048 'Retrieve the results from Active Directory search_result = searcher.FindAll() For Each result In search_result props = result.Properties 'Create a placeholder to store the list of applicable properties ' for a given Active Directory record. PropertiesList = "" For Each s In props.PropertyNames PropertiesList = PropertiesList & s & "," Next 'remove last comma PropertiesList = PropertiesList.Substring(0 _ , PropertiesList.Length() - 1) ' Add rows by calling AddRow method on member variable called "<Output Name>Buffer" ' E.g. in our case it will be ActiveDirectoryOutputBuffer ActiveDirectoryOutputBuffer.AddRow() ActiveDirectoryOutputBuffer.PropertiesList = PropertiesList 'Need to check wheter the props collection does contain the property before retrieving the values ' because some Active Directory Records may or may not contain some properties. If props.Contains("SamAccountName") = True Then ActiveDirectoryOutputBuffer.SamAccountName = props("SamAccountName")(0).ToString() End If If props.Contains("Mail") = True Then ActiveDirectoryOutputBuffer.Mail = props("Mail")(0).ToString() End If If props.Contains("GivenName") = True Then ActiveDirectoryOutputBuffer.GivenName = props("GivenName")(0).ToString() End If If props.Contains("EmployeeID") = True Then ActiveDirectoryOutputBuffer.EmployeeID = props("EmployeeID")(0).ToString() End If If props.Contains("SN") = True Then ActiveDirectoryOutputBuffer.SN = props("SN")(0).ToString() End If If props.Contains("Description") = True Then ActiveDirectoryOutputBuffer.Description = props("Description")(0).ToString() End If If props.Contains("DN") = True Then ActiveDirectoryOutputBuffer.DN = props("DN")(0).ToString() End If If props.Contains("createTimeStamp") = True Then ActiveDirectoryOutputBuffer.createTimeStamp = props("createTimeStamp")(0).ToString() End If If props.Contains("homeMDB") = True Then ActiveDirectoryOutputBuffer.homeMDB = props("homeMDB")(0).ToString() End If If props.Contains("mDBStorageQuota") = True Then ActiveDirectoryOutputBuffer.mDBStorageQuota = props("mDBStorageQuota")(0).ToString() End If If props.Contains("mDBOverHardQuotaLimit") = True Then ActiveDirectoryOutputBuffer.mDBOverHardQuotaLimit = props("mDBOverHardQuotaLimit")(0).ToString() End If If props.Contains("mDBOverQuotaLimit") = True Then ActiveDirectoryOutputBuffer.mDBOverQuotaLimit = props("mDBOverQuotaLimit")(0).ToString() End If If props.Contains("mDBUseDefaults") = True Then ActiveDirectoryOutputBuffer.mDBUseDefaults = props("mDBUseDefaults")(0).ToString() End If If props.Contains("msRTCSIP-UserEnabled") = True Then ActiveDirectoryOutputBuffer.msRTCSIPUserEnabled = props("msRTCSIP-UserEnabled")(0).ToString() End If If props.Contains("Pwdlastset") = True Then ActiveDirectoryOutputBuffer.Pwdlastset = props("Pwdlastset")(0).ToString() End If If props.Contains("useraccountcontrol") = True Then ActiveDirectoryOutputBuffer.useraccountcontrol = props("useraccountcontrol")(0).ToString End If Next End Using End Using de = Nothing searcher = Nothing search_result = Nothing result = Nothing props = Nothing MemberOfList = Nothing End Sub End Class
ns100
When I use
USE [AdventureWorks2012] EXEC [dbo].[uspGetBillOfMaterials] @StartProductID = 800, @CheckDate = N'2008-02-01'
As source in SSIS Import/Export Wizard, it cannot map the string column. It shows 202 for source type. Same for other sp-s with string columns in results set. When I specifically did a convert(varchar...) in the output, it showed 200 for type.
Kalman Toth Database & OLAP Architect
sqlusa.com
New Book / Kindle: Pass SQL Exam 70-461 & Job Interview: Programming SQL Server 2012
I don't know if anybody already asked this before.
but what does this error means:
Msg 4832, Level 16, State 1, Line 1
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
==============================================================================
I'm trying to upload a .csv file using "BULK INSERT" into mytable with datatype of nvarchar(max)
Here is my Bulk Insert Script:
BULK INSERT myTable
FROM 'D:\CSV Files\CLIENT\DATA.csv'
with
(
firstrow = 2,
fieldterminator = ',',
rowterminator = '\n',
tablock,
keepnulls
)
Thanks Everyone,
Hi all,
I created a package through BIDS export import wizard. I saved it on my local system and also saved a copy of the package on the SQL server. The final path it displayed while saving was /MySQLSERVERName/MySSISPackageName.
I am first of all not able to connect to Integration services, it gives a weird "access denied" message. Then I tried to remote desktop into the server, and connect to integration services via management studio - I am able to connect! But I don't see any ssis packages in the msdb folder or any other folders. Infact, I don't see any ssis packages inside stored/run packages at all.
Then, I thought I could open my stored ssis package through BIDS. I clicked Project -> Add Existing Package.. I gave my sql server information, I found my ssis package and clicked open. Nothing opened up. I don't know what is wrong and how to trouble shoot this issue. Please help.
Thanks
Hi All,
My file looks like this
Load201307250717.txt in the format YYYYMMDDHHMM.
Now I have to delete the files which are older than 7 days.
To create the above file my command looks like this
set hh=%time:~-11,2%
set /a hh=%hh%+100
set hh=%hh:~1%
Set TIMESTAMP=%date:~10,4%%date:~4,2%%date:~7,2%%hh%%time:~3,2%%time:~6,2%
copy/Y D:\FOCUS\logs\Load%date:~-4%%date:~4,2%%date:~7,2%.txt "D:\FOCUS\logs\Load%TIMESTAMP%.txt"
dtexec /file "D:\dtsx\LoadIRS.dtsx" /config "D:\config\Load.dtsConfig" >D:\logs\Load%date:~-4%%date:~4,2%%date:~7,2%.txt
Help Needed
Sri.Tummala
Hi All,
I have many Source SQL for the SSIS Data flow source, that is current stored in SSIS variable, but now I want to make them configurable from Config Table which stores the SQL and use it in Data flow source, this way I benefit from saving time if there is any logic change in the source query (but no Column structure as they mapped in data flow) , as I dont need to redeploy the SSIS package, just a data correction scripts.
Just wanted to ask if there is any quick way to autogenerate dynamic SQL stored in varchar(8000) from source SQL scripts. I Dont prefer to do it manually. Also I have once Web application that can update the values in config table, I can update the dynamic scripts from there, again saves time.
Want to add, I dont have permission to create views on data source DB Server
Thanks in advance.
this is frustrating.. I just thought of showing a sample variable declaration and result set to my friend but I don't know for some reason getting error. Please find as attached. Any reply is highly appreciated.
steps i m following as this..
Hi
I am a newbie for ssis.
i would like to know,
how would i create an output or cache transform with a condition taking the data from another table.
An example
Let say i have two table
Employee table which consists of name, department, dateofbirth
System processing date table which consists of branch, business date
i would like to display the information of the employee from the employee table which take the condition of the employee table dateofbirth > system processing date table business date.
If any kind people that could help on this
thank
Regards,bruce
brucelim
Hi,
I am trying to get error column name from my error output but am experiencing some difficulties on the way so I was wondering if you guys can help.
I tried to follow this article but as soon as I click on the .exe, CMD window opens up and disappears.
I am running Windows 7/8 and SS 2012.
Am I missing something?
Thank you
Hi All,
I have this script in script task in SSIS.
string Dts.Variables["InputPath"].Value; { if (Directory.Exists(strpath)) { // Process the list of files found in the directory. string strfilenamewithext = ""; string[] fileEntries = Directory.GetFiles(strpath, "*.EXTRACT*"); foreach (string fileName in fileEntries) { strfilenamewithext = Path.GetFileName(fileName); if (strfilenamewithext.Equals("ExtractToBeLoad.EXTRACT01")) { Dts.Variables["Extract01"].Value = strfilenamewithext; Dts.TaskResult = (int)ScriptResults.Success; } else { Dts.Events.FireError(52, "File Validation", "Invalid File Name - " + strfilenamewithext, "", 0); Dts.TaskResult = (int)ScriptResults.Success; } } }
Script work fine until i place another .extract01 file but different file name to the path configured in connection string. I want the SSIS Package to ignore that file and continue loading file that has a correct file name.
Thanks
Hello all,
I want help on below scenario....
Sp to Create Footprint ticket whenever file available in purticular folder..
Thanks in Advance-:)
I got an requirement that whenever files comes for purticular process, automate ticket should be created for purticular user...
How can i achive this....
Hello - I am having problems running ANY SSIS packages lately. After reseraching and looking around a bit, I found that I have 0 memory available because SQL Server has cached all available memory.
I need to figure out how to "unlock" the memory AND change the maximum threshold so this does not keep happening.
When I run this query in Management Studio on the master db:
SELECT
value,minimum,maximum,value_in_usefromsys.configurations
wherename='max server memory (MB)'
I get these results : value = 2147483647, minmum = 128, maximum = 2147483647, value_in_use: 2147483647
Jenna G
Hi,
I have loaded a set of Flat files in to a table using For each Loop container and Archived the Files using File System Task.
Now, can you please tell me how can i save the loaded file names in a table - so that if the same source file comes again, i can just delete them without loading.
I have very little knowledge in Script task and trying to solve this without the help from script task..
Your help would be highly appreciated!