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

how to change the Sharepoint id from the source to the destination?

$
0
0

Hello,

I am trying to get the data from an onprem Sharepoint list source into another Sharepoint online list. But the Sharepoint ID on prem is not matching what i have on the Sharepoint online. Mine starts with 1, 2, 3..... Is there a way i can accomplish this on the SSIS package? Any help will be much appreciated. 

Thank you,



How to inactive old record and insert updated record into destination table without using staging tables in SSIS

$
0
0

Hi Team,

It is possible to inactive old record and insert updated record into destination table without using staging tables in SSIS.

In my destination table am adding two more fields like Checksum and isActive.

table 1 in server 1

table 2 in server 2

Sample Data:

Table 1-

IDBirdNameTypeOfBirdScientificName
1Eurasian Collared-DoveDoveStreptopelia
2Bald Eagle HawkHaliaeetusLeucocephalus
3Coopers HawkHawkAccipiter Cooperii
4Bells SparrowSparrowArtemisiospiza Belli
5Mourning DoveDoveZenaida Macroura
6Rock PigeonDoveColumba Livia
7Aberts TowheeSparrowMelozone Aberti
8Brewers SparrowSparrowSpizella Breweri
9Canyon TowheeSparrowMelozone Fusca
10Black VultureHawkCoragyps Atratus

Table 2-

IDBirdNameTypeOfBirdScientificNameChkSumisActive
1Eurasian Collared-DoveDoveStreptopelia-4317112601
2Bald Eagle HawkHaliaeetusLeucocephalus-9306022081
3Coopers HawkHawkAccipiter Cooperii-14042874391
4Bells SparrowSparrowArtemisiospiza Belli12602414521
5Mourning DoveDoveZenaida Macroura18333386141
6Rock PigeonDoveColumba Livia10365904211
7Aberts TowheeSparrowMelozone Aberti-5126033211
8Brewers SparrowSparrowSpizella Breweri-20324225731
9Canyon TowheeSparrowMelozone Fusca6640055551
10Black VultureHawkCoragyps Atratus12768453521

Sql update query -

update Table1 set TypeOfBird='Blk Hawk' where ID=10

OUTPUT:


Thanks Bala Narasimha

SSIS / Excel - Selected Index Cell offset by +1

$
0
0

I am using ssis 2010 and my excel is my destination

as you know excel index starts as 0

I have sql command as
  
    SELECT * FROM [Data$E27:P27]

as when inserting data you always have to do row -1 as really my sql command is should be
  
    SELECT * FROM [Data$E28:P28]

but the row it sees because index starts as 0 , is a date row... error is obviously saying cannot insert text into a date, is there a way that you can start the excel index on 1 so I can use 

     SELECT * FROM [Data$E28:P28] 

please help


SSISDB create_execution error: The current security context cannot be reverted. Please switch to the original database where 'Execute As' was called and try it again.

$
0
0

I'm trying to execute SSIS package from service broker activation procedure.

When SP is located in my database, I get following error:

"The current security context cannot be reverted. Please switch to the original database where 'Execute As' was called and try it again."

When the same SP is located in SSISDB, it works fine, but for consistency reasons I would prefer to have this procedure in my database.

To emulate this error we we can use following SP:

ALTER PROCEDURE [dbo].[ExecutePackage]
WITH EXECUTE AS 'dbo'
AS
BEGIN

DECLARE
	 @execution_id BIGINT;

EXEC [SSISDB].[catalog].[create_execution] 
	@package_name=N'Loader_DynamicPool.dtsx',
	@execution_id=@execution_id OUTPUT,
	@folder_name=N'SSIS Concurent',
	@project_name=N'SSIS Concurent',
	@use32bitruntime=False,
	@reference_id=Null;

DECLARE @var0 SMALLINT = 1;

EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
	@execution_id,  @object_type=50, @parameter_name=N'LOGGING_LEVEL', @parameter_value=@var0;

