Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

Replicating a Oracle database on Sql Server

$
0
0

hello all!

i have to "replicate" a oracle database to a Sql server instance for a specif task... upper managment kind of request...

the thing is... i can move the data with a DataFlow task... any ideas on how can i replicate the tables??? the database has 855 tables... and i dont want to recriate them manually...


Need help finding the ComponentClassID for the MySQL Connector (6.4.1)

$
0
0

I've been trying to programmatically create an SSIS package that has a MySQL Data Source for some time now and have been running into an issue figuring out how to get the appropriate ComponentClassID and ConnectionManager type to set for the source ConnectionManager.  Does anyone know the correct way to set the CompoentClassID for a MySQL Source using the .NET version of the MySQL connector?

Thanks!

Issue with "IBM DB2 for i5/OS IBMDA400 OLE DB Provider"

$
0
0

 

Hi,

I am working on an SSIS package that among other things connects to an DB2 platform on AS400.

I am finding that I can use DB2 as a data source or destination when I specify a SQL statement but not when I specify a table.  The error that I am recieving is contained in the screenshots below.

As far as I can tell, the connection id properly configured; this would not be an issue for me except I need to use SISS transformations that only allow a table to be specified (Slowly Changing Dimension).

I will give the MS driver a go if I cant get the DB2 one working (I hadn't thus far as it means i need to install SQL Server Developer Edition locally) but was wondering if anyone else had experienced this issue, and more specifically has used SSIS with the IBM driver?

Appreciate any help.

Malachy

Not Working:

DB2 Datasource error

Working:

DB2 Data Source/Destination works with SQL statement

SSIS SMS TASK

Proper SSIS jobs error messages

$
0
0

From time to time jobs that are running SSIS packages fails in our envs.

Finding the actual error message inside the job history is a bit irritating. For example, the error : "Login timeout expired" is hidden inside all this words:

Executed as user: ****** Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  8:31:01  Error: 2012-07-18 08:31:20.95     Code: 0xC0202009     Source: ***** 

Do you happen to know any other way (more convinient) to view/get/receive/detect error messages inside the job history?

I've already configured in the job notification tab that a mail will be sent to me in case of an failure, but the mail is very limited and doesn't contain a lot of info - 

JOB RUN:DURATION:        0
hours, 3 minutes, 4 secondsSTATUS:               FailedMESSAGES:        The
job failed.  The Job was invoked by
Schedule 122 (Daily Every 30 minutes @10:30). 
The last step to run was step 1

Thanks in advance, Roni.

Visual Studio 2012 and SSIS 2012

$
0
0

I recently downloaded and installed Visual Studio 2012.  I tried to open an SSIS package from SQL Server 2012.  It said that it was not supported in this version and open it in an older version.

Am I doing something wrong?  Can I work with SQL Server SSRS, SSIS or SSAS project in VS 2012?

Thanks for your help!

Adding days to a date in derived column expression

$
0
0

I am using a derived column which takes data from an XML source to put it into a ole db destination.

In the expression I want to calculate an end date using the supplied start date and a supplied duration field.

This would be a simple dateadd expression, however I need to also account for weekends so if any of the days between the calculated dates are a non working day (saturday or sunday) then I need to increase the end date to account for this.

datename(weekday, getdate())  I know will get me the day of week but not sure how I step through the inbetween dates

Table to CSV

$
0
0

Hi,

I am taking Source as table and destination as text file CSV.

In the table i have data like 0.00 and when i am trying to load into destination file i wan the data look like $0.00.

So i ahve added derived column and appended $ sign, but while loading data into text file i am as $0 instead of $0.00.

I have used currency and numeric data types with precision 2, but it did not work.

Please help me what kind of data type needs to used.


SSIS 2008R2 - odd warnings when creating Excel spreadsheets using Execute SQL task

$
0
0

I have a number of SSIS packages which generate Excel spreadsheets as part of their output. The packages create the spreadsheets through an Execute SQL task with the SQLSource set to a CREATE TABLE script, such as:

CREATE TABLE foo (bar NVARCHAR(20))

In SSIS 2005, this ran cleanly (no errors or warnings). However, I'm now upgrading these to SSIS 2008 R2; every time this task runs, I get two identical warnings: "Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Adding to my confusion, the Excel file actually is created properly.

Following the adage that "a picture is worth a thousand words," screenshots of a simplified test care are attached. What's the deal with these warnings, and how can I get rid of them?an SSIS 2008R2 package that creates an Excel spreadsheet but throws weird warnings


compare case sensitive and case in-sensitive values in Lookup transformation

$
0
0
I have Source and Dest tables

table :source               Table : Dest
--------------------------------------------------
Col                                  Col
-------------------------------------------------
AA                                      aa
Bab                                   BAb

by default SSIS is Case Sensitive and my Database settings are Case in-sensitive 
When i Do a lookup on Col 
in this case, lookpup in SSIS treating both values 'AA' and 'aa' as same ....

but i have to treat it as different values, which we can visually see it ...how should i achieve this ?

I can achieve this by "Binary_CheckSum",but many blogs says that not 100% assured...
MSDN : "BINARY_CHECKSUM(*) will return a different value for most, but not all, changes to the row, and can be used to detect most row modifications."

email as a source data

$
0
0

 Hi you all.

I'm new to using SSIS. My project is to load csv file into an oracle database weekly using SSIS. 

The source file comes in an email weekly. My problem is how do I use the SSIS to get the data from an email and load it to the database? Do I need to write a script? Would somebody walk me through this? Sample script will help me a lot. 

Thanks in advance. 

* I created an SSIS project to do the same though I manually transfer the source out of email and save in the a folder. 

CSV File Different Destinations

$
0
0

 A folder having number of csv files .

the files are different formats like one file as shown below

id ,name

----------

1,a

2,b

some files having this formats

id,name,address

---------------------

1,a,usa

2,b,uk

but this files arranged two folders like Folder1 having the files like schema

id,name

Folder2 having files schema like

id,name,address

what i can do this formats ..psl tel me..

HOW TO READ A ZIP FILE WITH THE SAME NAME FROM MULTIPLE FOLDERS AND UNZIP THEM

$
0
0

Hi, Iam relatively new to bids.Following is the scenario where i need help.

c:\archive has 3 sub folders

c:\archive\1     c:\archive\2        c:\archive\3

1 ,2, and 3(each of them)contains 11  files.  which are  10 zipped rar files(once unzipped  they are .txt files) and a date.txt file

Lets say 10 rar files are like cust.rar,prod.rar,sales.rar...and so on. I only want to consider cust.rar

Cust.rar contains the customer details and date contains the date for which the customer details and

the remaining 9 zipped files correspond to;something like business date.


I have to traverse through each folder and read only cust.rar and date.txt

>then unzip cust.rar

>populate customer table using the information in cust.txt(once its unzipped)

Note: 1: The cust file name ie.cust.rar is same in each folder(1,2,3), same is with date.txt

          2: customer table contains a column called businessdate which should  be taken from date.txt(date.txt corresponds

              to the  business date for that particular cust record)

customer table

cust_id  |  cust_name | cust_address |......  |businessdate

Please let me know whether i've missed to provide any information. Hoping to find some help asap:)

Thanks...

Backup with FTP

$
0
0

I create a new ssis project. I add the backup database task and the FTP task.

I have everything working except:

I created the bak files like "databasename01010.bak', using the default method.

Problem is when I go to the FTP task, it wants a real bak file name. I will never know the name as it is created during the backup task.

How can I get the FTP container to use a *.bak?

I'm new to SSIS and would like to aviod using variables if possible.


qeqw

Running a SSIS 2012 package through a SQL Agent job results in an exception

$
0
0

I am trying to run a very simple test package developed in SSIS 2012 through a SQL Agent job, but the execution fails with:  "Error: Exception has been thrown by the target of an invocation."

I use a test server, running on 64 bit Windows Server 2008R2 + SQL Server 2012 64 bit.

This test package contains nothing but a Script Task, calling a Visual C# Script with only one additional line of code: MessageBox.Show("Testing");

I know, you wouldn't display a message box in a production environment, but this is just for testing ;)

It works in SSDT debug, it works after being deployed to a SSIS catalog and executed directly, but when called via a Agent job it fails.

I've configured the job step to use a SSIS proxy to execute the package with exactly the same credentials used for development/testing, I even tried the advanced option "32-bit runtime", the package still fails.

I configured verbose logging, but the quoted error message is the only relevant feedback I get, there is nothing in the windows eventlog either.


Delete files from the remote server

$
0
0

hi,

I have found the code for deleting filed from the remote server but there is small change in my requirement.

i have four different files which will moving to this folder ("Archieve" )daily with the time stamp in the remote folder and i need to delete files older than 60 days....

four files will be  in this format

"fl_principals_20120815","fl_teachers_20120815","fl_Students_20120815","dw_semesters_20120815"

can you check the code............where do i need to change  in the code...

Public Sub Main()

    Try
      Dim request As System.Net.FtpWebRequest
      request = System.Net.WebRequest.Create("ftp://remoteurl.com/remotefolder/")
      request.Method = System.Net.WebRequestMethods.Ftp.ListDirectoryDetails

      request.Credentials = New System.Net.NetworkCredential("username", "password")

      Dim response As System.Net.FtpWebResponse
      response = request.GetResponse()

      Dim responseStream As System.IO.Stream
      responseStream = response.GetResponseStream()

      Dim reader As System.IO.StreamReader = New System.IO.StreamReader(responseStream)

      While Not reader.EndOfStream
        Dim strTemp As String = reader.ReadLine
        Dim fileName = strTemp.Substring(strTemp.IndexOf("_") - 3)
        Dim theDate As DateTime = DateTime.ParseExact(fileName.Substring(4,8), "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)
        If (theDate.Date < DateTime.Now.AddDays(-60).Date) Then
          request = System.Net.WebRequest.Create("ftp://remoteurl.com/remotefolder/"+fileName)
          request.Method = System.Net.WebRequestMethods.Ftp.DeleteFile
          request.Credentials = New System.Net.NetworkCredential("username", "password")

          response = request.GetResponse()
        End If

      End While


      reader.Close()
      response.Close()
    Catch ex As Exception
      Dts.TaskResult = ScriptResults.Failure
    End Try

		Dts.TaskResult = ScriptResults.Success
	End Sub

thanks,

aravind-


Set local connection dynamically?

$
0
0

I use maintenance plans to backup my databases and perform a few other regular maintenance tasks. As you know, maintenance plans are nothing more than SSIS packages. 

I'd like to use the same maintenance plans on many database servers (I administer about 50) without modification. One thing I've never figured out though is how to set the local connection property for a maintenance plan / ssis package at run time. Is this possible? Id like to do something like "select @@servername" to set the local connection property for the MP. I'd also like to put the same value into the subject of the notification tasks if a task fails.

What I've done in the past when I deploy MPs on a new server is use a text editor to edit the xml files generated when I built the project in BIDS and change the server name manually, then deploy the modified packages via the deployment utility. I think there must be a better way where the local connection property gets set automatically.

Many of my servers are clustered and/or use named instances so I can't just use "(local)".

TIA


Chuck

Balanced Data Distributor does not install

$
0
0

Hi All,

We are trying to install the Balanced Data Distributor for SSIS, which is a really cool little transformation written (I think) by the SQLCAT Team.#

The problem is, that despite having SQL Server 2008R2 Installed, SSIS Installed (Yes, the service is started) and BIDS 08 Installed, when trying to install it on a number of Dev VMs, we get the following error:

The installation was not successful. Check the following pre-requsits:

1)Either Integration Services or BIDS has to be installed

2)The version of these components has to be either SQL Server 2008 SP2 (or furture SPs) or SQL Server 2008 R2 (or future SPs)

