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

Permissions to run SQL JOB - SSIS

$
0
0

HI

I created a SSIS package which run in a sql job....

I created a proxy and credential which work with a windows account..

What are the permissions to the sql job runs without problem in SQLSERVER 2012?

The windows accout has permissions to the network directories.

The connection managers have account which can connect to the databases


SSIS ETL package that also needs to update a table

$
0
0

Hello,

I have an SSIS package that runs a query to create an Excel spreadsheet. 

The package retrieves a value from a table for the last ID processed from the previous day and uses that in the query that is used to create the spreadsheet.  I need to get the last ID processed for the current run and write that back to the table so the cycle can be repeated.

What would be the best way to determine the last ID processed for the current run?

Inserting data in extra column when loading from .mdb

$
0
0

I have a .mdb that needs to be inserted to a database.

There is an extra column that should record the computer name that the package is running on.

I can easily insert everything from the .mdb but I cannot seem to find a way to insert the extra field into the final destination.

I cannot used a derived column because the version of SQL on the computer it is running on does not have addons installed.

Example:

.mdb has the following columns:

  • Service
  • Name
  • Date

Destination

  • ServerName
  • Service
  • Name
  • Date

Conditional expression for evalexpression in forloop container

$
0
0

I have a forloop on which the EvalExpression is like below - 
(@[User::Sales] == 1 || DATEPART("hh", GETDATE()) >= 22) ? "False":"True"

leaving InitExpression and AssignExpression blank. 

so, my req is either of the above evaluates to true then the loop needs to break.

The process will come out of loop if the boolean evaluates to false. So, the executeSQL task inside the forloop is assigning "1" to @[User::Sales] and I expect it to break the loop and proceed further. But, the loop is still continuing endlessly. Please let me know If I am missing anything. thank you.



Replace blank string with underscore

$
0
0

Hello All,

I am working on an SSIS package which is loading the data from SQL Server to Oracle. In the source table I have a varchar column which has blank string value for few records and due to these my SSIS package is failing with an error saying cannot insert null into this column because it's a not null column in the oracle table. 

I have tried below and it is working fine.

REPLACE(MyColumn, " ","_")

But is there any other better way to do it? I am afraid because since it's a varchar column and there is a possibility of having space in between the words (like "cat dog") and the above replace function will replace all the spaces to an Underscore ("cat_dog"). 

I need to replace MyColumn value with Underscore if it has just the blank string and nothing else.

Please help me in achieving this. Appreciate your help!!.

Thank you so much


SSIS-Wrong value in Configuration file overridden by Parameter Default ?

$
0
0

Hi ,

I am new to SSIS so please explain below scenario.I am running via VS2015.

I have SSIS 2012 created which has some config values and same name with Parameters.

Example:

User::Name -Which expects string 

Parameter have same "Name" with Default Value "John"

If I give correct expected type say for example "Marry " in the Config SSIS fetch Marry from config file  and process the package.

If I give wrong type int or special characters  say eg: 123434 like .Its not throwing error but fetch default value "John" value from parameter and process without error.

Please let me know the behavior.


Kerberos Authentication

$
0
0
I have configured kerberos authentication for my domain user and In AD -> my domain user -> under delegation I've chosen Kerberos authentication. Also I had successfully configured SPN in my db server residing machine and I am using SQL 2012. But still when I connect via SQL management studio it is keep on connecting via NTLM. How can I fix this to connect via Kerberos. Your help will be appreciated like anything. Thanks!

Enable AlwaysON support for SSISDB catalog - using powershell

$
0
0

Hi All,

Is there a command line option for enabling AlwaysOn support for SSISDB?

Thanks

Chinni



Not able to get the data into flat fille

$
0
0

Hello,

I been trying to pull the data from the table using SSIS but my package is failed on flat file. 

Step 1, Below script I been trying to run through stored procedure .

Step 2, I'm pulling through flat file but apparently getting failed at flat file using ( Select * from ChinaReport). 

is there another way I can pull the data using SSIS? 

ALTER PROCEDURE [dbo].[p_SendMail_China]

AS

BEGIN 

CREATE table ChinaReport
(
VendorCode varchar(6),
ItemNumber varchar(50),
ItemDescription varchar(max),
UOM varchar(6),
QtyReceived decimal(19,2),
QtyConsumed decimal(19,2)
)

DECLARE @FromDate DATETIME
DECLARE @ToDate DATETIME
SET @FromDate = (SELECT CAST(CONVERT(VARCHAR,DATEADD(MONTH,-1, GETDATE()),101) AS DATETIME))
SET @ToDate =  (SELECT CAST(CONVERT(VARCHAR,GETDATE(),101) AS DATETIME))

