Solved

SQL SERVER Express backup batch file problem

Posted on 2010-11-22
3
929 Views
Last Modified: 2012-05-10
Created the folling batch file to backup SQL Server Express DB. If I copy to the c:\program file\SQL Server folder and run it works but from a folder called c:\mssqlbackup\ it does not. What permissions in windows or sql server do I need to run this?

'--------------------------------------------------------------------------------------------


C:\Documents and Settings\glennr>sqlcmd -S GLENN\SQLEXPRESS -Q"EXEC expressmaint
 @database = 'test1', @optype = 'DB', @backupfldr = 'C:\Program Files\uniPoint\C
lient\DB\Backups\', @reportfldr = 'C:\Program Files\uniPoint\Client\DB\Backups\'
, @verify = 1, @dbretainunit = 'months', @dbretainval = 1200, @rptretainunit = '
months', @rptretainval = 1200, @report = 1"
Error  Source Description HelpFile HelpID
------ ------ ----------- -------- -----------
0x800A NULL   NULL        NULL               0
Msg 50000, Level 16, State 1, Server GLENN\SQLEXPRESS, Procedure expressmaint, L
ine 304
Error creating log file

0
Comment
Question by:glenn_r
  • 2
3 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
Comment Utility
SQL Server by default runs with limited permissions.  The account used to start the SQL Server service does not permissions to make changes (create .ldf file) in where you want to put it.
Using Control Panel, Admin Tools, Services applet, go to SQL Server and check the startup account, and give permissions to that account in Windows Explorer, folder permissions, Security.
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 125 total points
Comment Utility
SQL Server by default runs with limited permissions.  The account used to start the SQL Server service does not permissions to make changes (create .ldf file) in where you want to put it.
Using Control Panel, Admin Tools, Services applet, go to SQL Server and check the startup account, and give permissions to that account in Windows Explorer, folder permissions, Security.
0
 

Author Closing Comment

by:glenn_r
Comment Utility
Thanks for the quick and thourough response.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now