Link to home
Start Free TrialLog in
Avatar of ahongens
ahongens

asked on

Problem scheduling data copy from netware share

Hey,

I've got a problem. I have a novell file server and a NT4 workstation SP6a. I want the workstation to copy data from the novell server every hour or so. The novell administrator made a share for me, and I made a drive mapping to this share.

Next I created a batch file to copy the files needed:

echo y | del c:\database
copy h:\*.* c:\database

If I execute this batch file, it runs perfectly. However, if I schedule it, or I have SQL server run it, I get an 'Access is denied' error.

The same problem occurs not only with the batch above, but also when I try 'dir h:\', so the problem is really related to the share

I use an administrative account called 'tourweb', and I have the task scheduler, the MSSQL Server and the MSSQL Agent run under this account.

I prefer to have SQL Server run these commands using the xp_cmdshell proc for example (lets the MSSQL Agent run a dos command under its account), because then I can insert these commands in an existing job.

To troubleshoot I was thinking about a commandline utility or a VB program to write the user context to a file, but I don't have a command line utility, nor the code for VB.

This problem is now the bottleneck in my project, because I have to run the batchfile above several times a day manually. Does anyone have any idea!?

I assume the 'standard' netware client is installed, but I'm a newbie to netware. Have a look at the following screenshot:
http://www.angelo.huizezeldenrust.nl/foto/foto.asp?foto=snowtimewebnetwork.gif
Avatar of SysExpert
SysExpert
Flag of Israel image

Here are some relevant pieces of info for similar problems !!

----------------

Go to the Services Control Panel and select the Scheduling Service.  There, you can configure it to run under any account.
From dlb6597 :
you can schedule "CMD /K" interactively and run the batch file manually. this will allow you to see
  any errors that occur.
 The solution is that if you want to use the REN as a scheduled
 task, you must put the path of the file to be renamed. If you manually run the batch file, it will work
               without the path,but if you run as schedule, it will not.
-------------------------
I hope this helps !
Avatar of ahongens
ahongens

ASKER

Nope, as I said, the task scheduler and any other relevant services are allready running under my account.

Scheduling the batch to run interactively shows the 'access is denied' error.
SO, you are saying you can do a copy h:\*.* c:\database
but not a dir h:
I would talk to your netware admin guy. Something is not quite right.

Also get the latest netware client for your machin !!

I hope this helps !
No, I can run 'copy h:\*.* c:\database' AND 'dir h:\', but I cannot schedule them or let SQL Server run these commands.
solved: in the batchfile or command I also have to 'log on' to the novell server..

exec xp_cmdshell 'net use z: \\sntime\sys\data\twescape\data0102'
exec xp_cmdshell 'echy y | del c:\database\*.*'
exec xp_cmdshell 'copy z:\*.* c:\database'
exec xp_cmdshell 'net use z: /delete'
solved: in the batchfile or command I also have to 'log on' to the novell server..

exec xp_cmdshell 'net use z: \\sntime\sys\data\twescape\data0102'
exec xp_cmdshell 'echy y | del c:\database\*.*'
exec xp_cmdshell 'copy z:\*.* c:\database'
exec xp_cmdshell 'net use z: /delete'
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial