Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Run Barch in SQL Server problem - share drive???
Hello Guys,

I have a problem with a job moving and zipping file to share drive


What does my Batch?



1)       Copy backup device (initially in D:/) into
//SERVER/SHARE/Archived_Backups/

2)       Create new folder in //SERVER/SHARE/Archived_Backups/

3)       Move the DEVICE into this new folder

4)       Zip the DEVICE and named it today.zip


if I run it manually the batch file works perfectly, But if I launch it
with sql server (what I would like to perform) this step does not run
perfectly.

What does this job?

1)     run the batch
Step 1
DECLARE @cmd sysname, @var sysname
SET @var = 'start D:\Backups\MyBacth.bat'
EXEC master..xp_cmdshell @var

2)       Overwrite the DEVICE

3)       Verify DEVICE integrity


I have already set privileges for sqlservice in to this share


What do i need to do??? Any Suggestions?


Thanks in advance



Ina


Report this thread to moderator Post Follow-up to this message
Old Post
ina
11-29-06 12:13 AM


RE: Run Barch in SQL Server problem - share drive???
Hi

Apart from the typo in your script! You don't say what the SQL Agent account
is running as and if it has network privileges.

John

"ina" wrote:

> Hello Guys,
>
> I have a problem with a job moving and zipping file to share drive
>
>
> What does my Batch?
>
>
>
> 1)       Copy backup device (initially in D:/) into
> //SERVER/SHARE/Archived_Backups/
>
> 2)       Create new folder in //SERVER/SHARE/Archived_Backups/
>
> 3)       Move the DEVICE into this new folder
>
> 4)       Zip the DEVICE and named it today.zip
>
>
> if I run it manually the batch file works perfectly, But if I launch it
> with sql server (what I would like to perform) this step does not run
> perfectly.
>
> What does this job?
>
> 1)     run the batch
> Step 1
> DECLARE @cmd sysname, @var sysname
> SET @var = 'start D:\Backups\MyBacth.bat'
> EXEC master..xp_cmdshell @var
>
> 2)       Overwrite the DEVICE
>
> 3)       Verify DEVICE integrity
>
>
> I have already set privileges for sqlservice in to this share
>
>
> What do i need to do??? Any Suggestions?
>
>
> Thanks in advance
>
>
>
> Ina
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
12-01-06 12:14 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:40 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006