INSERT INTO ChinaReport
Select SUPLIER, ITEM, ITMDESC, STKUMID, dbo.f_GetQtyReceivedByDate(@FromDate, @ToDate, ITEM) as QtyReceived, 
ISNULL(dbo.f_GetQtyShippedByDate(@FromDate, @ToDate, ITEM),0) + ISNULL(dbo.f_GetQtyUsedByDate(@FromDate, @ToDate, ITEM),0) as QtyConsumed
From tblICITEM I
Where COUNTRYOFORIGIN = 'China'
And SUPLIER IS NOT NULL 
AND SUPLIER !=''

End

Thank you for guidance. 

SSIS in sql job_ Login failed for use

$
0
0

HI

I created a domain account to run a SSIS in sql job.

I works fine with a user which is administrator in the OS.

But when I use a proxy in a sql job which is a common user account the error is:

Executed as user: DESKTOP-20NPOFV\test. Microsoft (R) SQL Server Execute Package Utility  Version 14.0.1000.169 for 64-bit  Copyright (C) 2017 Microsoft. All rights reserved.    Started:  23:17:16  Failed to execute IS server package because of error 0x80131904. Server: DESKTOP-20NPOFV, Package path: \SSISDB\REP\AURA.Data.Integration\PkgIntegracionAlmacen.dtsx, Environment reference Id: NULL.  Description: Login failed for user 'DESKTOP-20NPOFV\test'.  Source: .Net SqlClient Data Provider  Started:  23:17:16  Finished: 23:17:16  Elapsed:  0.078 seconds.  The package execution failed.  The step failed.

SSIS Frequently logging error to application event log: .NET Runtime version - Loading profiler failed. Failed trying to receive from out of process a request to attach a profiler

$
0
0

The SSIS 2016 service (MsDtsSrvr.exe) is causing the error detailed below to be logged in the server's application log every 5-10 seconds.  I have been unable to figure out what the actual issue is and how to stop it.  The error is logged even when no packages are being run.  I thought it might have something to do with .Net framework automatic debugging and so i tried to exclude the process from automatic debugging (https://docs.microsoft.com/en-au/windows/desktop/Debug/configuring-automatic-debugging#related-topics) but this had no impact. 

While this doesn't appear to be causing any actual issue I thought it best to stop thousands of these errors being logged.  Any assistance would be appreciated.

Log Name:      Application
Source:        .NET Runtime
Date:          19/03/2019 1:17:25 AM
Event ID:      1022
Task Category: None
Level:         Error
Keywords:      Classic
User:          NT SERVICE\MsDtsServer130
Computer:      xxx
Description:
MsDtsServer130 .NET Runtime version 4.0.30319.0 - Loading profiler failed.  Failed trying to receive from out of process a request to attach a profiler.  HRESULT: 0x8007006d.  Process ID (decimal): 1204632.  Message ID: [0x250d].
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1022</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-03-18T14:17:25.407395700Z" />
    <EventRecordID>1838550</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xx</Computer>
    <Security UserID="S-1-5-80-3763098489-2620711134-3767674660-4164406483-1621732" />
  </System>
  <EventData>
    <Data>.NET Runtime version 4.0.30319.0 - Loading profiler failed.  Failed trying to receive from out of process a request to attach a profiler.  HRESULT: 0x8007006d.  Process ID (decimal): 1204632.  Message ID: [0x250d].</Data>
  </EventData>
</Event>

SSIS: Process Flat Files having different number of columns

$
0
0

Hi, 

I have 4 .csv files in a folder which I want to load in different SQL tables:

A_timestamp : 100 columns

A_timestamp: 50 columns

B_timestamp: 80 columns

B_timestamp: 30 columns

So I want my package to read all 4 files from the folder and insert them into the respective tables. The issue here is that the name of files is suffixed by timestamp so upon seeing a file we don't know how many columns it has. The approach I am trying is as follows:

1. Use a foreach container to loop through all files

2. Inside Foreach loop container, use a script task to count the number of columns.

3. Based on the number of columns, use precendence constraints to redirect the file data to the respective DFT (I have 4 DFT connected to script task)

Issue: How can I pass the connection info to script task dynamically so it can read files with different number of columns?.

OLAP connection manager not working with dynamic values from SSIS config file

$
0
0

