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

Remove Comma from String

$
0
0

Hello,

I have a values in a column  like this - SAS,No,1,136.13 GB,Online,Ok,DELL(tm),Not Applicable,6XM3MGN0,YS0D,

I am taking that column and parsing it to multiple columns using comma as delimiter.

But I want to remove the comma from this  part only - 1,136.13 GB and feed it to one column like this 1136.13 GB.

I am trying to use derived column but unable to find expression that will help me with this.

How can I achieve this?


Package execution error due to version issue

$
0
0

Package built on - VS 2017

SQL Server Version - SQL Sever 2016

SQL Server Integration Services Version - 11.0

I am trying to run this package through DTEXEC command. Its throwing me error on versions. Any help here to direct on right versions?

Error:

Package migration from version 8 to version 6 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version number".

Thanks


dtproj cannot be opened because its project type is not supported by this version

$
0
0

I have SSIS packages both developed in SQL 2008 and SQL 2012 and so my system requires visual studio 2008 and visual studio 2012. I am able to open packages developed in SQL 2012 using VS 2012 in TFS 2012 but unable to open packages developed in SQL 2008 in VS 2008 through TFS 2012. 

DO I need to install SQL 2008 R2 with integration services features, if so I could not get online with integration services only getting SQL 2008 R2, After installing sql 2008 R2, am getting same error message 

dtproj cannot be opened because its project type is not supported by this version.

Please help

CDC for Oracle by Attunity stuck at status Logger

$
0
0

Hi, I have asked this question on the MSDN Server Tools forum (CDC for Oracle byAttunity stuck at status Logger), where I was advised to post in the SSIS forum, and on the Attunity forum (ORACDC514E:Failed to add redo log with sequence xxx) where I have not received a response.

Note: The issue below was not identified using the SSIS approach to CDC.  In any case, someone may be able to help as the issue appears to be with reading the Oracle logs...?

Oracle CDC instance has started but then goes to status LOGGER with status message "Trying to retrieve next change record from source database".

The trace shows entries

  • type ERROR ORACDC514E:Failed to add redo log with sequence xxx
    • where xxx is a value one more than the current log sequence on the Oracle database
  • type TRACE ORACDC000T:Error encountered at set position - EOF simulated
  • type ERROR ORACDC511E:The Oracle CDC failed to position

What causes this?  And what do I do to resolve it?

Thanks in advance!

Running SSIS package with script component on SQL Server 2016 gives error Component Mismatch Exception

$
0
0

I have SSIS project deployed on SQL Sever 2016, the project has a package that uses script component, the package runs with no errors locally on VS 2017 but when deployed gives error.

Solutions that I tried

1)Changed the target version to SQL Server 2016 in SSIS project

2)Change the .NET runtime on script component to 4.6

,still no luck .Any help would be appreciated

error report-

Data Flow Task 1:Error: Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException: The version of Script Component is not compatible with this version of the DataFlow.  [[The version or pipeline version or both for the specified component is higher than the current version.  This package was probably created on a new version of DTS or the component than is installed on the current PC.]]
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostCheckAndPerformUpgrade(IDTSManagedComponentWrapper100 wrapper, Int32 lPipelineVersion)

Data Flow Task 1:Error: The component metadata for "Script Component" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.


OData Integration with Dynamics 365 connection

$
0
0

Hello All , 

We have D365 for finance and operation on-premise environment , we need to use OData integration ,so when trying to connect to OData using the SSIS tool i got this error :

TITLE: OData Connection Manager Editor
------------------------------

Test connection failed

------------------------------
ADDITIONAL INFORMATION:

unknown_user_type: Unknown User Type (Microsoft.IdentityModel.Clients.ActiveDirectory)


What i should do to solve this error, is there any clear steps to be done ?

Any help would be appreciated 
Thanks in Adv,

Ma'en.M

SQL Server Database Project + Windows Form Project - In a Single Solution of Visual Studio

$
0
0

Dear Colleagues,

Being required for the first time as I seek to develop a User Interface on the Windows Form for a SQL Server Database I shall oblige you experts' advice as to whether should I haveboth the projects be included in a single solution on VS 2019 or should I place both the projects inseparate solutions?

While I have the complete DB already designed via SQL Server Database Project as I tried to add aWindows Forms App project I don't seem to find the correct way to debug the Form's project with theF5 despite of a valid Data Connection since the solution upon launch is found to be recreating the said database and throwing an error like the tables already existing.

Thus, if multiple projects like this do exist in a single solution, how to debug a single project of the same?

Any helpful advice / reference of a good source of info in this regard shall be highly obliged.

Thanks in advance,

Best Regards

خدمه عملاء تكييفات كاريير & 01225025360 _01014723434 &اعطال كاريير


