Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

2 votes
1 answers
665 views
Split SSIS project in to multiple files to avoid merge hell
Since SSIS does not like being merged nicely I was wondering how to have a big SSIS package split up. With the idea of having multiple devs working on this simultaneously, and a minimal chance of having merge conflicts. In SSIS 2016 I found these options: - ***package parts***, but apparently they d...
Since SSIS does not like being merged nicely I was wondering how to have a big SSIS package split up. With the idea of having multiple devs working on this simultaneously, and a minimal chance of having merge conflicts. In SSIS 2016 I found these options: - ***package parts***, but apparently they don't share connection managers. I don't want to have 100 different connection managers. - ***subpackages***, still this doesn't look very clean and I also wonder if this is what it is intended for. Also, the debugger goes crazy too opening the subpackages while running. Any other drawbacks I should know of? I can't be the only person with this problem. Is there an other way to achieve this?
Sam Segers (129 rep)
Jan 19, 2017, 10:47 AM • Last activity: Aug 5, 2025, 06:05 AM
0 votes
0 answers
17 views
How to update existing data in Master Data Services SQL Server 2022?
I am learning to use Master Data Services for the first time and currently stuck on **updating** existing data. This is also my first time using SSIS so I am currently learning on how to use SQL Command to update data. **Overview data load workflow** 1. Data is being stored into a staging table (DQS...
I am learning to use Master Data Services for the first time and currently stuck on **updating** existing data. This is also my first time using SSIS so I am currently learning on how to use SQL Command to update data. **Overview data load workflow** 1. Data is being stored into a staging table (DQS_STAGING_DATA) 2. When load successful, data then will be loaded from DQS_STAGING_DATA into each staging table in MDS with import type 0 (Ex: stg.Person). **My current SSIS workflow** [Loading data into MDS stg.Person and stg.Company](https://i.sstatic.net/LBhe3Ldr.png) **What I have tried** Change import type from import type 1 to 0. > 1: Create new members only. Any updates to existing MDS data fail. > 0: Create new members. Replace existing MDS data with staged data, but only if the staged data is not NULL. How do I update data inside of the stg.Person and stg.Company using my current SSIS workflow and ensure that Master Data Excel Add-ins will reflect the new data? Both of these staging tables also have their own subscription view. **My expectation** 1. A simple to follow step by step and beginner explanation to update existing data in Master Data Services. 2. Comment and feedback on my current SSIS pipeline.
Amir Hamzah (11 rep)
Aug 5, 2025, 05:18 AM
1 votes
1 answers
704 views
SSIS failure flow error. The decision after a sequence container failure does not proceed with the correct flow
I have an SSIS sequence container that extracts data from individual source database tables into a Stage layer. However, I need to know when a given calculation crashes in order for the given error to be written to the configuration table, which is provided by the yellow highlighted task in which th...
I have an SSIS sequence container that extracts data from individual source database tables into a Stage layer. However, I need to know when a given calculation crashes in order for the given error to be written to the configuration table, which is provided by the yellow highlighted task in which the procedure is called. The problem is that if a given container falls due to an error, it does not flow through failure precendence constraint into the given task (LogPackageFailed). I tried setting FaiPackageOnFailure together with FailParentOnFailure to TRUE in the properties, but it didn't help. The proposed solution in the following links does not work either: - http://techblog.elish.net/2010/12/ssis-foreach-loop-container-continue-on.html - https://simonworth.wordpress.com/2009/11/11/ssis-event-handler-variables-propagate/ , which was addressed in a previous similar query. SSIS-fail
Valachor (11 rep)
Apr 23, 2021, 12:48 PM • Last activity: Aug 2, 2025, 12:08 AM
0 votes
1 answers
936 views
SQL Job Fails Logging In to Integration Services
I have a SQL Server 2012 where all databases are set up in instances. I created a DTS package that accesses a table in a database, let's say `MyDB\MyInstance` and CSV files in a network folder. Integration Services is NOT running in an instance. My domain account doesn't have rights to login to Inte...
I have a SQL Server 2012 where all databases are set up in instances. I created a DTS package that accesses a table in a database, let's say MyDB\MyInstance and CSV files in a network folder. Integration Services is NOT running in an instance. My domain account doesn't have rights to login to Integration Services, so the DBA used his account and deployed the DTS package to Integration Services MSDB relying on the package for access and it runs from there without any issues. The DTS package uses my domain account to login to the database and access the table. Then I created a SQL Job to run the package. It didn't run, of course. I create a proxy account to run the package. The proxy account uses the credentials of my domain account (which doesn't have access to SSIS, but the DBA temporarily made it a local admin on the SQL Server assuming that would give it the rights that it needed but that didn't work either. The error message states that it can't access the Integration Services database. We gave the proxy SQL Agent operator role so we run the job with it. The account running the SQL Agent for the instance is NT Service\SQLAgent$MyInstance I don't know what else to try. If there's any information missing please let me know. I apologize, there are a lot of moving parts.
dzmr83 (1 rep)
Jan 14, 2019, 05:31 PM • Last activity: Aug 1, 2025, 07:01 PM
0 votes
1 answers
827 views
importing csv file with ragged right format and " text qualifier
I'm importing csv files in ssis that are in a ragged right format, I've been able to create the columns perfectly fine but for some of the data rows it has included a " text qualifier into the data in the first column which makes the character count of each column out sync and pushes some characters...
I'm importing csv files in ssis that are in a ragged right format, I've been able to create the columns perfectly fine but for some of the data rows it has included a " text qualifier into the data in the first column which makes the character count of each column out sync and pushes some characters over to the next columns, the " text qualifier is also found in the last column of the same row by itself instead of the value being blank. These " text qualifiers are also not found in the original csv file, the flat file connection manager also does not let you use the text qualifier option when working with ragged right so i can't take them out that way. enter image description here
HappyCoder123 (25 rep)
Jan 26, 2021, 02:16 AM • Last activity: Jul 26, 2025, 11:04 AM
0 votes
1 answers
164 views
extracting SSIS package source code from SSISDB Catalog deployed projects using TSQL
I need to search all the SSIS Projects deployed on a server SSISDB Catalog for a specific substring. My idea is to write a SQL Query on SSISDB.catalog views and internal.package tables to access the package_data field, which is of type varbinary(max) and I was thinking it might contain the package s...
I need to search all the SSIS Projects deployed on a server SSISDB Catalog for a specific substring. My idea is to write a SQL Query on SSISDB.catalog views and internal.package tables to access the package_data field, which is of type varbinary(max) and I was thinking it might contain the package source code, but I found out that this column is always null. Using SSMS it's possible to export the ispac files for deployed projects, therefore the package content it's hidden somewhere. So the question is: how can i extract the ssis pacakges source code using TSQL? this query retuns no rows on my SQL Server 2022 instance SELECT TOP (1000) * FROM [SSISDB].[internal].[packages] where package_data is not null
sergiom (159 rep)
Mar 16, 2025, 03:09 PM • Last activity: Jul 22, 2025, 05:05 AM
2 votes
1 answers
141 views
Namespacing database names on my server in order to test multiple different SSIS packages
An SSIS package that I'm building has two OLE DB connections, to databases named "core" and "staging". I created test versions of these two databases on my local SQL Server installation. I named them "test1_core" and "test1_staging". The "test1_" namespace is necessary because I have many SSIS diffe...
An SSIS package that I'm building has two OLE DB connections, to databases named "core" and "staging". I created test versions of these two databases on my local SQL Server installation. I named them "test1_core" and "test1_staging". The "test1_" namespace is necessary because I have many SSIS different packages in active development at one time, and many of them refer to the same production databases. But it need each local SSIS package to refer to its own version of the database. This works okay until I need to refer to the database name in the package specifically like in an Execute SQL task that includes two connections. Also, I have SQL scripts that say use [core] at the top and I wish I could just use them on my local server without always having to open them up and change that line to use [test1_core] first, then having to change it back. Is there some way to namespace the database name from within SQL Server so I can just refer to the local database as "core" from the SSIS package?
Matt Alexander (145 rep)
Nov 8, 2013, 08:38 PM • Last activity: Jul 22, 2025, 12:01 AM
0 votes
0 answers
42 views
SSIS Lookup with query failing is not giving an error
The query I use to load the LOOKUP cache does a type conversion SELECT CAST(key_as_varchar_column AS INT) AS key_as_int FROM table That works fine unless the source system GUI really allows text in this spot (it does) and user do enter text there (they do). If you run the query in Management Studio...
The query I use to load the LOOKUP cache does a type conversion SELECT CAST(key_as_varchar_column AS INT) AS key_as_int FROM table That works fine unless the source system GUI really allows text in this spot (it does) and user do enter text there (they do). If you run the query in Management Studio with a "clean" table it will complete, on a "dirty" table it will run for some moments and abort in Management Studio with an error - as expected. However, if you use the query above in a LOOKUP as source for the cache, it will NOT signal any error. The cache will be loaded up to just the row before the bad one, and the dataflow then use what's there. This is very bad, I think. I'd much prefer an abort of my package instead of running on some undefined partially loaded cache. On the SQL side, I can work with this using TRY_CAST and a WHERE on the query. This will allow all good rows to be cached, but still not inform of a problem. Do I miss an option to make SSIS stop execution when the cache statement fails?
Ralf (233 rep)
Jul 16, 2025, 02:48 PM
0 votes
1 answers
159 views
SSIS package not copying files when run from SQL Server Agent
I have a simple SSIS package that copies files from one directory to another and then deletes the source file. It works fine when run from Visual Studio. Although when I add the package to the SSIS catalog and schedule it via a SQL Server Agent job the files do not get copied over. The job history i...
I have a simple SSIS package that copies files from one directory to another and then deletes the source file. It works fine when run from Visual Studio. Although when I add the package to the SSIS catalog and schedule it via a SQL Server Agent job the files do not get copied over. The job history is showing no authentication errors, so I have no idea what the issue is. Any advice would be appreciated package connection confg enter image description here
Jeff Shumaker (1 rep)
Jul 31, 2024, 09:13 PM • Last activity: Jul 16, 2025, 05:05 AM
0 votes
0 answers
19 views
SSIS Data Quality Services Issue - Object reference not set to an instance of an object
I have tried to load data using my SSIS pipelines and there is no issue when the source table have around 90k+ data. This Data Quality Services component works well. But once the data has reached 100k+ (132,812) rows, it suddenly breaking and produce this error: > [DQS Cleansing] Error: An unexpecte...
I have tried to load data using my SSIS pipelines and there is no issue when the source table have around 90k+ data. This Data Quality Services component works well. But once the data has reached 100k+ (132,812) rows, it suddenly breaking and produce this error: > [DQS Cleansing] Error: An unexpected error occurred in the DQS infrastructure. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Ssdqs.Component.DataCorrection.Logic.DataCorrectionComponent.ProcessChunk(ReadOnlyCollection1 fieldMappings, ReadOnlyCollection1 records, CorrectedRecordsStatusStatistics& correctedRecordsTotalStatusStatistics) > [DQS Cleansing ] Error: Microsoft.Ssdqs.Infra.Exceptions.EntryPointException: The attempt to update or delete a DAO object of type 'AKnowledgebase' with id 1000175 has failed because the object is not up to date or is being deleted from the database. at Microsoft.Ssdqs.Proxy.Database.DBAccessClient.Exec() at Microsoft.Ssdqs.Proxy.EntryPoint.KnowledgebaseManagementEntryPointClient.DQProjectDelete(DQProject dqProject) at Microsoft.Ssdqs.Component.DataCorrection.Logic.DataCorrectionComponent.ProcessInput(Int32 inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket) > [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "DQS Cleansing" (369) failed with error code 0x80131500 while processing input "DQS Cleansing Input" (382). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. This is my current pipeline that I come up with: enter image description here And this is the same pipeline but after the 3rd load I made: enter image description here **I have tried googling** this error here but it does not help resolve the error. Is there anyway I can fix this issue? I will also appreciate any resource if you can provide.
Amir Hamzah (11 rep)
Jul 16, 2025, 01:34 AM • Last activity: Jul 16, 2025, 02:12 AM
0 votes
1 answers
933 views
How to execute SSIS packages on another SQL server's hardware?
I have 20 ssis packages deployed on SQLSvr1 in the SSIS catalog. They are invoked via the SQL agent jobs on this server. Suppose I re-create these agent jobs on another SQL Server (SQLSvr2), then will they on the hardware resources of SQLSvr2 (CPU, memory)?
I have 20 ssis packages deployed on SQLSvr1 in the SSIS catalog. They are invoked via the SQL agent jobs on this server. Suppose I re-create these agent jobs on another SQL Server (SQLSvr2), then will they on the hardware resources of SQLSvr2 (CPU, memory)?
variable (3590 rep)
May 10, 2022, 03:15 AM • Last activity: Jul 5, 2025, 11:09 PM
1 votes
1 answers
859 views
Run MSSQL stored procedures containing SSIS packages using Windows Authentication from another computer
I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: - **PC400 (Computer/Server A)**, where SQL Server 2012 is installed - **PC401 (Computer/Server B)**, where Java application is running on PC400 has SSIS project &...
I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: - **PC400 (Computer/Server A)**, where SQL Server 2012 is installed - **PC401 (Computer/Server B)**, where Java application is running on PC400 has SSIS project & package(s) deployed to its SSISDB. Of course, I have no problem in executing the packages **LOCALLY in PC400**. But this is not what I need. I want the java application installed on PC401 to be able to execute those packages stored in PC400. I have no problem in using a sa/temp user account with "SQL Server Authentication" to login the server: enter image description here But based on my research, "SQL Server Authentication" does not allow me to deploy/execute packages in SSISDB. Then, I found the following advice: https://dba.stackexchange.com/questions/39614/connect-to-sql-server-using-windows-authentication-from-another-pc-without-activ Let say the windows user account of PC401 is "HKB\Hello123". By creating an identical Windows user under "MSSQL -> Security -> Logins" in PC400: enter image description here my java program is able to use the following codes to execute a stored procedure in PC400 using "Windows Authentication": con = DriverManager.getConnection("jdbc:sqlserver://HKA-PC400:1433;DatabaseName=TempTest;integratedSecurity=true"); CallableStatement cs = null; cs = this.con.prepareCall("{call SP_ETL_B}"); cs.execute(); But is there any other methods to achieve this? Besides, ***I hope my java program would be able to use a sa/temp user account("SQL Server Authentication") to pretend to be a "Windows Authentication" one OR simply connect to an existing Windows user account, then to trigger Stored proc/SQL Server Agent job to run the packages in PC400.***
garethlam (11 rep)
May 4, 2022, 10:01 AM • Last activity: Jul 5, 2025, 03:01 PM
0 votes
1 answers
197 views
Logging the conditions within a conditional split transformation (SSIS in SQL Server 2012 and 2016)
I'm struggling to find out how we can store the conditions inside a conditional split transformation when we run a package. I need a snapshot of the expressions (the whole expressions, not only parameters inside them). The closest we have got is when an error triggered the SSIS logging and stored th...
I'm struggling to find out how we can store the conditions inside a conditional split transformation when we run a package. I need a snapshot of the expressions (the whole expressions, not only parameters inside them). The closest we have got is when an error triggered the SSIS logging and stored the context in the table event_message_context, but we can't figure out how to trigger this logging without an error. We don't need it specifically to come from the built-in logging, we can surely use a script task if you have any suggestions. We run both SQL server 2012 and 2016.
NikolaiH (1 rep)
Sep 25, 2018, 08:32 PM • Last activity: Jun 25, 2025, 05:04 AM
1 votes
1 answers
193 views
Automatic database restore fails as cannot find file
A while back I asked for help automating a database restore using a backup file provided from another server: https://dba.stackexchange.com/questions/91223/automatically-restore-sql-server-database-from-file-from-another-server. I'm pleased to say that I now have this working as a SQL Server Agent j...
A while back I asked for help automating a database restore using a backup file provided from another server: https://dba.stackexchange.com/questions/91223/automatically-restore-sql-server-database-from-file-from-another-server . I'm pleased to say that I now have this working as a SQL Server Agent job. We are now trying to trigger this job as part of a maintenance plan that runs on the other (dev) server. At the moment we have a maintenance plan that runs on the live server and performs the following steps, in sequence: 1. Back up the target databases 2. Call an external process to copy the created backup files 3. Clean up any backup older than 2 days (runs at the same time as 2) 4. Start the restore job on the other server When I run the maintenance plan on live it reports success, however when we check the job history on the dev server it shows that it has failed saying that it could not find the file. Running the job again returns success, and a manual check indicates that the files have been copied correctly. It would seem that the restore job is being started too soon but I can't figure out why. Is there any reason why the restore job is being triggered before the copy process has completed? EDIT: I've checked the maintenance plan logs and the restore job step starts 1 second after the transfer step. Obviously the transfer takes longer than this, so I can at least see evidence of the problem.
toryan (335 rep)
Mar 16, 2015, 11:17 PM • Last activity: Jun 23, 2025, 05:04 PM
4 votes
1 answers
2661 views
22046 "Impersonation error" running SQL Server Agent job
(New to SSIS. None of the similar questions mention this particular impersonation error.) I'm trying to run an SSIS package as an Agent job via a proxy, and I'm getting a non-helpful error message. The credential object is for an AD account. I'm able to log in with the password to other services, bu...
(New to SSIS. None of the similar questions mention this particular impersonation error.) I'm trying to run an SSIS package as an Agent job via a proxy, and I'm getting a non-helpful error message. The credential object is for an AD account. I'm able to log in with the password to other services, but attempting to run the Agent job errors out in the Execute job step. Running the job as SQL Agent service account worked, but it doesn't have access to the filesystem that the SSIS job is supposed to pull data from. I checked the agent log file and it's this: SQLServer Error: 22046, Impersonation error. [SQLSTATE 42000] I checked the Windows security log in Event Viewer: Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xC000006D Sub Status: 0xC000006A I tried it with my (sysadmin) user ID and password in a different credential / proxy and got the same error. I know that account works. We granted both SQL Agent and this account user rights to logon as batch job, and the agent account permission to impersonate. We also tried making the various accounts Windows admins and sysadmins, but nothing has helped. This worked right out of the box in our QA domain. Any suggestions how to get this to work? What domain/local/SQL Server security settings would enable or prevent the agent impersonating a user? Windows 2016 + SQL Server 2016
that it guy (181 rep)
Apr 25, 2019, 02:11 PM • Last activity: Jun 23, 2025, 04:07 PM
0 votes
1 answers
208 views
Compare table datetime, SQL & SSIS
I am trying to add a step in my SSIS job where it checks a table (FYI, so this table has only 1column which is a datetime data type that gets updated daily with a datetime from another table) whether it is greater than midnight or not. how do I setup this with the appropriate query. This is the tabl...
I am trying to add a step in my SSIS job where it checks a table (FYI, so this table has only 1column which is a datetime data type that gets updated daily with a datetime from another table) whether it is greater than midnight or not. how do I setup this with the appropriate query. This is the table name - ETLTimeCheck This is the only column in this table- EXEC_END_TIME I started out with this idea:
SELECT...
FROM [dbo].[ETLTimeCheck] 
WHERE [EXEC_END_TIME] > DATEADD(D,0,DATEDIFF(D,0,GETDATE()))
This is suppose to return a midnight-> DATEADD(D,0,DATEDIFF(D,0,GETDATE())) I know there must be an 'IF' statement inside my query. Can you please help me finish this?
WhoIsNotActive (13 rep)
Oct 20, 2022, 09:13 PM • Last activity: Jun 22, 2025, 07:06 AM
0 votes
2 answers
212 views
Does "allow remote connections to this server" in sql server impact SSIS packages?
I'm wondering if anyone has experience with this setting "allow remote connections to this server" in sql server. I am partly responsible for a few hundred sql servers which run SSIS in various ways. Some run it with ssis packages deployed through integration services catalog, and others run the SSI...
I'm wondering if anyone has experience with this setting "allow remote connections to this server" in sql server. I am partly responsible for a few hundred sql servers which run SSIS in various ways. Some run it with ssis packages deployed through integration services catalog, and others run the SSIS package from a batch server or even manually from their laptop running visual studio, using a package that connects to our sql server. A security consultant is saying we need to disable this on every server, no questions asked, but I'm hearing conflicting information. Some would imply any SSIS packages deployed on another server or laptop and connecting to this one, would be denied now. Others say it actually means connections FROM this server, so it would impact ssis packages called from batch servers. Others say it is FROM still, but for some reason wouldn't impact SSIS packages. Any recommendations on what I should do? Rather than test every possible scenario to appease the security consultant, I would like to be able to rule out a few "always true" situations where we would keep this setting checked. Otherwise I will have to test hundreds of environments just to disprove him. Any help appreciated.
Jared Sloan (1 rep)
Jul 6, 2020, 10:31 PM • Last activity: Jun 13, 2025, 11:07 PM
0 votes
1 answers
221 views
Finding and locally deleting deleted records in a million-record table
I'm trying to incrementally load data from a remote server to a local one (using SSIS and linked server). Remote table has 1.7 million of records, increasing every hour. So far, I have been able to load new records and update existing records using their RECID and LASTMODIFIEDDATEANDTIME fields. But...
I'm trying to incrementally load data from a remote server to a local one (using SSIS and linked server). Remote table has 1.7 million of records, increasing every hour. So far, I have been able to load new records and update existing records using their RECID and LASTMODIFIEDDATEANDTIME fields. But when I try to find records which are deleted since last refresh, I face a never-ending operation: DELETE FROM localdb.dbo.INVENTTRANS WHERE RECID NOT IN (SELECT RECID FROM REMOTESERVER.remotedb.dbo.INVENTTRANS) I tried running SELECT RECID FROM REMOTESERVER.remotedb.dbo.INVENTTRANS and it loads data in less than 10 seconds, hence there is no network/performance issue. But when I run the above DELETE query, it doesn't finish even after 15 minutes. I tried copying RECIDs to a local table to prevent possible reciprocations between local and remote server, no luck. Can someone guide me to improve performance of such a query?
Mohammad Javahery (1 rep)
Jun 11, 2022, 11:28 AM • Last activity: Jun 8, 2025, 10:04 PM
0 votes
2 answers
5046 views
What is the recommended approach to migrate SSIS and related packages from sql server 2016 to sql server 2019?
I have SSIS packages in msdb database as well as in the ssis catalog (ssis db). What is the recommended approach to migrate SSIS and related packages from sql server 2016 to sql server 2019? For example - 1. Do I need to backup and restore the ssisdb? 2. or do I need to re-create the ssis catalog th...
I have SSIS packages in msdb database as well as in the ssis catalog (ssis db). What is the recommended approach to migrate SSIS and related packages from sql server 2016 to sql server 2019? For example - 1. Do I need to backup and restore the ssisdb? 2. or do I need to re-create the ssis catalog that will auto create the new ssisdb followed by manual deployment of the ssis packages? 3. How to handle ssis packages in the msdb?
variable (3590 rep)
Apr 13, 2022, 08:04 AM • Last activity: May 31, 2025, 04:07 AM
1 votes
0 answers
42 views
Collaborating SSIS project using Active Directory
Currently I have a simple SSIS project inside of a server that only allow one person to use. I am looking for an alternative for other people to collaborate with that SSIS project. I have done my research to try using Azure DevOps and Github. But my manager wants me to use Active Directory, to allow...
Currently I have a simple SSIS project inside of a server that only allow one person to use. I am looking for an alternative for other people to collaborate with that SSIS project. I have done my research to try using Azure DevOps and Github. But my manager wants me to use Active Directory, to allow users with valid username to access the project. How can I add new user inside of the SSIS project? Is there any way I can just add new user through visual studio so that they can also collaborate? I have added a new user inside of my SSISB folder. But still I have not found any solution. enter image description here
Amir Hamzah (11 rep)
May 30, 2025, 03:46 AM
Showing page 1 of 20 total questions