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

Optimizing SQL query

$
0
0

Hi Guys,

Anyone with good videos and links on how best to optimize an sql query. I have a complex query that I need to improve performance on and I need a resource to guide me on it. 


me


How to remove unwanted quotes in the data

$
0
0

Hi All,

I have a package that loads the data from flat file to a sql server table . It is failing on a column name. I opened in notepad++ and went to the row number and saw that the address has quotes in it

"123 MAIN ST APT "B"" 

What i did was in the file connection manager i changed the text qualifier from " to <none>. Now no issues package runs fine but the data in the table is enclosed in quotes.

Is there a way i can remove those extra unwanted quotes please?

Thanks

Change string 111222333 into 111-222-333

$
0
0

Hi,

I want solution in SSIS, for below query.

In my source table for column "Contact" data is 111222333 (Varchar data type).

I want change that string into destination "Contact" column as 111-222-333.

Please suggest.

SSIS Package - Loop through multiple data sources.

$
0
0

We have a SSIS package that pulls data from multiple data sources.

So, the ssis package has  Execute SQL task that feeds the list of SQL Servers to be used a data sources.

The second step is For Each Loop that has data flow task. The Source Connection manager is expression based with servername as variable. 

This works fine the only issue is, if the data source is not available, I do not want the package to fail but rather log that error and continue processing other data sources.

Any thoughts how to make the package continue processing other data source without failing the package, if one of them is not accessible.


Hope it Helps!!

Cannot deploy SSIS project to the new SSISDB get error message

$
0
0

I recive the following error message trying to deploy a  SSIS project from VS2010 to SQL SERVER 2012.

A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal":
System.ComponentModel.Win32Exception: A required privilege is not held by the client
System.ComponentModel.Win32Exception:
   at Microsoft.SqlServer.IntegrationServices.Server.ISServerProcess.StartProcess(Boolean bSuspendThread)
   at Microsoft.SqlServer.IntegrationServices.Server.ServerApi.DeployProjectInternal(SqlInt64 deployId, SqlInt64 versionId, SqlInt64 projectId, SqlString projectName)
. (.Net SqlClient Data Provider)

I change the SQL servers account to use a local admin account  that is a member of local administrators , and have added the SQL server account to DCOM Config  Microsoft SQL Server Integration Services 11.0,” node security as per Peter instructions , however still cannot deploy a project get the some error message.

Please advice.


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 Using parameters

$
0
0
Steps required to establish environment variables and deploy package from Visual Studio.

SSIS: When set the task to ignore errors, don't log the errors

$
0
0

Hello there. Ignoring any discussion of 'coding it right in the first place' (I have my reasons)….I have an SSIS package that loops through a task and sometimes it fails and other times it doesn't.

I've got it functionally working, i.e. errors are ignored, parents + package succeed (as designed) but I can't seem to supress the error logs.

Is there a way to stop these logs?

Thanks.


Retrieve names of files in a subfolder of a Sharepoint document library

$
0
0

Hi all,
I'm trying to make a dtsx package to read some Excel files from a Sharepoint document library. This library has some folders inside. I have to read only files in one of these folders. I installed the Sharepoint List Adapter from Codeplex. How can I get the list of Excel files that are in this folder I'm interested in? In the Sharepoint List Source I can set only the Site URL and the list name (the name of the document library), but so I only can get the name of the folders in the library.

Thank you in advance!

Issue using Merge Join transformation after an aggregate transformation - SSIS 2017

$
0
0

Hi,

I've implemented a SSIS 2017 package having a merge transformation and an aggregate transformation.

In the aggregate transformation I've specified a group by operation for a DT_WSTR code and a count distinct for the same code.

In the merge join transformation as join Keys I've specified the code from the aggregate transformation, on the right side, and the equivalent code on the left side: for a specified value for the matching code no values are returned from the right side (aggregate transformation). I've queried the corresponding source table and I can see that the two codes match rightly.

How can I solve this issue? Can I use an aggregate transformation before a merge transformation? Is there a bug? Thanks

Obviously, I've ordered the two sources for the merge join transformation.

How to check the Product Cost based on the order Date

$
0
0
Greeting 

