Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL SERVER Express backup batch file problem

Posted on 2010-11-22
3
Medium Priority
?
975 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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

610 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