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

problem in sending file using SMTP in package

$
0
0
HI,
I have created package in which i used SMTP to send File to particular Email ID but when i run the Package ,following Error Displays

SSIS package "Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x402090DC at Data Flow Task, Flat File Destination [1]: The processing of file "E:\report\Package\North\23_09_2009.txt" has started.
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DD at Data Flow Task, Flat File Destination [1]: The processing of file "E:\report\Package\North\23_09_2009.txt" has ended.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "component "Flat File Destination" (1)" wrote 9561 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "Failure sending mail.  System.Net.WebException: Unable to connect to the remote server  System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 172.16.5.124:25".
Task failed: Send Mail Task
Warning: 0x80019002 at package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "package.dtsx" finished: Failure.



PLease suggest


Amit

SSIS - Updating a table with a OLE DB Command

$
0
0

I need to translate the next SQL Query in SSIS: (Each table belong to a different source - SQL Server & ORACLE)

update A
set
A.col1 = B.col1
A.col2 = B.col1
from
table A inner join table B B on A.col3 = B.Col3
where
A.col4 = value 1 and
A.col5 = value2 and
B.col4 = value 3;

As you can see, source and destination corresponds to the same source: table A. This is the work flow I have created:

After the conditional split I have used a Derived Column in order to copy the column B.Col1 to use it on the OLE DB Command to update the columns of table A After that, I have write the next piece of query in the OLE DB Command task:

update Table A set col1 = ? col2 = ?

where

A.col4 = 5 and

A.col5 = 5 and

A.col3 = ? and -- for the join

? = 11;

These are the values I used to prove the query:


Clarifications: The code is just a schema, so I do not need correction about it, that is not my doubt (in case I have made a mistake).

I was asked to make this translation without modifying the sql query.

I can not create staging areas.

If you need to know more to give help, please ask, but be polite.

Regards



SSIS Expression to get yesterday's date

$
0
0

Hi ,

I used the following expression to get yesterday's date :

(DT_WSTR,4)YEAR(GETDATE())
+ RIGHT("0"+(DT_WSTR, 2) MONTH(GETDATE()) ,2)
+ RIGHT("0"+(DT_WSTR, 2) DAY(DATEADD("dd", -1, GETDATE())) ,2)

It returns correct date but fails on last day of the month. Eg : If today is Feb 01 ,2015 , this expression returns 

20150231 (Feb 31 2015) . It should return 20150131 (Jan 31 , 2015) . What expression to use to get correct previous date?

Fuzzy lookup without Ms-SQL

$
0
0

Hi

Normally one needs for fuzzy lookup to load a (lookup) table in MS-SQL. Is it also possible to use / define such a table in Excel? I mean, is it possible to do fuzzy lookup without MS-SQL?

Thanks!

Gabi


gec

Require suggestions for the XML file validation

$
0
0

Hello,

I am working on an SSIS integration project and need some help in performing validations on a XML file.

Overview:

We need to pull the data from the XML files given and move it to the destination integrated system. In the input folder, we have 2 types of XML files. 

1) A summary File (XML): consists of the details of the XML files (data) like count of XML files, XML File Names etc. which need to be migrated.

2) Data XML Files: Different XML files (same format) with all the data which need to be migrated.

Requirement:

I need to validate the Summary file, move ahead only if the validation is success else log the error and stop. Here is how the validation should go:

- Read the Summary XML File

- Extract the data from the Summary XML File details existing in the file like count of files and file names.

- Get the count of the number of file names existing in the Summary XML file.

- Compare the count of the file names in Summary File with the count existing in the Summary XML file.

- If pass, insert the summary file details in the Summary table (DB table created) and move to the next processing stage else log the error and stop.

Can anyone please help me with the best possible ways of achieving this requirement?

Thanks & Regards,

Sri

Convert ActiveX DTS script task to SSIS Script task - Please help

$
0
0

Hello,

