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

SSIS - ETL - Transfer tables/databases from many servers ?

$
0
0

I have 6-7 identical databases (almost). I want to copy the data from some of the tables of EACH of these servers into the corresponding table of ONE server. That is, multiple sources and one destination server. All the servers have different IPs. How do I do this task ? Would for loop be appropriate for this. If yes, then what would be a good way to do it ?


Flat File Validations

$
0
0

How to do the flat file validation for the below requirements by using ssis? Can some one please help me out by using script task or any other task?

My flat file has header, Trailer and Data.

1) If I have more than one header or trailer then i have to send an email with message as "More than one header or Trailer". Here is example of header and trailer format below.Header record always starts with 10 and trailer record always starts with 90.

102011061518051501

9000000000090000000007

3) If i don't have header or trailer record in my flat file then i have send an email with message "No header or Trailer record."

4) If i don't have detail records then i have to send an email. Here is example of Data format below.It always starts with 20. Here is the example of detail record.

2001137442136         I82980878

5) If i don't have flat file in the directory (C:\) then i have to send an email.

6) If the number of records value in the trailer doesn't match with the Trailer + Header + Detail record  then i have send an email with message as "Mismatch in Total record count". Here is the flat file data below.First row is header and last record is trailer and middle of them are detail records. Here is the number of records in the flat file is 9 and in the trailer record you can see the 9 at 12th position.

102011061518051501
2001137442136         I82980878
2001999999998         D82980878
2002446524046         D82980878
2003560811205         D82980878
2001060938579         A82980878
2001860493988         D        
2001640430969         D82980878
9000000000090000000007

7) If there is a mismatch in the detail record count then i have to send an email as "Mismatch in the detail record count". we can find the detail record count in the trailer i.e;7 at the last position in the trailer record.

9000000000090000000007

Using GetDate() in an SSIS expression

$
0
0
I have an ETL package that takes data from an Excel spreadsheet and loads it into a SQL table.  It is working fine and now I want to add a column to the table that stores the date the record was created.  I have added a datetime field, CreateDate, to the table and have added a derived column to my package.  The expression for the new column is: (DT_DBTIMESTAMP)GETDATE()  When I run the package, the CreateDate field shows as NULL.  Any thoughts on this one, please?

SSIS Package configuration type is SQL Server

$
0
0

Hi,

This is related to SSIS Package Configuration side. I need to debug the existing production copy SSIS Package, these package was configured the variable using SQL Server configuration (SSIS_Configuration). The Source and Destination DB connections are correct. And the variables are available in the SSIS_Configuration table with values. But while executing the package it is not overwriting the local variable values. Means it is not taking the DB Table values instead it is taking the local variable value. What could be the reason and what i need to correct it ?

And While opening the package I am getting the following Error

Information while loading Trans_Im.dtsx: The package is attempting to configure from SQL Server using the configuration string ""OLEDBDestinationConn";"[dbo].[SSIS_Configurations]";"var_str_AriseAssociation_Id";".

Warning loading Trans_Im.dtsx: Ran out of memory


Sridhar



Assigning value to SSIS variable in script task...

$
0
0

Hi,

I want to update a table entry using the value of the SSIS variable. The variable needs to get updated when the package fails.it should go to the exception handler. there i have a script task for exception handling and that script is connected to a execute sql task where the procedure for updation is been called. The problem is i want to update the value inside the script and pass it to the procedure in the execute sql task. How the variable can be updated???

Please suggest....

Thanks

Suu30

Sucharita Dansana

Error in script task c#

$
0
0

Hi, since last two days i tried to run package but i got stuck with one error only. In script task my file path is my source file. It catch that file which is not exists in that folder. My file path is \\sss0000111\Unit-B\Test\CSV. Error is \\sss0000111\Unit-B\Test\CSV_SUM. It tries to catch CSV_SUM file which doesn't exist in Test folder. I am stuck with this and i dont know how to solve this. File path is variable in my C# script. Please guide me for this. 

using System;

using System.IO;

using System.Text;

using System.Data;

//using System.Math;

using Microsoft.SqlServer.Dts.Runtime;

 

namespace ST_8b99b23ffd944c6abe15bca3437320d8.csproj