Hi Team,
Could anyone provide suggestion to fix on the below issue in  my SSIS package.
I have a SSIS package designed to process SSAS cube on automated basis.first step involved is dimension processing and second is processing cube.
1) SSIS package works fine and process cube in DEV environment
2) Now generated XMLA script  from development cube and created cube structure in Testing environment
3) Ran SSIS package again with test environment config to process cube in testing environment
4)Cube process fails and observed that OLAP connection manager is not picking values from SSIS package config file. Runs only with design time value irrespective of the environment deployed

please confirm is this issue with OLAP connection manager or expected behavior.

Is there any fix available to make it work

Note: using SQL server 2017 version

Many thanks

karthi



SSIS - Split single text column into different columns

$
0
0

Hello all, 

I have a text file that has no column name and no separator. instead, i have to get the values by the position.

Eg: from 1 - 13 ID, 14 - 17 Name, etc.

i'm able to get the first one, however when i try to collect the second column, i'm getting a whole different thing. instead of getting the charachters from the starting to finish position, i get a different thing. Any ideas on how to accomplish this? 

Kerberos Authentication

$
0
0

When Do I need krb5.conf and login.conf files in JDBC connection?

Also what is SSO, interactive & batch mode in kerberos authentication?

Your help appreciated much!


Which Excel connection manager should be used

$
0
0

Hello,

I have created a variable to connect to an excel file which the data in the file changes on a monthly basis.  The data changes to the excel file changes by the user dropping another excel file with part of filename with the month in the name.  For example , invoice_02.xlsx (02 means for February).  In the SSIS process I have a task that checks if the file exists with an excel connection manager and a variable that is created also with a check if it is the current month file.  But when I am testing to get another month file then the connection is broken and I have to manually re-establish the connection.   Below are what I have in the variables area and in the connection manager.   Please advise on a solution.

variable  =   @[User::vfilePath]+"\\" + @[User::vFilename]

value =        E:\CP\invoice_02.xlsx

my excel connection :

excel file path:   e:\CP\invoice_02.xlsx

excel version : MS excel 2007



Need help calling a stored procedure from OLE DB Command Passing Parameters

$
0
0

I need help calling a stored procedure from an OLE DB Command in SSIS. I have created a stored procedure like this:

CREATE PROCEDURE [dbo].[UpdateAccountAddressAndShippingIds]
 -- Add the parameters for the stored procedure here
 @AddressId nvarchar(12),
 @ShippingId nvarchar(12),
 @EntityId nvarchar(12)
AS
BEGIN
 -- SET NOCOUNT ON added to prevent extra result sets from
 -- interfering with SELECT statements.
 SET NOCOUNT ON;

    update sysdba.account
 set  ADDRESSID = @AddressId,
   SHIPPINGID = @ShippingId
 where ACCOUNTID = @EntityId
END
GO

In SSIS, I have an OLE DB Command, in which I am trying to call the stored procedure, but I keep getting a Failed to Parse SQL error when I go to the column mappings tab.  I am trying to call the stored procedure like this:

exec dbo.UpdateAccountAddressAndShippingIds ?, ?, ?

I have tried following examples I found on the web, but I keep getting the failed to parse sql error when I go to map the parameters.

Can someone please help?!

SSIS Flat file column delimiter issue

$
0
0

hello,

Is there way I can stop moving data to next column in SSIS?

I'm using " in text qualifier in flat file setup.

Basically on the data I have many commas and double quotes, please see attached images. One image is from SSIS> Flat file connection manger and another one from .csv file which is show up moved data. 

Is there way I can solve this? 


case

$
0
0

Hi,

Please help for the flowing question, Thanks

I need to find out the final balance = credit -(t1+t2+t3). However, 
t1- only exits  when st1=2 and st2=1 or (st1=1 and st2=1 and st3=1) 
t2- only exits when  st1=2 or (st1=1 and  st3=1)
t3- only exits when  st1=2 or (st1=1 and  st3=1)
In the example below, t1 is not exist, so the final balance = credit -(t2+t3) =5000-(1000+1500)

ODBC Source properties are missing in the Data Flow Task expressions dialogue

$
0
0

I am trying to create an SSIS package to transfer data from a MySQL database (ODBC Source) to SQL server (ADO.NET Destination).

I need to use a dynamic query for the extract from the MySQL database. In the past, I have done this by setting the SqlCommand property as an expression via the Data Flow Task properties window. However, no ODBC source properties are shown in the expressions dialogue.

I have tried deleting and re-creating the data flow task, with no improvement.

This does not appear to be a known bug (or, at least, I haven't managed to find anything by Googling). Can anyone suggest a solution for this, please?

I am using Visual Studio Professional 2017 (version 15.9.3) with SSIS Designer version 15.0.900.40

Thanks,

Rob


Viewing all 24688 articles
Browse latest View live


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