exec [SSISDB].[catalog].[set_execution_parameter_value]
	@execution_id,  @object_type=50, @parameter_name=N'SYNCHRONIZED', @parameter_value=1;

EXEC [SSISDB].[catalog].[start_execution] @execution_id;

END;

and then call:

EXEC [dbo].[ExecutePackage]

Works in SSISDB, fails in user database.


CMD window popping up when executing POWerSHeLL in SSIS using Execute Process Task

$
0
0

I have a powershell script that I am executing using SSIS Execute Process Task.

When the powershell script within powershell window the command completes with NO CMD window popup.

However when executing the same ps script using SSIS execute process task a CMD window pops up after completing the ps script execution and wait for user input.

I type exit to close CMD window and SSIS package completes successfully.I dont know what is causing the CMD window popup and how do I stop the popup and execute the script in SILENT mode so to speak.

Spent hours and days reaching without any success, hoping to get an answer here.

Thank you

Ashutosh

(Sql05) SSIS Execute Process Task Hidden WindowStyle Not Working

$
0
0

I'm having a problem with an Execute Process Task in SSIS (SQL2005).

I set the WindowStyle property to 'Hidden', which worked fine until I assigned a variable to the StandardOutputVariable. For some reason, having a StandardOutputVariable assigned overrides the WindowStyle property and displays the command window no matter what.

Is there any way to force the window style to be hidden, and still capture the standard output?

Thanks.

 

order by ..PIVOT SQL Server

$
0
0

Hi

I have a pivot like this

Select

CalendarYear,CalendarMonth,


 


   

count([ID]) asNumberOfOrders

  

     

 

FROM[Database].[dbo].[DataTable]

PIVOT


(


  

SUM(NumberOfOrders)FORCalendarMonthIN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])


)ASpv1

I wish to order by the CalendarYear, CalendarMonth, but cannot do this because I cannot place an order by before the pivot. How can I do this please

please help


Connect to a remote SSIS server without SQL Server being locally installed

$
0
0

Hey guys,

Is there even a slight possibility to connect to a remote SSIS server without SQL server being locally installed on my machine? I've done a research online but I couldn't find anything useful..


SSIS 2016 - Visual Studio 2015 - Excel Hanging due to proxy

$
0
0

Fellow SQLers,

The problem I am about to described just started happening about 3 days ago - no changes to the VM.

This uat sever is a VM.

it houses SSIS 2016 and SSDT 2015 with VS 2015 Update 3.

Our SSIS package connects to an Excel 2013 xlsx file (on that VM) with the 2007-2013 properties in the connection manager. When you click the drop down to pick the sheet, it can hang from 30 seconds to minutes. this VM was not internet unabled and it always had worked.

We noticed that by turning on the proxy to the internet. All of the problems went away. We also uncovered in the logs that when we were in SSDT 2015, we could see the operation was trying to get to  the below - with the proxy on it was fine. Of course with the proxy off, it failed.

TCP_MISS/200 5769 CONNECT dc.services.visualstudio.com:443 - DIRECT/40.114.241.141 -
TCP_MISS/503 0 CONNECT sqm.telemetry.microsoft.com:443 - DIRECT/65.55.252.93 -

Is there a way to turn these transfers off?

Thanks

MG

SQL Agent jobs are failing with Required privileges are held by client.

$
0
0

Hi ,

I have SQL Jobs that are running normally till the windows patches got installed. It says 

(reason: A required privilege is not held by the client).  The step failed.

I googled it and tried all the options but no luck. 

I deleted the proxy and Credentials and created back again.

I checked the proxy account and all the permission are there as required.

My Windows support team uninstalled the patch and rebooted the server with no luck.

We are using SQL Server 2016 on Windows server 2016

When i run the package manually via Integration service catalog the packages are going into pending state.

Its been 15 day since it started failing. Please help me with the fix.


cvsuman


Column "A" cannot convert between unicode and non-unicode string data types