I'm working with a Sales Database, in the sales tables, I have a column where there is the Product Cost, the issue here that the product cost changed upon the time, the Data of the product cost history are stored into a table "ProductCostHistory(ProductID, StartDate, EndDate, StandardCost) " 

Using SSIS I want to put the Product Cost Based on the Order date, Any Idea Please 

Thanks in Advance  

SSIS Catalog deployment not creating certificates

$
0
0

I am having a problem with a SSIS Project in the SSIS Catalog. When I schedule the package to run, I get an "Unexpected Termination" error.

If I look in the event viewer, I get the following error:
The SSIS Execution Process could not write to the IS catalog: SERVER:SSISDB Error details: Cannot find the symmetric key 'MS_Enckey_Proj_Param_13', because it does not exist or you do not have permission

If I check sys.symmetric_keys, this key does not exist.
If I check sys.certificates, I can see a certificate name MS_Cert_Proj_13, but no certificate named MS_Cert_Proj_Param_13.

We have recently upgrade the servers to SQL 2014 CU4 from SQL2012.  All the other projects that are working fine were created on SQL2012 and uploaded then.  This is the first project deployed since the upgrade.

I have created a new solution, recreated the parameters and copied the package into this solution.  I then built this and deployed it with the same results.

Any one seen similar or know how to fix this?

Thanks

Load data to .txt file with a defined column position

$
0
0

Hi guys,

I am creating an SSIS package that loads data from MSSQL table into a text file. One of the requirement is for the size and position of the data in each column in the text file to be the same.

For instance, if the result of the query is shown as below:

ProductID     ProductName    ProductColor     ProductCategory

1                   Tesla                  Black                  Car

2                   Samsung            White                 Mobile Device

3                   Acer                   Grey                  Laptop

 The requirement is that for each of the rows returned from the table, the column position on each row should be:

ProductID: 1-4

ProductName: 5-20

ProductColor: 21-35

ProductCategory: 36-50

So in the case of ProductID, there should be 3 spaces before the ProductName since the length is one. 

I will greatly appreciate any assistance on this.

Thanks


me

SSIS package unexpected Termination Issue

$
0
0

Hi ,

We are facing the issue called - unexpected Termination . 

We are using the below mentioned SQL Server :

Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) 
Apr 29 2016 23:23:58 
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)

We have already done the below investigations :

1) We have investigated the SSIS Catalog DB standard reports ( all executions ) and found the fail job's status as unexpected Termination. We have checked warning messages in the report but there are no such messages being reported .

2) We have made the recovery model of the SSIS DB to simple , but the same problem exists.

3) While doing the investigation of the windows event viewer we have got the below information - 

GENERAL:

Fault bucket 127841528651, type 5
Event Name: SQLException
Response: Not available
Cab Id: 0

Problem signature:
P1: ISServerExec.exe
P2: 0.0.0.0
P3: 00000000
P4: oleaut32.dll
P5: 6.3.9600.18434
P6: 57A61147
P7: -1073741819
P8: 00004CF3
P9: 00000000
P10: 

Attached files:
C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1077_b8bf6f0b-115f-4e35-ace2-929f928397b6_0.mdmp
C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1077_b8bf6f0b-115f-4e35-ace2-929f928397b6_0.mdmp
C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1077_b8bf6f0b-115f-4e35-ace2-929f928397b6_0.tmp

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\Critical_ISServerExec.exe_97aa4efe63ab1d32447cf0f76f68cdee6a91aeb1_00000000_9ae8c883

Analysis symbol: 
Rechecking for solution: 0
Report Id: c9af9bbf-7e63-11e7-818e-061132e37b7b
Report Status: 0
Hashed bucket: a584939fd83cb2ea5c8b75a842aa9bc5

DETAIL:
- System 

  - Provider 

   [ Name]  Windows Error Reporting 
 
  - EventID 1001 

   [ Qualifiers]  0 
 
   Level 4 
 
   Task 0 
 
   Keywords 0x80000000000000 
 
  - TimeCreated 

   [ SystemTime]  2017-08-11T07:09:36.000000000Z 
 
   EventRecordID 800799 
 
   Channel Application 
 
   Computer <>
 
   Security 
 

