Solved

SQL SERVER Express backup batch file problem

Posted on 2010-11-22
3
956 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34191840
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
ID: 34191841
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
ID: 34192549
Thanks for the quick and thourough response.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In this article I will describe the Copy Database Wizard 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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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