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

Parameterized Date in Remote Stored Procedure Call

$
0
0

Hi Experts,

I am using the below code in the SSIS package.

DECLARE @return_value INT
DECLARE @sDate as DATETIME
DECLARE @eDate as DATETIME
SET @eDate  = GetDate()

exec @return_value = [ServerInstance].Database.dbo.sp_StoredProcedure
        @UserName = N'User',
        @Password= N'password',
	    @DateStart=  ? ,
        @DateEnd  = @eDate

I want the parameter value to be passed to the stored procedure @DateStart.

Before this OLEDB source task I have created Execute SQL Task to set the date to a variable created.

I am trying to pass the set date in the variable to the @DateStart variable in the above Store Procedure. But I get syntax error.

I appreciate if anyone can tell what I am missing.


SSIS log provider for xml files. Release XML, the file stays locked after execution

$
0
0

Hi guys!!Has the title says, I am using the SSIS log provider for xml files in one of my package.  The problem is that the file is kept locked after execution.  I don't get it!!  I've been using the same log provider in all of my packages...  but this one? Nope!! Not working properly!!  Any idea why ? 


Mylene Chalut


Download specific pattern files from FTP Server (VB.NET)

$
0
0

Hi,

I have a folder in my FTP server where there are 10-15 files. How can I download specific pattern files from FTP. I need just 2 files out of 10

File names as

1.  ABC Users-20160315T233101.csv

2. ABC - Workflow - Daily Update-2016-03-07-22-30-06.csv

P.S-> I am very beginner in VB (have to do in script task)

Till now , the code i am using(below)  is running only when i am passing full file name from database table in FTP pattern (which is not correct)  like ABC - Workflow - Daily Update-2016-03-07-22-30-06.csv

# My working Code

all variables taking values from database table and i am using script task in for each loop

Dim FTP_Path As String = Dts.Variables("User::lvar_File_Source_Path").Value.ToString
                Dim FTP_UserName As String = Dts.Variables("User::lvar_FTP_UserName").Value.ToString
                Dim FTP_Password As String = Dts.Variables("User::lvar_FTP_Password").Value.ToString
                Dim FTP_In_Path As String = New_Dir
                Dim File_Pattern As String = "/" + Dts.Variables("User::lvar_File_Source_Pattern").Value.ToString

 FTPCopy(FTP_Path, FTP_UserName, FTP_Password, FTP_Pattern, File_Pattern, FTP_In_Path)

Function

 ' This Function is used to downlaod files from FTP
    Public Sub FTPCopy(FTP_Path As String, FTP_UserName As String, FTP_Password As String, FTP_Pattern As String, File_Pattern As String, FTP_In_Path As String)

        'Setting URL Properties
        Dim URI As String = FTP_Path & FTP_Pattern
        Dim ftp As System.Net.FtpWebRequest = _
            CType(FtpWebRequest.Create(URI), FtpWebRequest)

        'Setting FTP credentials
        ftp.Credentials = New  _
            System.Net.NetworkCredential(FTP_UserName, FTP_Password)

        'Settings and action
        ftp.KeepAlive = False

        'we want a binary transfer, not textual data
        ftp.UseBinary = True

        'downloading FTP File
        ftp.Method = System.Net.WebRequestMethods.Ftp.DownloadFile

        'Get the response to the Ftp request and the associated stream
        Using response As System.Net.FtpWebResponse = _
              CType(ftp.GetResponse, System.Net.FtpWebResponse)
            Using responseStream As IO.Stream = response.GetResponseStream
                'loop to read & write to file
                Using fs As New IO.FileStream(FTP_In_Path + File_Pattern, IO.FileMode.Create)
                    Dim buffer(2047) As Byte
                    Dim read As Integer = 0
                    Do
                        read = responseStream.Read(buffer, 0, buffer.Length)
                        fs.Write(buffer, 0, read)
                    Loop Until read = 0 '
                    responseStream.Close()
                    fs.Flush()
                    fs.Close()
                End Using
                responseStream.Close()
            End Using
            response.Close()
        End Using
    End Sub

Will really appreciate your help..

Thanks


shaky

bhishek

Issue in SAP-SSIS integration using Microsoft BI connector

$
0
0

Hi,

I am getting below error message,

“[SAP BW Source] Error: An internal exception occurred.

Microsoft.SqlServer.Dts.SapBw.Connectivity.ERPException: An error occurred during the dispatch of the incoming function. The last return code was "RFC_FAILURE".

&&