Unable to create the type with the name 'PowerQuery'.

$
0
0

Microsoft SQL Server, Error: 27203

I can't deploy Power query connection. When project connection, it fails in Visual Studio (log file below, SQL message in the subject line). When I convert it to package connection, it gets deployed,and I see it in the list of connections in SQL Studio, however the operation fails because it fails to find the connection with the unique ID.

Both me and the server account has access to the folder specified in the connection properties. I tried installing both visual studio 2017 and 2019 the same result. SQL server is 2017 developer edition.

There are other SSIS packages successfully deployed and working. The package with Power Query works fine in the Visual Studio. 

Please help and thank you in advance.

PS (The link in the error redirects to the main Microsoft page)

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

Failed to deploy project. For more information, query the operation_messages view for the operation identifier '11989'. (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=14.00.1000&EvtSrc=MSSQLServer&EvtID=27203&LinkId=20476

------------------------------
Server Name: server\instance
Error Number: 27203
Severity: 16
State: 1
Procedure: SSISDB.catalog.deploy_project
Line Number: 139


------------------------------
Program Location:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.SqlServer.IntegrationServices.Common.ObjectModel.SqlHelper.ExecuteSQLCommand(SqlStoreConnection storeConnection, CommandType cmdType, String cmdText, SqlParameter[] parameters, ExecuteType execType, Int32 commandTimeout)
   at Microsoft.SqlServer.Management.IntegrationServices.CatalogFolder.DeployProject(String projectName, Byte[] projectStream)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeployExportProjectHelper.DeployProject(CatalogFolder folder, Project project)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeploymentModel.Deploy(CatalogFolder folder, Project project)
   at Microsoft.SqlServer.IntegrationServices.Wizard.Common.Model.DeploymentModel.DeployProject()
   at Microsoft.SqlServer.IntegrationServices.Deployment.DeployProjectPage.DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)



SSDT 2015 Script task error when deployed to sql server

$
0
0

Getting following error :

Executed as user: ----- Microsoft (R) SQL Server Execute Package Utility  Version 13.0.1601.5 for 64-bit Microsoft.   Started:  3:19:41 PM  Error: 2019-06-17 15:19:42.01     Code: 0x00000003     Source: CRM2SQLScript CRM2SQLScript     Description: There was an exception while loading Script Task from XML: System.Exception: The Script Task "abc" uses version 15.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services.    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)  End Error  Error: 2019-06-17 15:19:42.02     Code: 0x00000003     Source: CRM2SQLScript     Description: The Script Task is corrupted.  

Why Make valid function removes the measure attribute of an geometry ?

$
0
0

Hi folks,

I just want to use the MakeValid() method of MSSQL spatial library.

But the method removes the z and m attributes of the geometry.

Can you please help me to resolve that, i am in need to use makevalid() method with z and m attributes

Example

DECLARE 
@g geometry;

set @g = 'LINESTRING (1 1 null 0, 1 1 null 5, 1 1 null 10, 2 2 null 1, 1 1  null 2, 1 1  null 05,   0.49 0.49  null 20,  1.5 1.6  null 2,  3 3  null 23, 4 4  null 10, 1 1  null 200, 1 1  null 0, 1 1  null 0)';


SELECT @G.MakeValid().ToString();

SSIS Script Task Version Compatibility Issue

$
0
0

I have create simple SSIS package(only script task)

and I build and run the SSIS package from visual studio this works without any issues.

In the same package I have deployed in Sql server(SSISDB) and I’m trying to execute the package getting below error.

I have faced issue only script task, don’t have any issues with other SSIS tools.

Please help me how to resolve this issue.

Configuration:

Sql server version : Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64)  Apr 29 2016 23:23:58  

Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> .

SQL Server Data Tools : 2015

Integration Services : SQL Server Integration Services 13.0

Microsoft .Net framework version : 4.7

Set Target server version : Sql Server 2016

Script Task Template Path :  

               C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\VSTA14_IS_ST_CS_Template.vstax



Thanks,

Krishnan



Need to insert FileName and Tab Name

$
0
0
Hi All,

I have multiple excel files and each is having multiple tab name.

I want to insert FileName and Tab Name in SQL table.

Can you please help me for the same ?

Note : I don't want to read individual tab data.

Agent Job should call next step if SP returns value 1. Job should be stopped if value is 0.

$
0
0

I have several SQL Server 2012 SSIS packages 1 and 2, which perform Business logics of DW.
I have plan to run packages with SQL Server Agent Job.
If package 1 is successfull, package 2 is run.

We run these Jobs every night. No matter what happened in previous night, we run each night again.

