Solved

SQL SERVER Express backup batch file problem

Posted on 2010-11-22
3
960 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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