SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


12»»

backup through command prompt Expand / Collapse
Author
Message
Posted Saturday, November 21, 2009 5:44 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
hi,
i have installed visual studio 2008, so sql server 2005 is by default installed.can you tell me how to back up my database files through command prompt,sqlcmd :)
Post #822870
Posted Saturday, November 21, 2009 6:01 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 17, 2010 9:09 PM
Points: 326, Visits: 383
Is your SQL Server is a Express edition
Post #822872
Posted Saturday, November 21, 2009 6:04 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 17, 2010 9:09 PM
Points: 326, Visits: 383
http://msdn.microsoft.com/en-us/library/ms165702(SQL.90).aspx
use this link .

it shows to login and then once you login you write normal backup command
backup database dbname to disk='c:\db.bak'
Post #822873
Posted Saturday, November 21, 2009 9:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
yes,its sql express edition
Post #822900
Posted Saturday, November 21, 2009 9:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
the link you provided is not so fruitful.it did'nt solved my problem.Also ,you gave the commands for backup:
backup database databasename to disk='C:\db.bak'.
But it too gave errors:
Cannot open backup device 'C:\db.bak' Operating system error 5(Access is denied...).
BACKUP DATABASE is terminating abnormally.

THIS IS THE ERROR MESSAGE I GET IN COMMAND PROMPT OF SQLCMD.
PLZ HELP
Post #822905
Posted Saturday, November 21, 2009 9:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
the link you provided is not so fruitful.it did'nt solved my problem.Also ,you gave the commands for backup:
backup database databasename to disk='C:\db.bak'.
But it too gave errors:
Cannot open backup device 'C:\db.bak' Operating system error 5(Access is denied...).
BACKUP DATABASE is terminating abnormally.

THIS IS THE ERROR MESSAGE I GET IN COMMAND PROMPT OF SQLCMD.
PLZ HELP
Post #822906
Posted Saturday, November 21, 2009 10:10 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 17, 2010 9:09 PM
Points: 326, Visits: 383
error says that you do have access on the c drive..

open cmd
type sqlcmd -S"servername" -U"username" -P"password"
after successful login you see
>1

1 use master
2 backup database dbname to disk=N'c:\foldername\db.bak'
3 go
the db backed up

check the link for more details

Post #822907
Posted Saturday, November 21, 2009 5:48 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
thanks.
Post #822946
Posted Monday, November 23, 2009 6:15 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, February 11, 2010 5:51 AM
Points: 574, Visits: 337
Hi Shyam,

Please confirm if the problem is fixed now.
Post #823213
Posted Monday, November 23, 2009 5:08 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 08, 2010 3:18 PM
Points: 11, Visits: 18
hi,
yes,backup is successfully created.
now can u help me how to retrieve (or restore) by database to another sql server database?i.e if i send the backup file to another system and there i want to restore the database,then how?
can u tell me how to get the help menu in sqlcmd command prompt..where i can get a list of commands in sqlcmd?
Post #823573
« Prev Topic | Next Topic »

12»»

Permissions Expand / Collapse