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
Solved

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

Posted on 2013-05-25
7
385 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

856 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