Solved

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

Posted on 2013-05-25
7
379 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 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now