I Have a ActiveX script that was used in a DTS package but I'm currently trying to convert all my DTS packages to SSIS.The script is tasked to run the package on a daily basis. Everything works fine except the ActiveX script. It gives an error on my DTSGlobalVariables.parent, I looked up this error and changed it to "DTS.Variables("User::VariableName").Value", in the SSIS script task (in VB) but now I'm getting error: 

Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The element cannot be found in a collection.
 ---> System.Runtime.InteropServices.COMException (0xC0010009): The element cannot be found in a collection.

   bij Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100.get_Item(Object Index)
   bij Microsoft.SqlServer.Dts.Runtime.Variables.get_Item(Object index)
   --- Einde van intern uitzonderingsstackpad ---
   bij Microsoft.SqlServer.Dts.Runtime.Variables.get_Item(Object index)
   bij ST_f32fc12b60f34bebbbdfc0c5e5b40a96.vbproj.ScriptMain.Main()
   --- Einde van intern uitzonderingsstackpad ---
   bij System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   bij System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   bij System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   bij System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)

I have tried to convert this ActiveX script into a SSIS script task in VB but I know hardly any VB... So I'm wondering what the best course of action for me is, should I try to convert it into the script task like I am trying now, if so, how do I make it work?

Any help would be really really welcome.

This is the original ActiveX script that needs to be converted:

'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************
Function Main()

Dim sEnvironm
Dim sServer
Dim sSourceFile
Dim sSourcePath
Dim sBackupPath
Dim sErrorPath
Dim sFileName
Dim sUDLPath

'*********************************************************
' Set vars
'
' First 2 are depending on the server and db
' FILL IN THE RIGHT VALUES
'
'*********************************************************
sEnvironm = "MON_Datamart"
sServer =  "BrechtProesmans"



' --- DO NOT CHANGE ANYTHING BELOW THIS LINE ---
' ---
sSourceFile  = "C:\Program Files\Microsoft SQL Server\MON_Datamart\SourceFiles\tbl_L00T1.txt"
sSourcePath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\SourceFiles\"
sBackupPath  = "C:\Program Files\Microsoft SQL Server\MON_Datamart\BackupFiles\"
sErrorPath   = "C:\Program Files\Microsoft SQL Server\MON_Datamart\ErrorFiles\"
sFileName = "tbl_L00T1.txt"
sUDLPath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\MON_Datamart.udl"


'*********************************************
' Initial
'*********************************************
FoundError = False


'*********************************************
' Get a handle to the Package object.
'*********************************************
Set oPackage = DTSGlobalVariables.Parent


'**************************************
' Update DTSConnections
'**************************************
Set oConnection = oPackage.Connections("tbl_L00T1.txt")
oConnection.DataSource = sSourceFile

Set oConnection = oPackage.Connections("Datamart")
oConnection.UDLPath = sUDLPath

Set oConnection = oPackage.Connections("Truncate")
oConnection.UDLPath = sUDLPath


'**************************************
' Update DTSTasks
'**************************************
Set oTask = oPackage.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask
oTask.SourceObjectName = sSourceFile
oTask.DestinationObjectName =  sEnvironm & ".dbo.stg_tbl_L00T1"


'************************************
' Set Global vars
'************************************
DTSGlobalVariables("SourcePath").Value = sSourceFile
DTSGlobalVariables("BackupPath").Value = sBackupPath
DTSGlobalVariables("ErrorPath").Value = sErrorPath
DTSGlobalVariables("FileName").Value = sFileName


' ************************************
' Clean up.
' ************************************
Set oTask = Nothing
Set oConnection = Nothing
Set oPackage = Nothing

Main = DTSTaskExecResult_Success

End Function







SSIS UC4 Scheduler date issue

$
0
0

Hi

I am facing a weird issue and need your help.

At one of our client side when we run ssis package through UC4 (scheduler i have no idea )  the date implicitly converts into YYYY-DD-MM format and this is why our package is failing,

The culture setting of server is US English.

When I  run the package via batch file (dtexec command) the package runs fine and date is correctly parsed as YYYY-MM-DD (as expected)   but with uc4 it is giving problem.

If you have any experience with UC4 or any idea/ experience  about this problem please assist.

UC4 scheduler code is also inturn generating dtexec.



Hope that helps ... Kunal

The EXECUTE permission was denied on the object 'sp_ssis_addlogentry'

$
0
0

"The EXECUTE permission was denied on the object 'sp_ssis_addlogentry', database,.

I am able to execute package via VS SSIS studio, however, when I deploy the same package in SSIS agent it say's me above error.

Could you please help me in that. 


Script Task

$
0
0

Hi,

I have an .xls file in a shared folder. How can we convert this file into a txt file and save it with a different name in the same or different folder.

Thanks

Syed Faiz

unable to import Excel 2010 into SQL Server 2014

$
0
0

hi Gurus,

