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

An OLE DB error has occurred. Login failed for user

$
0
0

Hi there.

I am setting up my first SSIS package and have no problem debugging in BIDS, i.e. Package runs from end to end without any errors.  However, when I schedule the job in the SQL Server Agent, it fails at what seems to be the login to the source server.  A section of the error text as below:-

Code: 0xC0202009     Source: Package1 Connection manager "SourceConnectionOLEDB"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'tsmreports'.".  End Error  Error: 2010-09-09 13:52:01.38     Code: 0xC020801C     Source: Data Flow Task 1 Source - AccountPeriod [1]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009.

Whilst the package has the user id and password for the Source saved within it, do I need to set up a separate connection string in say a variable and execute this as part of the package?  If so how do I do this?

Cheers,

Niven

 

 


Exception from Hresult:0Xc0202009

$
0
0

 

hi all,

I am using SSIS package to transfer data from 4 tables of one Server to another server(Using SQLConnection).

All works fine while runinng in Debug mode.

But while running the application(Which calls SSIS and creates Pacakage),it is creating only one package instead of creating 4 and resulting in error.

 

"Exception from Hresult:0xc0202009"

 

Please help me to solve this issue.

 

Thanks in advance,

Sangeet

SSIS 2008 R2 Package Distribution Strategy

$
0
0
Hi,

I currently have a SQL Server database product with which I would like to distribute some packages for customers to use for importing and other processes. Obviously these package must run using connections and file locations that would not match those when developed.

My current strategy is:

- Provide a dtsConfig file which has entries for database connection string and an email server connections string. This is set to Indirect XML Configuration where customer would be required to create an Environmental Variable that contains the name and path to the dtsConfig file

- For files location and other values, I have taken a data-driven approach, e.g. a set of tables contain the information the package needs. During testing this seem,s to work quite well for my needs.

- All tasks and connections managers have the DelayValidation set to True

Does anyone know if this would be a viable strategy for distributing packages to 3rd parties? If not, any suggestion or pointer to reading materials.

Thanks
Steve

Thanks Steve

RowCount Transformation - increment variable value

$
0
0

Hi ,

SSIS 2008 R2. I would like to use the RowCount Transformation to Increment the value of a variable as opposed to over writing it.

Basically I have more than one Data Flow and for each one I would like to add to the previous data flows RowCount value.

Can this be done or do I need to create a separate variable for each data flows and then add the values at the end?

Thanks

Steve


Thanks Steve

find the sql agent job that runs a certain package according to the package name

$
0
0

Hi,

I have knowledge of a package name but I do not know what is the agent job name that is running it.

Is there an elegant search that can be done via sql or any other smart search, other than going through all the jobs one by one (there are hundreds of them in our system)

Thanks,

Dani

ssis 2012 deploy a package

$
0
0

Hello,
I am using sql server 2012.
Packages are created in SSDT 2013

How is it possible to deploy just one package to the server please?
i.e. package level rather than project level

Thanks

Execute Multiple SSIS package parellely

$
0
0

Hi All ,

In my project , I have around 10 package which simply loading data from txt file and generating new csv files

I have all the package name in one object table and I am looping it and executing, but here package are getting executing one at a time in sequentially.

I am executing package using below query by passing package name as parameter from table

Declare @intExecutionID bigint
, @status BIGINT = 1
,@Job_ID int =100
,@Env_ID int = 12
,@PackageName nvarchar(1000) = ?

EXEC catalog.Create_execution 
@folder_name = 'DataPlatform',
@project_name = 'DataPlatform',
@package_name = @PackageName,       -- parameterized
@reference_id = @Env_ID, /*** Environment reference id , double click on the environment and in general tab see the value for identifier*****/
@use32bitruntime = 0,
@execution_id = @intExecutionID out

--setting parameters
EXEC Catalog.set_execution_parameter_value 
@execution_id = @intExecutionID,
@object_type = 30, /*Use the value 20 to indicate a project parameter or the value 30 to indicate a package parameter*/
@parameter_name = 'parJobID',
@parameter_value = @Job_ID  /*if int the direct value ex: 1, if string them in quotes ex:"Sam"*/

EXEC [SSISDB].[Catalog].[start_execution]
@execution_id =  @intExecutionID

--check if the child package is still running
WHILE(@status = 1 OR @status = 2 OR @status = 5 OR @status= 8)
BEGIN
PRINT @status
PRINT 'waiting 1 min for Package to finish'
WAITFOR DELAY '00:00:05'; /*set the amount of time it needs to wait before rechecking status*/

SET @status = (SELECT [Status] FROM SSISDB.[catalog].[executions]
        WHERE execution_id = @intExecutionID);
if (@status=4)
begin
 raiserror('please see All Executions Report on the Server for more details',16,1)
end  
  
END

