Solved

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

Posted on 2013-05-25
7
390 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
[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
  • 4
  • 2
7 Comments
 
LVL 9

Accepted Solution

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

Assisted Solution

by:mimran18
mimran18 earned 400 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 400 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 400 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 100 total points
ID: 39197998
Do you have the appropriate permissions to execute the BACKUP command?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

737 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