SSIS running a package with Accsess error could not lock file - sql-server

i have a package that has a ado source , it gets data from an access file and it will not go to the next step because it's stuck on an error " could not lock file " , how can i fix this that it will not happen?

Related

SSIS Foreach file enumerator Not picking up files once deployed

I have a package that loads CSV files from a folder, I have setup a foreach file enumarator to loop through the directory and assigns the files that starts with "Example*.csv" including the extention.
The package runs fine in SSDT but once i deploy and run it through the agent job does not load anything and the jobs runs successfully. I have removed the Foreach loop and connected the Flat file connector to one file and it works perfectly .
Please assist I am new to this.
Expression passsed to Flat File connection manager :
FolderLocation = "\Sharedrive\Business\Company-info

Run ssis package in agent job while both are on separate machines

I am trying to run ssis package through agent jobs. The packages and the sql server are on different machines.
When the agent job tries to run ssis package step the job fails with following error:
Executed as user: Domain\username. Microsoft (R) SQL
Server Execute Package Utility Version 13.0.5026.0 for 64-bit
Copyright (C) 2016 Microsoft. All rights reserved. Started:
1:42:42 AM Error: 2020-01-23 01:42:42.49 Code: 0xC0011007
Source: {07BB41B6-D0DF-4349-B9AE-498397D214D7} Description:
Unable to load the package as XML because of package does not have a
valid XML format. A specific XML parser error will be posted. End
Error Error: 2020-01-23 01:42:42.49 Code: 0xC0011002 Source:
{07BB41B6-D0DF-4349-B9AE-498397D214D7} Description: Failed to
open package file
"D:\ssis_packages\package.dtsx"
due to error 0x80070003 "The system cannot find the path specified.".
This occurs when loading a package and the file cannot be opened or
loaded correctly into the XML document. This can be the result of
specifying an incorrect file name when calling LoadPackage or the
specified XML file has an incorrect format. End Error Could not load
package
"D:\ssis_packages\package.dtsx"
because of error 0xC0011002. Description: Failed to open package file
"D:\ssis_packages\CoreLogic\CoreLogicSSIS\Real_Estate_Monthly.dtsx"
due to error 0x80070003 "The system cannot find the path specified.".
This occurs when loading a package and the file cannot be opened or
loaded correctly into the XML document. This can be the result of
specifying an incorrect file name when calling LoadPackage or the
specified XML file has an incorrect format. Source:
{07BB41B6-D0DF-4349-B9AE-498397D214D7} Started: 1:42:42 AM
Finished: 1:42:42 AM Elapsed: 0.047 seconds. The package could not
be found. The step failed.
I need some suggestion as what is the best way to run ssis package when sql server and packages are on different machines.
There can be below defined reasons and solutions.
1. The error says it cannot find the package. Just double-check if this is the correct path for your package:
D:\ssis_packages\CoreLogic\CoreLogicSSIS\Real_Estate_Monthly.dtsx
2. It looks like a local path, so if indeed your package is on the D: Drive of another server make sure to add the server name in front of the path:
//server-name/ d$/
ssis_packages\CoreLogic\CoreLogicSSIS\Real_Estate_Monthly.dtsx
3. Grant the account running your SQL Agent job (I am guessing it's the SQL Agent account, but you should double-check that) access rights to the folder where your SSIS package is stored.
4. If the above did not solve the issue, also check if the SSIS package and your SSIS installation on the server where you are running it are the same. Running a 32bit SSIS package on a 64-bit system/SSIS will result in a similar error message.

Executing SSIS package gives System.IO.IOException

I am trying to execute the package and every time I see the following error. Especially when I execute the data flow task.
Error :
System.IO.IOException: The process cannot access the file
'C:\PPE_OVERRIDES.ispac' because it is being used by another process.
Full Output:
------ Build started: Project: PPE_OVERRIDES, Configuration: Development ------
Build started: SQL Server Integration Services project: Incremental ...
Starting project consistency check ...
Project consistency check completed. The project is consistent.
Error : System.IO.IOException: The process cannot access the file
'C:\PPE_OVERRIDES.ispac' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow outputWindow)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow outputWindow)
Build complete -- 1 errors, 0 warnings
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
How can I fix it. My ispac file is in bin folder. I want to make sure the SsISDB catalog and Visual Studio are not fighting over this location
Based on the following article:
Fix SSIS Error while execution: System.IO.IOException: The process cannot access the file ‘PATH\Project.ispac’ because it is being used by another process.
Possible Solution:
Need to kill the Windows processes (SSIS Debug Host, and SSIS Debug Host (32 bit)) related to SSIS Debug and restart Visaul Studio to address the problem.
Similar Issue links
The process cannot access the file 'ssisproject.ispac' because it is being used by another process.
SSIS: The process cannot access the file ‘*.ispac’ because it is being used by another process
SIS: The process cannot access the file ‘*.ispac’ because it is being used by another process
Every time you start up an instance of SQL Server Manager, you have to go kill the SSIS Debug Host processes. However, I don't think they showed up until I tried to re-execute a package. I might try executing an empty, dummy package, fix the crash, then try again with the real package.

SSIS: Error when executing a Execute Package Task

I have a project where I have 1 master package and several child packages which I call in the master.
However when I launch the master package it goes into error on one "Execute Package Task"
See below for the ouput from the Output-Window:
Information: 0x40016042 at build_NAV_sources: The package is attempting to configure from the parent variable "var_actual_timestamp".
.
.--more variables configuration
.
Information: 0x40016042 at build_NAV_sources: The package is attempting to configure from the parent variable "var_table_prefix".
Error: 0xC00220E0 at Execute Package Read Dim norriq data to sources: The connection is not specified.
Error: 0xC0024107 at Execute Package Read Dim norriq data to sources: There were errors during task validation.
Error: 0xC00220E4 at Execute Package build nav sources: Error 0xC0012050 while preparing to load the package. Package failed validation from the ExecutePackage task. The package cannot run.
.
Task failed: Execute Package build nav sources
SSIS package "F:\Workspaces\KPA\TFS\Norriq\BI\SQL 2012\NAV 2015\SSIS\NAV Datamart\build_NAV_datamart_master.dtsx" finished: Success.
When I check the package where it indicates that the connection is not specified I clearly see that there is an connection specified. In my connection manager I see the connection and when I edit this one and check for connectivity everything works fine.
To make it weirder: When I launch the package (build_NAV_sources) seperatly, it executes without any errors or warnings
Anyone has a clue on whats happening?
Thx
Without changing anything important, I've checked-in my solution in TFS, closed VS, opened the solution again and did a build/rebuild and it worked magically.

Error occurred while opening logfile C:\Windows\system32\LogFiles\Sum\Api.log

I need to restart the MS SQL server service every morning because my web client site can not connect.
However, when I start my services it works. I don't know what is causing the problem.
I found this in my error log.
sqlservr (4052) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.log"
for read only access failed with system error 5 (0x00000005):
"Access is denied. ".
The open file operation will fail with error -1032 (0xfffffbf8).
sqlservr (3000) An attempt to open the file "C:\Windows\system32\LogFiles\Sum\Api.chk"
for read / write access failed with system error 5 (0x00000005): "Access is denied. ".
The open file operation will fail with error -1032 (0xfffffbf8).
Hope somebody can help me fix this.
Your serviceaccount need access to the folder:
C:\Windows\System32\LogFiles\Sum
Go to the folder and add the account with read/write permissions.
http://support.microsoft.com/kb/2811566

Resources