BACKUP
i need start backing databases. past debug stage , filled data value. far have been copying whole directory external hdd (usb connection) never restored backup. databases simple: no web connections, there 1 client: c# application , remain long time. databases may grow in size considerably, however.
i looked backup command. have following questions:
(1) wrong doing way i've done far: copying directory?
(2) found post glen wilson @ http://forums.microsoft.com/msdn/showpost.aspx?postid=487447&siteid=1 offers c# code database backup. next question is:
i not find class using: backupdeviceitem in msdn vs2005. how can try code if class found?
thanks.
sql server keeps lock on it's files while they're attached, may error trying copy them.
additionally, if copy file while transaction in process, you'll file incomplete transaction. take cannonical example of moving $100 savings checking; transaction consists of 2 parts, withdrawl savings , deposit checking. happens if make copy of file after withdrawl before deposit? database corrupts, put copy back, represents withdrawl, lost $100.
the whole point of transactional database ensure doesn't happen. blind file copy excludes mechanism.
mike
SQL Server > SQL Server Express
Comments
Post a Comment