$
0
0
I am following the SSIS overview video-
https://secure.cbtnuggets.com/it-training-videos/series/microsoft-sql-server-2008-business-development/6143?autostart=true
I have a flat file that i want to import the contents onto a SQL database.
I created a Dataflow task, source file and oledb destination.
I am getting the folliwung error -
"column "A" cannot convert between unicode and non-unicode string data types"
in the origin file the data type is coming as string[DT_STR] and in the destination object it is coming as "Unicode string [DT_WSTR]"
I used a data conversion object in between, dosent works very well
Please help what to do

Using Data access mode: "Table of View"; I NO longer can access the Sheet Name; With an "Excel Source" or "OLE DB Source"

$
0
0

After many hours of trouble shooting I am still do not understand how this is not working when it has worked in the past and with many SSIS packages that I have in place.

Using either a "Excel Source" or "OLE DB Source"Connection; I am NO longer able to reference or bring the listing of "Sheet Names" when selecting "Data Access Mode" for "Table or View". I have tried Numerous fixes that have been listed with NO success.

On the Excel Connection side side I was using with success: Microsoft Excel 2007-2010 but only works in Sql Command mode.

Microsoft Excel 2013 does work in either "Table View" or "SQL Command Mode"

The Only action that I can use on the 2 connections above is with a "Data Access Mode" of SQL Command; this would mean that I will need to change a lot of packages that are in place or hope they still work.

( example: select * from [R1$A1:IZ1000] )

Here is my environment Configuration:

Visual Studio Professional 2017, Version 15.9.11

Reading Excel(xlsx) files using Microsoft Office Standard 2013

Both 32bit and 64bit Microsoft Data Access Components have been applied to my environment, and based on the KBs that I have tried; no success when using "Table or View".

I have tried numerous parameters which were applied to the connections but no success.

At this point I looking for some assistance and solutions to resolve the issue.

Many thanks from a frustrated developer....! 


Error Message:
"Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Object reference not set to an instance of an object."


SSIS Package runs fine on Visual Studio, but fails on executing with SQL Server or DTExec

$
0
0

Hi.

I'm having trouble with executing my SSIS packages automatically on SQL Server and also with DTExec. Compared to other packages that run without problem, this in particular, has a C# task script which runs as a webservice to exctract data from Oracle Cloud, keeping it locally as XML and later on uploading that data to an SQL Server.

This is the error message that appears to me the moment i execute it on SQL Server:

"Message
Executed as user: WIN2K8SQL03SRV\SYSTEM. ...0.2000.8 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  5:16:52 PM  Error: 2019-10-01 17:17:06.08     Code: 0x00000005     Source: Script Analisis Gasto Script Analisis Gasto     Description: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.  End Error  Error: 2019-10-01 17:17:06.08    Code: 0x00000005     Source: Script Analisis Gasto Script Analisis Gasto     Description: MSB3086 - Task could not find "sgen.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed, C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets, 2769, 5  End Error  Error: 2019-10-01 17:17:06.18     Code: 0x00000005     Source: Script Analisis Gasto Script Analisis Gasto     Description: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.  End Error  Error: 2019-10-01 17:17:06.68     Code: 0xC00490F7     Source: STG a DW STG a DW (ora_analisisgasto [2])     Description: The managed pipeline component "Microsoft.SqlServer.Dts.Pipeline.ADONETDestination, Microsoft.SqlServer.ADONETDest, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" could not be loaded.  The exception was: Could not load file or assembly 'Microsoft.SqlServer.ADONETDest, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified."

I'm using Windows Server 2008 R2 with SQL Server 2012 and Visual Studio 2017 with the corresponding versions of SDDT.

SSIS 2016:DB2 driver connectivity issue

$
0
0

Hello Team,

We are in process of upgrading the ETL packages from SQL 2008 to SQL 2016 version. We have completed the upgrade activities we are facing few issues with OLEDB connections. Whatever the packages where we do have the DB2 as a data source, We are using theMicrosoft OLEDB Provider for DB2. With that, We are facing an issue mentioning an connection initialization issue.

Please find the below screenshots for your reference.  Please check this issue and do provide your inputs to resolve this issue.