It indicates that issue is on SAP end. As per SAP BI team, Process chain is working fine and able to read records. However, It while sending the data, the RFC breaks again and again.

As per SAP Basis Team, RFC is working fine. And they are sure about it.

I have checked SSIS, SQL, MS BI Connector, Libbrfc32.dll, and everything multiple times.

I want urgent guidance on this issue. What exactly needs to be changed on RFC end to make it successful.

Please help !!!!

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

Thanks,

Saagar Kinja

SSIS -> Oracle: connectors

$
0
0

We need to export some data from a sql 2014 server to an Oracle 11g (I believe) server on a regular basis. I've never done that before but I saw the connection "Oracle provider for OLE DB" provided with SSIS and wonder if that is the way to go?  Do I need to download a more up-to-date version? Also, I just read about a free "Attunity" connector to Oracle. Is that a better way to go than OLE DB?

TIA,

edm2

P.s. Ooops! Just read that the Attunity connectors are for Enterprise Sql only. We have standard so they are not an option for us

having trouble running a project originally created with vs 2005

$
0
0

trying to open the project with vs 2015 community and getting the following error:

I:\Automated Processes\DTSScripts\LoadWarehouse\LoadWarehouse\LoadWarehouse.dtproj : error  : The XML element DeploymentModelSpecificContent is missing from the file named: I:\Automated Processes\DTSScripts\LoadWarehouse\LoadWarehouse\LoadWarehouse.dtproj.

see the previous thread for more details. 

https://social.msdn.microsoft.com/Forums/vstudio/en-US/8f2acee5-1de9-4af9-855f-9868996c6393/visual-studio-2015-community-cant-open-project?forum=visualstudiogeneral

if anyone can provide me some more direction on getting this to work that would be great. 

SSIS or pure SQL for performance

$
0
0

Hi,

I have a 2 databases on the same server. At the moment the transfer between the 2 databases is done via SQL, just simple DBname.dbo.source -> DBName2.dbo.destination.

Will it be faster to use SSIS instead. I am not talking about easy of use, error handling etc, just for pure  performance which is the main concern as the process takes hours apparently. I can't do any real tests yet as my SSIS doesn't run under VS2015 (yet). Any opinions, experiences to share?

Thanks,

Panos.

Data validation in SSIS - Date column and a lookup

$
0
0

Hi

I've seen a lot of questions about this but still can't figure out how can I validate an Excel file that I want to import into SQL Server DB. 

What I have is a date column which sometimes has invalid dates. I would like to check this column and if it contains invalid data then prevent to import any rows at all to let the user correct the file. 