My requirement is is to call all the 10 package at the same time so it can reduce the ETL load time.


Thankx & regards, Vipin jha MCP

Email notification from SSIS / SQLServer for jobs which have run successfully after a failure

$
0
0

I need to configure sending email notifications to stakeholders using SSIS. Am able to send one for failure OR success using SQL server agent i.e. using Operator, but my case is: if the ETL fails, then it should send email notification (1) of failure; and once the issue has been resolved, it should send another email notification (2) stating it is resolved and the job was completed successfully. I do not however intend to send emails for successful cases daily. Also, I need to customize the email body to explain the situation. Example of the email body:

Notification 1: Notification of an issue:

Unscheduled Application Outage Notification – XYZ (application name)

Issue/Outage Start: Monday x/xx/xxxx X:00 PM Cause: SSIS Status: The isssue is being reviewed Impact: Production environment will be unavailable during the outage

Notification 2: Upon resolution of the issue:

RESOLVED Unscheduled Application Outage Notification – (application name)

Issue/Outage Start: Monday x/xx/xxxx X:00 PM Issue/Outage Resolved: Monday x/xx/xxxx X:00 PM Cause: SSIS Status: Issue resolved Impact: Production environment is now available

Any help on this is much appreciated.


SSIS Server Maintenance Job keep Running since 5 days ago

$
0
0

Hi Guys,

i have a problem with SSIS Server Maintenance Job, i want to shrink my SSIS DB when it became 300GB,

when i changed the retention policy date to be 30 days, i ran the SSIS Server Maintenance Job, and then the job keep running since 5 days ago, and i didn't see any different with the size of the SSIS DB.

and then i've got frustated with this problem, and i found this link

https://devjef.wordpress.com/2015/02/03/ssisdb-why-bigger-isnt-always-better/#comment-1851

and when i try to run the query, i guess my sql server isn't know data type such as [internal].[adt_name], because the error is just like this below statement.

Msg 2715, Level 16, State 3, Procedure cleanup_server_retention_window_truncateall, Line 1
Column, parameter, or variable #9: Cannot find data type internal.adt_name.
Parameter or variable '@key_name' has an invalid data type.
Msg 2715, Level 16, State 3, Procedure cleanup_server_retention_window_truncateall, Line 1
Column, parameter, or variable #10: Cannot find data type internal.adt_name.
Parameter or variable '@certificate_name' has an invalid data type.

maybe you have a solution guys?

Thank you.


yoga

SSIS package - Any simple way to log custom message and Variable value

$
0
0

Hello,

Is there any simple way to log custom messages and variable values in SSIS log file.

I selected "SSIS log entries for events to the Event log" now i want to write some custom messages and want to check value of variable during execution of foreach loop.

With RaiseChangeEvent, i can get entry in log file but without value.

I looked at multiple post, everyone is talking about writing script or something like that to get it done.

Any pointers will help me to get it in a simpler way.


Technical Project Manager cum Architect

SSIS 2014 - Designer bug shows 0 rows

$
0
0

The bug occurs in the package designer Data Flow when executing a child package from a parent package using an Execute Package Task.

SSIS 2014 child packages shows 0 rows in data flow tasks. This bug occurs when executing child packages from a parent in designer mode. It shows 0 rows in data flow but progress is being updated with correct number of rows. I have tested this on both VS2013 + VS2015 but no change.

Anyone knows any workaround.


dynamic flat file destination

$
0
0

my destination flat file is dyanmic,  based on column values,  i populate flat file

connection string will be like this

"C:\Data\LocationData\Loc_123.csv"
"C:\Data\LocationData\Loc_456.csv
"C:\Data\LocationData\Loc_789.csv"

in flat file connection string expression i am setting like this


""C:\Data\LocationData\Loc_"++  @[User::locid] +   ".csv"

@[User::locid] getting data by running sql query from table, it is dynamic

getting error message file not exists, 

is it possible to create file dynamically 


Thanks

V

Package with .bat and .exe run in local but not in agent even if doesn't retrieve error

$
0
0

Hi guys, I've got a package that, among other tasks, trigger a .bat file which trigger an .exe file. It does work if I run from my machine but it doesn't work if I run from Agent. No error retrieved but the file .bat doesn't trigger the .exe .

Besides when I run the package from my machine it shows me the dos with the code...and I am guessing if server side is this allowed or not. I mean to run the .bat file.

Any suggestion? Thanks


Error installing SSDTBI_VS2012_x86_ENU.msi

$
0
0

Hello,

Please can you help me solve the below error when installing Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012.

Below is the exact error :-

---------------------------
Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012
---------------------------
An error was encountered.

Unspecified error
---------------------------
OK   
---------------------------

Softwares I have installed :-

1. OS : Windows 8 Pro 64 Bit

2. Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64)
    Dec 28 2012 20:23:12
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )

3. MS Visual Studio 2012 v11.0.50727.1 RTMREL

Note : Same setup works on Windows 7 OS meaning the msi is NOT corrupt.

Thanks,

Shirish

To create .xlsx extract using SSIS 2014 for records size which will be always below 20,000 should I use CTE or temp tables?

$
0
0

To create .xlsx extract using SSIS 2014 for records size which will be always below 20,000 is the below approach right 

I will be using a Execute sql task and you extract data from Datawarehouse and will dump the data in a table and from the table I will map the data to a .xlsx file .

I have question though if I should be using a #temp table or ## temp table or a CtE  to host the data which I pull .

The sql query in the execute sql task  is pretty much straight forward as a user's attributes are picked up from some 6 reference tables using a left join  giving always less than 20000 records.





Load float from excel source to string in SQL Server in SISS version 2012

$
0
0

I have one spreedshet in Excel 2007, in this datasource I have one column with float and string data, I need load this columns to sql using SISS

Date Example:

row1 : 0

row2 : 0

Row 3 : "Voluntary"

Row 4 : "Mandatory"

When import this data to one field defined how Varchar(50), only load the rows with numeric data, the other rows are imported how null.

How solve this

Best regards

Audit Batch Load Number (ETL Load ID)

$
0
0

Hi all,

I want to introduce a Batch load number or ETL Load ID in my ETL solution so that i can restart the packages based on that.

I have implemented custom audit for packages start and end time , and for number of records updated and inserted by executing stored procedures in start and end of packages in Exec Sql task which will insert in an created audit table.

Like above said i want to introduce a unique number for each run of ETL , if i execute 50 packages using Master package i want to identify all these packages with a unique Id .

Please let me know how to implement this if anybody implemented using SSIS.

Thanks in Advance

Varun

 

Is it possible to execute package tasks in parallel with different package parameters?

$
0
0

I want to run a package in parallel with different start and enddates instead of one at a time in a loop.

I found cozyroc parallel loop task, but it cant seem to cope with package parameters, complaining that it was not found in the Variables collection.

This seems to me should be a fairly common problem, are there any standard ways to dealing with this?

Thanks

Jon

How do I download Files of Certain Extension (PGP) from FTP Site using VB Script Task in SSIS 2012?

$
0
0

Hi,

I've written the following code in a SSIS 2012 script task:

PublicSub Main()'' Add your code here'Const localFile AsString="C:\mydir\myfile.pgp"ConstremoteFile As String = "ftp://IPAddress/download/myfile.pgp"Const host AsString="ftp://IPAddress"Const user AsString="username"Const pw AsString="password"Dim URI AsString= host &remoteFileDim ftp As System.Net.FtpWebRequest =CType(FtpWebRequest.Create(URI), FtpWebRequest)

        ftp.Credentials =New System.Net.NetworkCredential(user, pw)
        ftp.KeepAlive =False
        ftp.UseBinary =True
        ftp.Method = System.Net.WebRequestMethods.Ftp.DownloadFile

        Using response As System.Net.FtpWebResponse =CType(ftp.GetResponse, System.Net.FtpWebResponse)
            Using responseStream As IO.Stream = response.GetResponseStream
                Using fs AsNew IO.FileStream(localFile, IO.FileMode.Create)Dim buffer(2047)AsByteDim read AsInteger=0Do
                        read = responseStream.Read(buffer,0, buffer.Length)
                        fs.Write(buffer,0, read)LoopUntil read =0
                    responseStream.Close()
                    fs.Flush()
                    fs.Close()End Using
                responseStream.Close()End Using
            response.Close()End Using
        Dts.TaskResult = ScriptResults.SuccessEndSub

I receive an error in SSIS when running the scrip task stating:

DTS Script Task has encountered an exception in user code. at System.RuntimeMethodHandle.InvokeMethod(Object target,Object[] arguments, Signature sig,Boolean constructor) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder,Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder,Object target,Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture,String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder,Object target,Object[] args, CultureInfo culture) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript(

Questions:

1.  What must be done to resolve the error?

2.  How can I modify the script task to download only files with the .pgp extension?

Thanks much for your help and guidance.

ssis hell issue

$
0
0

Good day:

SSIS is probably one of the most frustrating ETL tool I've used and the documentation really is bad. I've configured a environmental variable to point to a debug.dtsConfig file whenever running the package through BDIS. However, I'm trying to run it through command line using dtexec with a different dtsConfig file however, it doesn't seem to run to my target database and for some reason I think it's still using my environmental variable configured to debug.dtsConfig instead of:

dtexec /f Package.dtsx /ConfigFile dev.dtsConfig

the target database isn't being populated with data. This is extremely frustrating!!


Viewing all 24688 articles
Browse latest View live


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