Wednesday, August 13, 2008
New features in SQL Server 2008
http://www.mssqltips.com/tip.asp?tip=1313
All achievements, all earned riches, have their beginning in an idea.
Four steps to achievement:
Plan purposefully.
Prepare prayerfully.
Proceed positively.
Pursue persistently.
All the information you need
Script in SSIS script task to download file via HTTP
Dim myWebClient As WebClient
Dim remoteUri As String
Dim localFileName As String
Dim fireAgain As Boolean
Try
myWebClient = New WebClient()
' get the context from variables
'remoteUri = CStr(Dts.Variables("RemoteUri").Value)
'localFileName = CStr(Dts.Variables("LocalFileName").Value)
remoteUri = "http://www.msbicentral.com"
localFileName = "C:\\Multi-ValuedParameters.rdl"
' tell the user what we're downloading where
Dts.Events.FireInformation(0, String.Empty, String.Format("Downloading '{0}' from '{1}'", localFileName, remoteUri), String.Empty, 0, fireAgain)
' do the actual download
myWebClient.DownloadFile(remoteUri, localFileName)
Dts.TaskResult = Dts.Results.Success
Catch ex As Exception
' post the error message we got back.
Dts.Events.FireError(0, String.Empty, ex.Message, String.Empty, 0)
Dts.TaskResult = Dts.Results.Failure
End Try
End Sub
More details can be found on this page:
http://www.eggheadcafe.com/community/aspnet/13/10053833/using-ssis.aspx
Difference between BULK INSERT and SQL Server Destination in SSIS
The Bulk Insert task uses the Transact-SQL BULK INSERT statement for speed when loading large amounts of data. The SQL Server destination uses logic similar to but even more optimized than the logic used by the SQL Server built-in BULK INSERT command. Because the SQL Server destination uses shared memory for maximum loading speed, the package containing the SQL Server destination must execute on the same server as the database engine. Both the Bulk Insert task and the SQL Server destination can specify options that would be specified in the Transact-SQL BULK INSERT statement. Using the SQL Server destination is faster than either the Bulk Insert task or using the OLE DB destination with one of the fast load options. The fast load option of the OLE DB destination works by using optional parameters of SQL Server's BCP (bulk copy) utility; these optional parameters include:
· Keep identity values from the imported data file or use unique values assigned by SQL Server.
· Retain a null value during the bulk load operation.
· Check constraints on the target table or view during the bulk import operation.
· Acquire a table-level lock for the duration of the bulk load operation.
· Specify the number of rows in the batch and the commit size. The number of rows in a batch defaults to 100.