- EventData 

   127842833832 
   5 
   SQLException 
   Not available 
   126103113357 
   ISServerExec.exe 
   0.0.0.0 
   00000000 
   oleaut32.dll 
   6.3.9600.18434 
   57A61147 
   -1073741819 
   00005CB3 
   00000000 
    
   C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1078_6fef7127-67e8-4401-a98e-98ecb6800228_0.mdmp C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1078_6fef7127-67e8-4401-a98e-98ecb6800228_0.mdmp C:\Program Files (x86)\Microsoft SQL Server\130\Shared\ErrorDumps\ISServer_1078_6fef7127-67e8-4401-a98e-98ecb6800228_0.tmp 
   C:\ProgramData\Microsoft\Windows\WER\ReportArchive\Critical_ISServerExec.exe_878a76fec8d2dac9235cdb2beca018dcfe77967_00000000_cab_9d8e5dc9 
    
   0 
   049ec6e5-7e64-11e7-818e-061132e37b7b 
   8 
   0e81b6b781adca3ce0a997ac51e5eafe 

This looks similar to the earlier reported issue : 
https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message

Please help .

Thanks & Regards,

Abhisek


Abhisek Mondal

Generate sql query from script task and store it in a variable

$
0
0

Hi All,

I am using below sql query to read data from a json file and load data into table. I am using Execute SQL task to execute the query. I want the file path to be stored in a variable. How can i do it in SSIS?


Generate sql query from script task and store it in a variable

$
0
0

Hi All,

I am using below sql query to read data from a json file and load data into table. I am using Execute SQL task to execute the query. I want the file path(C:\Users\SYED\Desktop\Practice\generated.json) to be stored in a variable. How can i do it in SSIS?

DECLARE @EMPLOYEEDETAIL VARCHAR(MAX)

SELECT @EMPLOYEEDETAIL =
BULKCOLUMN FROM
OPENROWSET(BULK'C:\Users\SYED\Desktop\Practice\generated.json',SINGLE_BLOB) JSON

--SELECT @EMPLOYEEDETAIL

IF (ISJSON(@EMPLOYEEDETAIL) = 1)
BEGIN
	--PRINT'JSON FILE IS VALID'
	INSERT INTO [dbo].[EmployeeDetails]
	SELECT * 
	FROM OPENJSON(@EMPLOYEEDETAIL,'$.EmployeeD.Employee')
	WITH (
		NAME VARCHAR(100)	'$.name',
		Gender Varchar(100) '$.gender',
		Company Varchar(100) '$.comapny',
		email Varchar(100) '$.email'
		  )
END

Regards

Syed Faiz

صيانه تكييفات كاريير || 0235695244 || توكيل تكييف كاريير || 01225025360 || امبابه

الخط الساخن لصيانه تكيفات يورك 01014723434 || اصلاح تكيف يورك 01225025360

SSDT - Execute SQL task Build Query login failed

$
0
0

Hello, I have problem execute sql task. when click on BUILD QUERY, show login failed.

I have no problem to use connection manager to login to the database connection. 

the error is only when click on BUILD QUERY, out put LOGIN FAILED, but login and password is righ when test connection on manager manager.

Please Help. thanks


How to compare header of csv file with table column values

$
0
0

Hi I have a csv file with the columns as below. The column names and order of columns can be changed.

DeptID|Dname|Loc or DeptName|Dept_id|Location or Loc_ID|Dept_ID1.

I got a requirement that if the column comes with different names I need to check the combination , if any of the value matches, I need to add the columns in insert statement.

For this I have created a table as 

create table DeptConfig(ID INT Identity(1,1),ColName VARCHAR(50),ColValue VARCHAR(500)); The colname value represents the original column name of Dept Table.
INSERT INTO DeptConfig values('Deptid','Deptid,Dept_id,Deptid1,Dept_id1')
go
INSERT INTO DeptConfig values('Dname','Dname,Deptname,Dept_Name')
GO
INSERT INTO DeptConfig values('Loc','Loc,Location,Loc_Name')

Actual Table Structure is Dept is the tablename (DeptId int,Dname VARCHAR(50),Loc VARCHAR(50))

By using Deptconfig Table How can I achieve my requirement.

Please let me know if I miss some thing.

Viewing all 24688 articles
Browse latest View live


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