Re: Question about "Distribution clean up: distribution" Job



Is this SQL 2005? If so you need to enable xp_cmdshell.
If it is SQL 2000 you need to ensure that no one else is accessing this
directory.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



"Ken Powers" <KenPowers@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6E882295-B0F5-4FA8-A3ED-731CFB672615@xxxxxxxxxxxxxxxx
Can the manner in which you remove a publication effect the ability of
this
job to run?

I had been experiencing errors with this job. The error message was as
follows:

"Executed as user: <SQLServerAgentDomainAccount>. Could not remove
directory
'P:\ReplData\unc\YKCLNSE_CLGWAREHOUSEPROD_STAGINGDAILYADT\20061221142453\'.
Check the security context of xp_cmdshell and close other processes that
may
be accessing the directory. [SQLSTATE 42000] (Error 20015). The step
failed."

I run my SQL Server Agent process with an account that does not have
sysadmin rights. After reading a few other posts with this same error, I
experimented with running the job as a user with sysadmin rights.
Unfortunately, I still had the same error.

Then I went into the job step and copied the command it was attempting to
run. This is the command:

"EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0,
@max_distretention = 72"

I pasted this command into a query window and attempted to run it under my
own login, which is a member of the sysadmin role and is also a member of
the
Local Administrators group. It still could not run.

The folders the command was trying to delete were used for Publications
that
no longer existed. So I went ahead and deleted the folders manually. Now
the command ran successfully.

I am thinking something went wrong during the process of removing the
publications and subscriptions. Anyone have any idea what might have
happened?


.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: Can I get Consultancy advice on SQL/Fox in the UK (South East)
    ... My problem is the two Sequel Server tables within one database with which I ... Don't ask me why but the SQL designers have NOT ... command that I can initiate with SQLCONNECT, ... > While you're in the View Designer, right-click and view the SQL code. ...
    (microsoft.public.fox.helpwanted)
  • Re: Optimistic Concurrency on UpdateCommand...
    ... client device, I update that column with a non-null datetime and then try to ... 1!!!If I copy and paste the command ... With the 4th column not allowing nulls, the optimistic concurrency code ... Can I have a nullable datetime column in my Sql ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Select - SQL vs. SUM
    ... If you have to use an earlier version of VFP earlier than 9, ... >> also force VFP to read from the buffer with a new clause in the SQL ... >> The SELECT command doesn't move the record pointer in the grid's record ... >>> I have a grid whose recordsource is a table named _payments. ...
    (microsoft.public.fox.programmer.exchange)