Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts

Thursday, March 29, 2012

Error when trying to use checkpoint file

I have a package with settings SaveCheckpoints=True and CheckpointUsage = Never. After the package failed I fixed the cause of failure by setting a database column to allow nulls. Then I went to our web app that we built to monitor package execution and clicked on the button to restart the package. The web app loads the package and then sets the CheckpointUsage property of the package object to 'Always'. Then it executes the package in a new thread. The package then produced this error:

Checkpoint file "E:\Package1Checkpoint" failed to open due to error 0x80070005 "Access is denied.".

Since there was only one remaining task to run in the package I ran it manually.

Now here is the really interesting part. I then needed to run the same package but with different parameters. When I attempted to run it with the saved checkpoint settings (CheckpointUsage=Never, SaveCheckpoints=True) I got this error:

"An existing checkpoint file is found with contents that do not appear to be for this package, so the file cannot be overwritten to start saving new checkpoints. Remove the existing checkpoint file and try again. This error occurs when a checkpoint file exists, the package is set to not use a checkpoint file, but to save checkpoints. The existing checkpoint file will not be overwritten. "

So I then attempted to rename the checkpoint file so it would not interfere, however, it would not let me, saying that the file was in use.

So what I had to do was add a configuration entry which set SaveCheckpoints to False. Then I was able to run the package.

Any ideas?

Could it be that the web app was still executing, and the package executed by web app was still running and holding the checkpoint file? This would explain both "Access denied" when trying to read checkpoint, and "file in use" when trying to delete it.|||

TFYR. I'm reviewing the log entries for when the package "failed". I do not see the 'PackageEnd' log entry so I believe you are correct in that the package was still running and was holding the checkpoint file. I believe it was running a very long-running ExecuteDTS2000 task. ' I must have assumed that when a previous task failed that it had failed the package also, which evidently was not the case. Anyway, below is the code from the web app that launches the package if you are interested. Thanks.

...

pkg.CheckpointUsage = DTSCheckpointUsage.Always;

RunPackage();

}

private void RunPackage() {

ThreadStart threadStart = new ThreadStart(PackageExecute);

Thread thread = new Thread(threadStart);

thread.Name = pkg.Name;

thread.Start();

}

private void PackageExecute() {

try

{

pkg.Execute();

}

catch (Exception ex)

{

lblMessage.Text = ex.Message;

}

}

Tuesday, March 27, 2012

Error when trying to change server settings

I am trying to connect to a SQL Server machine using SQL security instead of integrgated security. However, the server was setup initially to use only integrated security. When I right click on the server and select properties, I get this error:

Error 0: Cannot load the DLL xpstar.dll, or one of the DLLs it references. Reason: 5(Access is denied.).

I googled this error but could not find a single solution. The dll will not register with regsvr32. Do I need to repair SQL Server and then re-run the latest service pack, or is there a simple solution?

Thanks,Books Online

How to set up Mixed Mode security (Enterprise Manager)
To set up Mixed Mode security

Expand a server group.

Right-click a server, and then click Properties.

Click the Security tab.

Under Authentication, click SQL Server and Windows.

Under Audit level, select the level at which user accesses to Microsoft® SQL Server? are recorded in the SQL Server error log:
None causes no auditing to be performed.

Success causes only successful login attempts to be audited.

Failure causes only failed login attempts to be audited.

All causes successful and failed login attempts to be audited.

See Also

Authentication Modes
------

Does that help?|||Thanks. I understand how to setup mixed mode security, but the problem appears to be a dll called xpstar.dll which throws an error when I right click on the server icon and select properties. I wanted to know if there was a fix for this short of reinstalling.

When I right click on the server icon in server explorer and select properties, I get this error:

Error 0: Cannot load the DLL xpstar.dll, or one of the DLLs it references. Reason: 5(Access is denied.).

I googled this error but could not find a single solution. The dll will not register with regsvr32. Do I need to repair SQL Server and then re-run the latest service pack, or is there a simple solution?|||No answers, just questions.

What version & service pack of SQL Server are you running?

Have you checked the event log to see if you can find any further information?

Terri|||Hello Terri,

It is SQL Server 2000 and should have service pack 3 installed.

There are no errors in the event log related to SQL Server.|||Is there anything in the SQL Server Logs?

Terri|||Unfortunately not.

Also, I reapplied Service Pack 3 and it did not fix the problem.

I have SQL on a development machine. If I right click on the local server instance and then select properties, the Server properties dialog appears. If I select the server, I get an error. At first, I thought it was the development machine, but unfortunately the same thing happens when I try this directly on the server. I am at a loss of what to do short of backing up the databases, uninstalling SQL, reinstalling SQL, and then restoring the databases. The SQL installation does not have a repair option - do you know what would happen if I installed SQL over the existing SQL?

Thanks,