[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2013-05-25
7
Medium Priority
?
396 Views
Last Modified: 2013-06-23
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
Comment
Question by:gvilbis
  • 4
  • 2
7 Comments
 
LVL 9

Accepted Solution

by:
mimran18 earned 1600 total points
ID: 39197334
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'
GO
0
 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 1600 total points
ID: 39197361
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
 

Author Comment

by:gvilbis
ID: 39197363
this command:
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'

restricted, treminated
is there any other command?

Thanks
Gvilbis
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 1600 total points
ID: 39197364
are you going to take backup from command line or SSMS ?
0
 

Author Comment

by:gvilbis
ID: 39197371
i used this command in SSMS but its terminate
if you have other option its will be good also

Thanks
gvilbis
0
 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 1600 total points
ID: 39197376
BACKUP DATABASE test   TO DISK = 'c:\TEST_FULL_BACKUP.bak'

If you try the above script, what is the error message ?
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 400 total points
ID: 39197998
Do you have the appropriate permissions to execute the BACKUP command?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

873 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