I was trying to import excel 2010 into SQL server and I just could not get it in. Can you give me links where similar issues happened? I just need to read as many issues and solutions. A link that shows similar issues should be good. 

Thanks in advance....


ebro

User-defined namespaces possible in SSIS 2008?

$
0
0

Hello,

I'm not an SSIS noob, but I don't understand why I see variables in my company's 2008 SSIS packages with the namespace "RowCountMetric." I'm used to seeing "User" and "System" namespaces, and indeed the 70-463 exam book says these are the only two that exist. The variables stored in the RowCountMetric namespace are row count variables intended only for the storage of result counts from various inserts, updates, and deletes. How did this namespace come to be?

Thanks, for your help,
Eric B.


Export Column help, ntext data doesn't export as a usable file

$
0
0
Hello, I'm failing at exporting what appears to be blob data in a database.  I setup a data flow task that is pretty simple,
OLEDB SOURCE
     |
DERIVED COLUMN
     |
EXPORT COLUMN

Source is sql server 2000 db in 2005 instance with mode (80)
Derived column is simple expression that parses a path and filename together
Export column uses the blob column (which is unicode text stream plus new filename), Truncate and BOM are checked

This process seems to work successfully, but the resulting files are garbage.  For example, one is a .txt file when opened, it contains exactly the contents of the database column for this row which looks like this excerpt:
begin 660 Call # 8114 Modules for METRO1 CU.txt
M34544DaQ($-5("`-"D1!5$$N0U4Q*#$I.E)53

Obviously I would expect real text here.  Can someone help me understand what I am not doing correctly?
Let me know if you need more information.

Problem with a package that calls powershell script

$
0
0

The long story short: I'm trying to schedule a SSIS package, with SQL Server Agent, that runs a powershell script/command via a proxy account. The problem seems to be that proxy account didn't have the required permissions to run a .ps1 script, so I've changed the execution policy to "Unrestricted" of everything that could be changed (from ps command prompt):

                                  Scope                         ExecutionPolicy
                                  -----                         ---------------
                          MachinePolicy                            Unrestricted
                             UserPolicy                            Unrestricted
                                Process                               Undefined
                            CurrentUser                            Unrestricted
                           LocalMachine                            Unrestricted

So far, so good! But when I try to execute the SSIS package that calls the powershell script like this:

powershell.exe -file D:\script.ps1 -FileName testme

I get the error:

AuthorizationManager check failed.+ CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecord
   Exception+ FullyQualifiedErrorId : UnauthorizedAccess

And when I try something more simple like:

powershell.exe -Command &{Get-ExecutionPolicy}

I get this:

Get-ExecutionPolicy : Access denied At line:1 char:3+ &{Get-ExecutionPolicy}+   ~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [Get-ExecutionPolicy], Managem
   entException+ FullyQualifiedErrorId : System.Management.ManagementException,Microsoft.
   PowerShell.Commands.GetExecutionPolicyCommand

It's worth mentioning that I can call the regular cmdlets: dir; get-content, whoami, so powershell.exe is working fine! Anyone with an idea what's going on here?


It's time for the TechNet Wiki SSIS "Great Guru Love-in"! You too can get some loving!

$
0
0

February at TechNet Wiki usually involves a lot of love...

 

We love to read.

We love to learn.

We love our gurus, for they love to give.

 

Computer Geek Love Story Stock Photos

 

We love to make friends and promote great content.

We love to meet the community, and get closer to you.

  

 

We love to interview our winners, and bestow much love and honor upon them.

We love to tell the world of your achievements, and we promote those most active to inner circles!

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!



#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!

MSORA and MSTERA data sources missing in Visual Studio 2012 / SQL Server 2014

$
0
0

Hi,

I'm building a brand new SQL Server 2014 environment to migrate existing production to. It's a fresh build with the detailed component versions shown at the end of this post. The problem that I am running into is that in an SSIS project, Visual Studio does not show the MSORA and MSTERA connection managers. Similarly, there is no sign of the Attuninty data sources.

I've tested the Oracle and Teradata clients and I'm pretty certain that they're installed correctly.  Going into the registry, I can see both the 64- and 32-bit entries for Oracle Home under HKLM\Software. For Attunity, I/m using the 3.0 adapters and I can see the expected 64- and 32-bit entries under HKLM\Software for software settings and registrations.    

I should mention that we are actively developing software on SQL Server 2008 and 2012 servers that use the Attunity Oracle and Teradata adapters for SSIS. No interoperability problems with those earlier versions.  I'm wondering if the issue might be with Visual Studio or SSIS.  Has anyone run into anything similar?

Build info:

OS Windows Server 2012 R2 Standard.  Includes KB2919355 - Windows Server 2012R2 Update

SQL Server 2014 - 12.0.2342.0 (X64) CU1

Oracle 11gR2 Clients - 64 & 32-bit

Teradata CLIv2 nt-x8664 14.10               
Teradata Data Connector nt-x8664 14.10      
Teradata GSS Client nt-x8664  14.10        
Teradata OLE DB Access Module nt-x8664 14.10    

Microsoft Visual Studio 2012 Shell (Integrated)
    Version 11.0.50727.1 RTMREL
    Microsoft .NET Framework
    Version 4.5.51641

    Installed Version: IDE Standard

    Microsoft Visual Studio Tools for Applications 2012   04932-004-0017006-02028
    Microsoft Visual Studio Tools for Applications 2012

    Visual Basic 2012   04932-004-0017006-02028
    Microsoft Visual Basic 2012

    Visual C# 2012   04932-004-0017006-02028
    Microsoft Visual C# 2012

    SQL Server Analysis Services   
    Microsoft SQL Server Analysis Services Designer
    Version 11.0.3436.0

    SQL Server Data Tools   11.1.41025.0
    Microsoft SQL Server Data Tools

    SQL Server Integration Services   
    Microsoft SQL Server Integration Services Designer
    Version 11.0.3436.0

    SQL Server Reporting Services   
    Microsoft SQL Server Reporting Services Designers
    Version 11.0.3436.0


SSIS 2008 sending email

$
0
0

Hi,

I would like to know if this is possible to do, I have build some SSIS transformation using derived columns and data conversion.
I have configure the error output to write information on a plain text file. My question here is : is it possible to send an email when information is written to the text file. I want to be able to check files only when data is written on them instead of checking them every day to see if some record has not been process

Thanks

  

Derived column using SQL

$
0
0

Hi All,

I am trying to create ETL using store procedure .

Please helo me to create derived column in qyery

add columns
TimeIn =GETDATE()
BBxKey =100
LatestVersion=1

Thanks in Advance

Regards,

Vipin jha


Thankx & regards, Vipin jha MCP

Can we call Data flow Task as Container

$
0
0

Hi All,

Can we call Data flow Task as Container  If So what are conditions required to Satisfy as a Container 

Thanks

Ravindra

SQL Agent Job fails due to excel import

$
0
0

I  have SQL SERVER 2012 SP 1.  I have a package which imports a generic spreadsheet into a import table and then does does other stuff with it.

I can happly run the SSIS package through BIDS but fails when I try and run it though SQL agent.

with errors such as Microsoft.ACE.OLEDB.12.0.  Provider is not registered on this machine.

Within the SSIS I use the Excel connection manager and have modifed the string to

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\FileDropTest\Fusion.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;IMEX=1";

and re deployed and still get the same issue. 

I then enabled xp_cmdshell and tried from TSQL

DECLARE @Qry VARCHAR(8000)
SELECT @Qry = 'dtexec /FILE "D:\SSIS\export\Fusion.dtsx"'
EXECUTE xp_cmdshell @Qry

and got

output
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.5058.0 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.
NULL
Started:  5:49:25 PM
Error: 2015-02-09 17:49:25.43
   Code: 0xC001000E
   Source: Fusion
   Description: The connection "{3076028A-D7D9-4432-AADB-CAC6D9AD5995}" is not found. This error is thrown by Connections collection when the specific connection element is not found.

  As a different approach it was recommended to use OLEDB however within BIDS I the connection tests fine but when I run it though BIDS it fails

[OLE DB Source [79]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "D:\FileDropTest\Fusion.xlsx" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

For refrence I ve also set the delay to true.

I'm a bit stuck as I thought importing a spreadsheet being Microsoft product ;) would be fairly easy .  Any Help on this matter would be great.

[sysssislog]

$
0
0

Hi 

i am maintaining a error log in [sysssislog] table .a package failed with datacode -1073450936 

and identified reson as 

The buffer manager cannot create a temporary storage file on any path in the BufferTempStoragePath property. There is an incorrect file name or no permission or the paths have been full.

how to fix this

Thanks in Advance


ADKR



Viewing all 24688 articles
Browse latest View live


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