Also, I have another column that is a foreign key in the table and want to check that all the rows to be inserted have a valid key, with this key I also made a lookup to get some information of the foreign table (this last bit about the lookup I'm already able to perform). Like the case before, I would like to prevent any data importation if the key doesn't exist in the foreign table.

I'm new using SSIS and still can figure out how to make decision based on the previous requirements. I'm open to hear other implementation ideas.

Thank you in advance


Excel source truncates data with more than 255characters

$
0
0

Hi,

I have an excel file in which some columns can have data more than 255 characters, but when i read the data through SSIS Excel source, it truncates data to 255characters. I have tried following approaches which did not work:

  1.       Advanced Editor – Output columns – change data length
  2.       Change connection string of excel data source & add “IMEX=1” at the end of it.
  3.       Change Excel Registry key “TypeGuessRows” = 10000

Any other suggestion apart from these?

SSIS Variable Connection string

$
0
0

All, What all I am doing is just reading from a table and dumping into a text file. This package runs everydays and generates a new text file in the folder i point to. I have a problem is just adjusting the naming convention.

Note: Right Click on text File Connection Manager --> Properties --> Expressions -->Property Expression Editor --> Expression Builder

What I have:

"Calculate_" +
 (DT_STR,4,1252)DATEPART("YEAR",GETDATE()) +
 (DT_STR,2,1252)DATEPART("MONTH",GETDATE()) +
 (DT_STR,2,1252)DATEPART("DAY",GETDATE()) +"_" +
 (DT_STR,2,1252)DATEPART("HOUR",GETDATE())  +
 (DT_STR,2,1252)DATEPART("MINUTE",GETDATE())

When i Run i Get: Calculate_2011720_1057

What I want: Calculate_20110720_1057 --> If the result of expression is one digit then add "0" to it else leave it.

How can I achieve this?

Thanks

FailPackageOnFailure question

$
0
0

Hi,

I have this simple package where it fetches the files from FTP server, parses it, if there is a parsing error, then move file to an error folder. Delete the file from FTP server.

** I would like the package to keep fetching files from the FTP server even if there is a parsing error. **

The FailPackageOnFailure property of Process EDI File is False.

My problem is that the package stops as soon as there is an error in the script task of Process EDI file.

How can I ensure that package keeps running for all the files even if the Process EDI file component fails?

Thank you

SQL 2016 RC3, SSIS package randomly stops processing

$
0
0

I have an SSIS package that runs every minutes. It's handling some sync logic between two systems. The checks are queries against the CDC tables to see what if anything has changed and then syncing those changes records (in denormalized form) to a second database. The job can run up to 5 days without any issues. Then at other times it locks up every few hours.  The exact location in the SSIS package varies and there are never any queries running against the database server etc.  It appears to be at the end of sequence containers.  Wondering if anyone else is having similar issues, or know of a way to figure out what is causing the problem.  Verbose logging is showing nothing of import that I can tell.

SSIS package failing to encrypt the .txt file to gpg.

$
0
0

Hi All,

I have SSIS package  which is creating  "txt" file with some data and then encrypting the txt file into  "gpg" by calling a ".BAT" file, this package is working fine in our Prod environment,
In the process of mygration we are moved this package from one server other server.(same version sql server,same version of OS).

after moving  this SSIS package it is able to create "txt" file but failing to do encryption(gpg).
We verified this packge by running with Visual studio 2008.
we found that it is looking for one input parameter."Use this key anyway?(y/n)"


Encryption process of .bat file

gpg --import D:\myfolder\xxxxx.xxxx.com.asc
gpg -r xxxx.xxxxx.com --encrypt D:\myfolder\*.txt

while running above .BAT file from SSIS package, It is opening "cmd" and asking  "Use this key anyway?(y/n)" after typing "yes" it is able to encrypt.

Some body help me how to pass "yes" to the SSIS package to resolve this issue.

Thanks in adavnce

 

SNIVAS

SSIS throwing an error: [Execute SQL Task] Error: Executing the query "ET.SPName @RunID ..." failed with the following error: "The type is not supported.DBTYPE_VARIANT".

$
0
0

Hi All,

I am getting the above error message while while executing my package. This error is happening on a execute SQL task where it is using the OLE DB connection. In the task it is calling the stored procedure with some of the parameters to it.

Here is the following stored procedure it is calling:

ALTER procedure [ET].[SPName]
(
            @RunID  INT
,@RCount INT
,@ECount INT
,@SID INT
,@SDetail TEXT = ''

)
as
set nocount on

declare  @P_ID bigint
      , @P_Source varchar(1000)
  , @P_SourceTableORFile varchar(1000)
  , @P_Target varchar(1000)

--select  @P_Target = ConfiguredValue
-- from
[ET].Configurations (nolock)
-- where
ConfigurationFilter =  convert(varchar,@P_NameID)
-- and PackagePath = '\Package.Connections[TargetDBConnection].Properties[ServerName]'

update [ET].BatchRun
set ProCount  = @RecordCount
,ECount = @ErrorCount
,PackageRunId = @StatusID
,PackageDetailText = (select standardCodeShortDescription from ups.slookup
where CName = 'ProgramRunStatus'
and sLookupId = @StatusID) + ' - ' + cast(@StatusDetail as varchar)
,PEndDateTime  = getdate()
where BPackageId = @BatchRunID


I am searching on the web for this error, and could not find the correct solution for this error. Can anyone help me in this?


Rahul



Type conversion in SSIS

$
0
0

Hi All,

I want to convert a string column to integer column (all numeric values to integer and alpha-numeric vales to null). I am able to perform this with the help of a expression. But the expression also converts "." (dot) to 0 (zero). For my requirement,"." (dot) should be treated as null. Please help me to write an expression.

Here is the expression I am using:

(DT_I4)column ==(DT_I4)column ? (DT_I4)column : NULL(DT_I4)

Requirement Example 

Input

1

0

2a

.

4

Output

1

0

null

null

4



Error while importing Text file using Import Export Wizard

$
0
0

Hi all

i have text file where i can import it to excel to access or sql2000 without problem but when i import it using (sql2005 pro) i get this error message during the import



O

peration stopped...

- Initializing Data Flow Task (Success)

-

Initializing Connections (Success)

-

Setting SQL Command (Success)

-

Setting Source Connection (Success)

-

Setting Destination Connection (Success)

-

Validating (Success)

-

Prepare for Execute (Success)

-

Pre-execute (Success)

Messages

Information 0x402090dc: Data Flow Task: The processing of file "C:\Documents and Settings\Wail\Desktop\All_Alarm5.txt" has started.
(SQL Server Import and Export Wizard)

-

Executing (Error)

Messages

Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "FRDNAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task: The "output column "FRDNAME" (25)" failed because truncation occurred, and the truncation row disposition on "output column "FRDNAME" (25)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

Error 0xc0202092: Data Flow Task: An error occurred while processing file "C:\Documents and Settings\Wail\Desktop\All_Alarm5.txt" on data row 9.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task: The PrimeOutput method on component "Source - All_Alarm5_txt" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "SourceThread0" has exited with error code 0xC0047038.
(SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0047039.
(SQL Server Import and Export Wizard)

-

Copying to [DXB_Data].[dbo].[All_Alarm5] (Stopped)

-

Post-execute (Success)

Messages

Information 0x402090dd: Data Flow Task: The processing of file "C:\Documents and Settings\Wail\Desktop\All_Alarm5.txt" has ended.
(SQL Server Import and Export Wizard)

Information 0x402090df: Data Flow Task: The final commit for the data insertion has started.
(SQL Server Import and Export Wizard)

Information 0x402090e0: Data Flow Task: The final commit for the data insertion has ended.
(SQL Server Import and Export Wizard)

-

Cleanup (Success)

Messages

Information 0x4004300b: Data Flow Task: "component "Destination - All_Alarm5" (64)" wrote 0 rows.
(SQL Server Import and Export Wizard)

 




=============================


**** from the error message (Executing)  error number 2 and 3 it shows that the error is comming from the (column FRDNAME) and row number 9 ...

this cells contains the following text:  ;Ruwais5 B60_Baynounah_R_H_Camp_PH rack1 shelf1 db4g 0;
where the ";" is the delimiter

moreover when i remove this row other problem comes in diffirent location with the following text: ;((AvailabilityStatus,failed ,),(OperationalState,disabled ,));
where the ";" is the delimiter


**** from the error message (Executing)  error number 1
there is somthing called ( code page ) this can be modified from the wizard it self and there are many options to choose. i tryed many of them but without solution


i hope that i will find solution for my problem

thank you



SSIS XML source not pulling in Root level attributes

$
0
0

Using SSIS in visual studio 2015 and the XML source still doesn't retrieve the root element attributes.  I have seen older posts on this but is this bug going to be fixed any time soon?

SQL 2014 - How to import all CSV files in a folder into a single table.

$
0
0

Hi,

I'm very new to SQL and i'm trying to create a script that imports all CSV's from a folder into one table in management studio.

All the tables are in the same structure and have a title column.

Thanks in advance for your help.

Akhil

Distinct values in SSIS

$
0
0

 

Hi Team,

 

  TableA has (id, name,val)

  TableB has (id,access)

 

I need id,name,val,access.... I have done a merge join between these tables so that, On inner join

am getting the id,name,val,access ... Is it correct ?

 

My problem is, I am getting lot of duplicates and I need to avoid those duplicates by providing distinct condition.

 

How can we achieve this?

 

I have tried sort task but, it will do a full blockage... Any help please?

 

Regards,

Venkatesan Prabu .J

http://venkattechnicalblog.blogspot.com/

 

 

SSIS with MySQL and Oracle stops when importing

$
0
0

Hello Support

I have a SSIS package that exports data from MYSQL into Oracle, when I run in Visual Studio the package runs, when I run the package under SQL Agent the package starts and will import data into the first table, but it will randomly stop at different intervals and import records into the table.

The error message I get is the following;

Message
Executed as user: TELFORD\Sql. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.5058.0 for 32-bit 
Copyright (C) Microsoft Corporation. All rights reserved.    Started:  14:08:50  Error: 2016-05-17 14:16:24.24     Code: 0xC02090F5    
Source: SITE_INCOME_STAGING Cybertill [2]     Description: The Cybertill was unable to process the data. Fatal error encountered during data read. 
End Error  Error: 2016-05-17 14:16:24.24     Code: 0xC0047038     Source: SITE_INCOME_STAGING SSIS.Pipeline    
Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Cybertill returned error code 0xC02090F5. 
The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component,
but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure. 
End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  14:08:50  Finished: 14:17:55  Elapsed:  545.093 seconds. 
The package execution failed.  The step failed.

Has anyone seen this error before?  Do you know what I should try?

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>