Now I have need to add validation logic.
If Stored procedure return value 1, then run package 1.
If SP return value 0, then stop running job.
I wish to implement validation package to own SSIS package. Let call this as package 0, but it is okay as well if Agent call SP directly.

What is best practise for implementing and running validation logic?
Specially I need help to design how to implment logic where job is stopped if SP return value 0.

Should I do with some task inside package 0 or could Agent Job handle this?


Kenny_I

SSIS error- Binary code for the script is not found

$
0
0

I have run into this strange SSIS error where my script component on the server keeps failing with the error -"The binary code for the script is not found. Please open the script and make sure it build correctly". The script build absolutely fine on my local machine. The script component basically refers to 3 additional DLLs , apart from the standard references that you get when you open a script component. These dlls are Microsoft.Hadoop.avro.dll, Newtonsoft.json.dll and Microsoft.Csharp.

The Microsoft.Hadoop.avro and Newtonsoft.json are the ones that I had to download and I have even registered to the GAC, both on the local and the server.

I have tried opening the components, rebuilding them, saving them and deploying them. I have set DelayValidation to False on the Data Flow. I have set "Copy local" to False for the dlls in the reference section. I have re-added the references by explicitly putting in the GAC location i.e. C:\Windows\Microsoft.Net\Assembly\GAC_MSIL.

Basically this script component acts as a destination and writes avro files.

As mentioned , everything works on my local. I have even tried downloading the packages on my local from the SSIS catalog on the server and then executing it and even that works (just to see if during the deployment process something changed or became awry). I am at a loss to explain what is missing here. By the way , this is SSIS 2016, deployed to the catalog (project deployment model) and then I am executing it through a SQL Agent job.

The Target framework of the script component is .Net 4.5.

Anybody on ideas to solve this?

If more information is required, I will be happy to provide it.





How to load FileName and File Size into Audit table

$
0
0

Hi All,

I have one Flat File  SOURCE and OLEDB Destination which I'm Loading Properly in mean while I want to load Data into Audit table for Tracking purpose.

Package :

Variables :

Here I want to capture file Name from Folder Path and File Size . I have used script Task

Using System.IO;

From there I'm loading into Dbo.FileInformation table using Execute SQL Task.

INSERT INTO dbo.FileInformation(Filename,FileSize,Rcnt)VALUES(?,?,?)

and Parameter mapping also done Properly

After executing the package my destination table is loading like below

I need to get output like this  :

Suggest me How I need to pick filename and File Size using Script task


How to pull the values from XML file and laod into SQL table using SSIS?

$
0
0
Hi,
I have a xml file with the following format -

<?xml version="1.0" encoding="ISO-8859-1"?>
<StoreGroupControl>
<StoreGroup>
   <Store-Code>00001</Store-Code>
   <GroupName>XXX GROUP</GroupName>
   <OrderType>1</OrderType>
   <Country>USA</Country>
</StoreGroup>
<StoreGroup>
   <Store-Code>00002</Store-Code>
   <GroupName>YYYY GROUP</GroupName>
   <OrderType>2</OrderType>
   <Country>USA</Country>
</StoreGroup>
<StoreGroup>
  <Store-Code>00003</Store-Code>
  <GroupName>YYYY GROUP</GroupName>
  <OrderType>1</OrderType>
  <Country>USA</Country>
</StoreGroup>
</StoreGroupControl>

How do I pull the Store-Code,GroupName,OrderType,Country column values from this file and load it into a relation table which has colums like this.

Store-Code
GroupName
OrderType
Country

Working with a PostgreSQL database as a OLE DB destination

$
0
0

Hello:

I am using VS 2019 and trying to move data from SQL Server to PostgreSQL 11.3. When I try to create a OLE DB Destination pointing to a PostgreSQL database using PostgresSQL Ole DB Provider, the initial Catalog is disabled. 

Can someone tell me how I can enable it so I can choose the database table I am interested in?

As you may know, PostgreSQL structure is quite different. It can have multiple databases and each database can have any schemas.

Thank you.

Venki

dts. not working in script transform editor but working in script component

$
0
0

I have few ssis variables. But when I enter Dts.Variables["User::MyIntegerVariable"].Value its throwing an error

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'Variables' does not exist in the namespace 'Microsoft.SqlServer.Dts' (are you missing an assembly reference?)

The samething is working fine in script task. I have added Microsoft.SqlServer.ManagedDTS as a reference in script transformation editor but still throwing an error.

When i entered 'dts.' am not getting 'variable' value

synchronizing the folder structure from production to test

$
0
0
i have a folder structure in one server like \\server1\production\2019\apr01 the same folder structure should be copied to another server and the folder structure is varying from time to time how to sync the folder structure from one server to another server
Viewing all 24688 articles
Browse latest View live


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