Convert data type to text for case statement

$
0
0

I need to convert data type to text for following statement. Can someone please help…

,case

when [Order_ID]isnullthen'N'

when [Order_ID]=''then'N'

else [Order_ID]

endas [Order_ID]

Many thanks



Add folders to miscellaneous folder

$
0
0

Hi

Is there a way to add child-folders to the miscellaneous folder in SSIS? It will nice to group biml files in separate folders.  

Thanks

SSIS Azure Flexible file destination - Java OutOfMemory

$
0
0

I have a pretty big file to off load in a parquet format

How to overcame that error Microsoft.DataTransfer.Common.Shared.HybridDeliveryException: An error occurred when invoking java, message: java.lang.OutOfMemoryError:Java heap space total entry:11

How to bulk convert ISO8859 text in Text columns to UTF8 in nvarchar(max) columns?

$
0
0
Hi, I've been struggling for days with a problem on a MS SQL database. Here is the situation: I have an old Open Source PHP application (Limesurvey version 1.92) running on a Windows 2008R2 server, with SQL2008R2 as RDBMS. I need to migrate the surveys in the application to a new instance, running on Linux with MySQL. The new instance is version 3, and database structure between both versions is different. The scenario I tried to use is upgrading the old version on the old server, and then exporting the surveys as export files, which I can import into the new application. It works well. Except that I'm stuck because of a problem of character encoding. The old application (web application) uses UTF-8. But the database uses only VARCHAR and TEXT columns. Therefore UTF-8 characters are stored using several bytes in these columns : é is stored as é for example. When I upgrade the application, the upgrade script changes the structure of the tables: TEXT columns become NVARCHAR(MAX), but the content in the column is not converted to UTF-8. So I'm searching for a way to change the content in the NVARCHAR(MAX) columns from ISO8859 to UTF-8. The database has approx 200 tables and is 600MB.

On Error Redirect Rows ( Failing Rows Redirect and XML)

$
0
0

Hi All,

In My current project, all SSIS Package flow is that, in case of failure It will redirect raw to error table.Error table is having same structure  of original table but only diff between Error and Destination table is that Error table is have datatype Nvarchar for all column with size 4000.

For Example:
-----------

Table:Emp

Empid Int
EmpName Varchar(50)
Salary Decima(25,8)


Table : ErrorEmp

Empid NVarchar(4000)
EmpName NVarchar(4000)
Salary NVarchar(4000)


Now my database table count increase day by day.So, I want to maintain some common structure like for every failing rows It will insert data into XML column.

I want to insert  separate Raw for each failing rows  and also that XML structure will be dynamic (not for specific table).This component can be used for any package as a part of my framework.

Table: ErrorMaster

Id bigint
TableName Varchar(100)
Errorstring XML


Can someone help me with that to achieve my goal ?

Write and delete CSV files in SQL database

$
0
0

Hi !

I have a question about creating a job in SQL 2012 and I would like some help.

So I have a local folder on a PC which contains CSV files that are generated by another system via VBS script with unique names as follows ("id_yyyymmdd_hhmmss"):

"id_20190913_090000",

"id_20190913_094512",

"id_20190913_103205", ...

I need to create a scheduled SQL Server Agent job (e.g. every minute) that runs a package with a dataflow as follows: if there are CSV files in this local folder when the event occurs that is written to SQL database of each files in the correct order (oldest to newest file) and only after writing the data contained in the CSV file the CSV file be deleted from the local PC folder.

The intention is to create a kind of buffer (local folder) between the system that generates the CSV files via script and the SQL database so that, in case of communication loss or slowness, it does not affect writing to the SQL database. Currently the system writes directly to the SQL database via script (without generating CSV files), however it is generating slowness since each write has to open the connection to the database and then close, stopping the execution of the script.


What I would like to ask help is how to save multiple CSV files in the SQL and after the confirmation of writing delete the recorded file.

I appreciate any help!

Cheers,
Berg

Viewing all 24688 articles
Browse latest View live


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