For once, Mr Google has no ideas. Has anybody encountered this, or know of a solution?

Thanks,

Pete


Peter Carter http://sqlserverdownanddirty.blogspot.com/

How do convert a datatype from nvarchar to smalldatetime in a Data Flow

$
0
0

Hello! I am almost done with my SSIS Package. However I am stumbling on the following:

I am important from an Excel spreadsheet time dates as nvarchar(10) (I am stuck with that datatype for now) and it is being stored in my staging table. I then must convert it to a smalldatatime datatype in a Table that the application can read using a stored Proc in an OLD DB Command Component. The following is my stored proc. Please focus on the SELECT CONVERT(SMALLDATETIME, @StatDateTaxDue) statement. This is where I am trying to convert the Stored Proc input nvarchar(10) param to a smalldatetime datatype. I have been working on this since Friday. Any ideas? Thanks!!! Mike

USE [BAPropertyTax]
GO
USE [BAPropertyTax]
GO
/****** Object:  StoredProcedure [dbo].[UpdateStagingTable]    Script Date: 08/17/2012 17:27:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[UpdateStagingTable]
    @CASEID nvarchar(255),
    @County nvarchar(255),
    @Address nvarchar(255),
    @City nvarchar(255),
    @State nvarchar(255),
    @Zip nvarchar(255),
    @AcquisitionDate nvarchar(255),
    @Step nvarchar(255),
    @StatDateTaxDue nvarchar(255)
AS
BEGIN
    SET NOCOUNT ON;

    update dbo.Property

    set PCounty=@County,
       PAddress = @Address,
       PCity = @City,
       PState = @State,
       PZip = @Zip,
       PAcquisitionDate = @AcquisitionDate,
       PCurrentStep = @Step,
       PStepDate = @StatDateTaxDue
      
    where PCaseId=@CASEID
   
    SELECT CONVERT(SMALLDATETIME, @StatDateTaxDue)
    
    UPDATE dbo.[LineItemInfo]
 SET        LIStateDate = cp.[Tax Service2]
 FROM     dbo.[Destination - YARDI_REPORTS$] AS cp INNER JOIN
                dbo.[LineItemInfo] AS mp ON mp.LIPropCaseID = cp.[CaseID]
                WHERE mp.LIPropCaseId = @CASEID
     
      UPDATE dbo.LineItemInfo
      SET LIStatus = @Step,
      LIStateDate = @StatDateTaxDue
     
      WHERE LIPropCaseId = @CASEID
  
END


Mike Kiser

How to do timezone time conversion with daylight savings?

$
0
0

Hi all,

I have a script component in my package that creates an EST datetime, which I need converted to GMT. The script doesn't appear to recognize System.TimeZoneInfo. Does SSIS run an old version of .net framework?

In any case, what's a decent way to convert my script's EST datetime into GMT, taking into account daylight savings?

thanks,

sff

Viewing all 24688 articles
Browse latest View live