{

    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]

    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

    {

 

        #region VSTA generated code

        enum ScriptResults

        {

            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,

            Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure

        };

        #endregion

 

        public void Main()

        {

            Dts.TaskResult = (int)ScriptResults.Success;

            Boolean fireagain = false;

            int taskResult;

            string fileSourcePath;

            string fileDestPath;

            StreamReader sr;

            StreamWriter sw;

            string Str;

            string delim = ",";

            string RecordType;

            //         Dim FileCreateDate As Date

            string LastRecordType = "   ";

            string FilesProcessed;

            string SourceFileName;

            string CurrentDate;

            string FileName;

 

 

 

 

 

 

 

 

            // Dim ret As Integer

            CurrentDate = DateTime.Now.ToString("yyyyMMdd");

            Dts.Events.FireInformation(-1, "CurrentDate", CurrentDate.ToString(),String.Empty, 0, ref fireagain);

 

            try

            {

               fileSourcePath = Dts.Variables["User::FilePath"].Value.ToString();

                fileDestPath = Dts.Connections["CGDP_RECON"].ConnectionString.ToString();

                FilesProcessed = Dts.Variables["User::FilesProcessed"].Value.ToString();//FilesProcessed

                FileName = Dts.Variables["User::FileName"].Value.ToString();

                //fileSourcePath = ReadVariable("FilePath").ToString(); //FilePath

                //fileDestPath = Dts.Connections["CGDP_INPUT.csv"].ConnectionString.ToString();

                //FilesProcessed = ReadVariable("FilesProcessed").ToString();//FilesProcessed

 

                //the value before we change it here

                Dts.Events.FireInformation(-1, "fileSourcePath", fileSourcePath, String.Empty, 0, ref fireagain);

                Dts.Events.FireInformation(-1, "FileName", FileName, String.Empty, 0, reffireagain);

                //  Dim valid As Boolean

                //  Dim fileID As String

                //  Dim contract As String

                int sep;

                sep = FileName.LastIndexOf("\\");//fileSourcePath.LastIndexOf("\\");

               

                

                SourceFileName = FileName.Substring((sep + 1));//fileSourcePath.Substring((sep + 1));

                Dts.Events.FireInformation(-1, "SourceFileName", SourceFileName, String.Empty, 0, ref fireagain);

 

                sr = File.OpenText(fileSourcePath+FileName);//File.OpenText(fileSourcePath);

                //string test = Dts.Variables[sr].Value.ToString();

 

                Str = sr.ReadLine();

 

                Dts.Variables[Str].Value.ToString();

To Copy and delete files

$
0
0

Hi All,

In SSIS i'm using For Each loop task to copy files, but how can i copy the files to a different location , process the rest of the package and then delet the source files from the source location? Do i need to use two script tasks?

Thanks


SV

How to raise exception in SSIS package using the output variable value from a stored procedure?

$
0
0

I have a stored procedure which will return a count...if it is greater than 0 then i want to raise a exception in the SSIS package that will stop the run/execution of the package. Is it possible??????

if yes can anybody suggest how to do it?????????

thanks in advance

Suu30


Sucharita Dansana


flatfile to db load

$
0
0

i got 1 flat file and i need to load in db.

file contains one "main transaction no.as Header"

under one transaction code so many "item lines ".

In flat file column name are different for Header and item.

source data is one line after another.No specified string length in source.

i have till now kept both header and item in different table.Now i dont know how both can put together.ItemLine  is dependent on Header.

how i will load can anyone help.

how to split a column value based on underscore in to 2 columns

$
0
0

Hi all,

I have data like this

afg_anil

cgh_kumar

and i need to split the above vallue into 2 column values i.e. 

col1 col2

afg anil

cgh kumar

please help me.

thanks,

Anilkumar

SSIS package error

$
0
0

I got this error SSIS package error after installation.

Kindly help. Thanks in advance.

Unable to Transfer large no of records (9 Million) from sql server to oracle 11g (64Bit) using SSIS..

$
0
0

Hi ,

I have SQL server 2005 SP4(on win 2k3 R2 32 bit)  from which i am transferring 9 Million recors to Oracle 11g(64 bit) .I have used both oledb provider for Oracle and ODBC driver for oracle to transfer data but all in vain.After transferring some 1 Lacs records its failing.

Please help

Error when using OLEDB provider

Error: 0xC0047011 at Data Flow Task, DTS.Pipeline: The system reports 98 percent memory load. There are 4294070272 bytes of physical memory with 60186624 bytes free. There are 2147352576 bytes of virtual memory with 180776960 bytes free. The paging file has 5727150080 bytes with 1734053888 bytes free.

Information: 0x4004800C at Data Flow Task: The buffer manager detected that the system was low on virtual memory, but was unable to swap out any buffers. 16 buffers were considered and 16 were locked. Either not enough memory is available to the pipeline because not enough is installed, other processes are using it, or too many buffers are locked.

error when using ODBC provider

[OLE DB Destination [16]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.  Source: "OraOLEDB"  Hresult: 0x80004005  Description: "ROW-00060: Internal error: [dainsert,16]ȷ"x ".

[OLE DB Destination [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "OLE DB Destination Input" (29)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (29)" 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.

PS: Using oledb i can transfer only 25 K records using ODBC i can was able to transfer 1Lacs

I also used database export wizard and i was able to transfer just 19lac records

and error which came was

 SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x8007000E.
An OLE DB record is available.  Source: "Microsoft Cursor Engine"  Hresult: 0x8007000E  Description: "Out of memory.".
 (SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task: SSIS Error Code DTS_E_PROCESSINPUTFAILED.


Shashank Singh Soldier..Sir we are surrounded from all sides by enemy.. Major: Good, we can attack in any direction Thats attitude..


SSIS SSH and MYSQL-DB

$
0
0

Hello dear fellow SSIS-Friends,

I am about to set up a BI-Solutions for my company, which is using a MySQL-Database.

I downloaded a MySQL Connector and it works fine with a dummy-DB running on localhost. Unfortunately, I can't connect to our company-DB. According to our Admin i need to connect with SSH. I searched the net for a solution - without a result so far, which is why i am asking you.

Is there a way in SSIS to connect to a MySQL DB via SSH?

I hope this question provides all necessary information and makes sense in some way.

Kind regards,

Jens

Converting from NVARCHAR to NUMERIC in SSIS

$
0
0

Hi Everyone,

I am currently working on a BI production and I have a data source that has NVARCHAR column which i want to convert to NUMERIC using SSIS components. I tried using Data Conversion but I keep getting an error..

Please, can someone advise me on the best way out.

thanks


me

csv source columns shuffle

$
0
0

I have csv source with below columns

Name, Age, Gender

Raj,30,M

I have destination table as below

Name,Age,Gender

The challenge is , source columns can be coming in any order. like eg : Age, Name,Gender or Gender,Name,Age etc...

i want to use ssis and load the source data into my destination table. kindly help me on the transformations to be used


ShanmugaRaj


DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER error code 0xC0202009.

$
0
0

Hi All,

I have a package with transactions implemented with required and I am trying to run the package on the production server which results in the above error. The google has thrown following answers to this error:

  1. Make delay validation to false (in my case its already false)
  2. Make the transaction supported (it will be useless if  I make them from Required to supported as i want to have a rollback in case of failure.)
  3. The tasks can be run individually (pointless as i have separate sequence containers with multiple tasks
  4. Turned the 64 bit runtime to false.

Error Details:

Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Source" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

I am still unable to figure out what is the problem. Can anybody help me on the same.


Thanks, Franco.


Error obtaining Integration Services Catalog (SSISDB) connection in PowerShell

$
0
0

Hi,

I have a PowerShell script that (among other things) establishes a connection to the SSISDB catalog. In my environment, the connection is made successfully. The same script fails in a different environment. I suspect environmental conditions, but I'm not sure how to track this down.

The relevant script snippet is:

$global:cat = 0
$global:ISNamespace = ''
$global:ssis = 0
$global:con = ''
#--------------------------------------------
#set-psdebug -trace 2

 # Load the IntegrationServices Assembly           
 $loadStatus = [Reflection.Assembly]::Load("Microsoft"+           
 ".SqlServer.Management.IntegrationServices" +           
 ", Version=11.0.0.0, Culture=neutral" +           
 ", PublicKeyToken=89845dcd8080cc91")           

 # Store the IntegrationServices Assembly namespace to avoid typing it every time           
 $global:ISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"           
 Write-Host "Connecting to server ..." -f cyan

 # Create a connection to the server           
 $global:constr = "Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI;"           
 $global:con = New-Object System.Data.SqlClient.SqlConnection $constr

 # Create the Integration Services object           
 $global:ssis = New-Object $ISNamespace".IntegrationServices" $con

The last line fails on the target host (script is run local in both cases):

New-Object : Exception calling ".ctor" with "1" argument(s): "Failed to connect to server ."
At C:\Users\jpage\documents\scripts\check1.ps1:24 char:27
+     $global:ssis = New-Object <<<<  $ISNamespace".IntegrationServices" $con
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Any help would be appreciated.

Thanks

SSIS connectivity to Tally

$
0
0

Hi All,

I have configured the Tally ODBC server to run on the Port 9000. But when I try to connec it thru ssis it gives me the following error.

Am I missing something?

Test connection failed because of an error in initializing provider. ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Thanks, Franco.



FTP file to multiple servers in SSIS

$
0
0

Hi,

I have to FTP a text file to multiple FTP server. The list of server can either be fetch from config file or some text file.

I tried to use FOREACH task to achieve this but I cannot find a way to enumerate through the server list from the file? Any suggestion is really appreciated.

Thanks,

Azim


SSIS process data that has special characters

$
0
0

Hi I am having difficulties with hidden characters.

I have the following and need to transfer this data to a .txt file. The query after the union works fine but the first one just wont pass through to the destination. If I put the query in a variable I get an error that there is invalid characters in the data. Please assist this line definately has to be part of the output

SELECT 
'Col1, ' + 'Col2, ' +'Col3, '  +'Col4'  as col1
union
SELECT		
			CAST([Col1] AS CHAR(6)) + 
			CAST([Col2] AS CHAR(2)) + 
			CAST([Col3] AS CHAR(4)) + 
			convert(varchar(7),convert(decimal(18, 2), [Col4])) 
FROM tabel1;

Viewing all 24688 articles
Browse latest View live