• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

what is the excat command line for backup database in sql studio express?

i have in sql studio several databases and i would like to backup through command line one of the DB
what is the command?


Thanks
Gvilbis
0
gvilbis
Asked:
gvilbis
  • 4
  • 2
5 Solutions
 
mimran18Commented:
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'
GO
0
 
mimran18Commented:
Use osql or sqlcmd.

"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe"
    -E -Q "BACKUP DATABASE mydatabase TO DISK='C:\tmp\db.bak' WITH FORMAT"

Reference : http://stackoverflow.com/questions/122690/what-is-a-simple-command-line-program-or-script-to-backup-sql-server-databases
0
 
gvilbisAuthor Commented:
this command:
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'

restricted, treminated
is there any other command?

Thanks
Gvilbis
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
mimran18Commented:
are you going to take backup from command line or SSMS ?
0
 
gvilbisAuthor Commented:
i used this command in SSMS but its terminate
if you have other option its will be good also

Thanks
gvilbis
0
 
mimran18Commented:
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'

If you try the above script, what is the error message ?
0
 
Anthony PerkinsCommented:
Do you have the appropriate permissions to execute the BACKUP command?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now