Click here to Skip to main content
15,917,005 members
Home / Discussions / Database
   

Database

 
Questionget value from Gridview Pin
sbao00411-Oct-06 23:32
sbao00411-Oct-06 23:32 
AnswerRe: get value from Gridview Pin
Jay_se12-Oct-06 1:11
Jay_se12-Oct-06 1:11 
GeneralRe: get value from Gridview Pin
sbao00412-Oct-06 2:29
sbao00412-Oct-06 2:29 
GeneralRe: get value from Gridview Pin
Jay_se12-Oct-06 21:26
Jay_se12-Oct-06 21:26 
QuestionHow do I link a variable to DefaultValue in dataset? Pin
dy1311-Oct-06 21:56
dy1311-Oct-06 21:56 
QuestionReporting Services 2005 issue Pin
rajaragothaman11-Oct-06 21:43
rajaragothaman11-Oct-06 21:43 
QuestionHow to create transaction log Pin
toink toink11-Oct-06 20:54
toink toink11-Oct-06 20:54 
AnswerRe: How to create transaction log Pin
Mike Dimmick12-Oct-06 5:51
Mike Dimmick12-Oct-06 5:51 
You back up a transaction log either through the Enterprise Manager (or Management Studio for SQL Server 2005) or using the BACKUP LOG statement.

The second question has no meaning for SQL Server - every database has at least one transaction log file, even in Simple recovery mode. The transaction log contains the information necessary to roll back to a particular point or, in the case of recovering from a failure, to roll forward to a particular point. SQL Server writes what it is going to do to the transaction log directly to the disk, then makes the modifications to the actual data pages in RAM. It can then write the changes to the data pages lazily, knowing that it can always recover the changes if there was a failure.

To support roll back, SQL Server records what was there before and what the new data is. If a transaction rolls back (either explicitly through a ROLLBACK TRANSACTION statement, or implicitly when a statement fails), SQL Server simply reads the 'before' image and applies it to the data pages.

If you're in Full recovery mode, the transaction log contains 'before' and 'after' images of every row that has been modified since you last backed up the log file. An INSERT has no 'before' image and a DELETE no 'after' image. TRUNCATE operations merely log that the truncation occurred, and I'm not sure that it's possible to undo them. If the database file becomes unusable, but the database is still attached to the server, I believe it is still possible to back up the transaction log; then, you can restore your last full database backup and restore all the transaction log backups in sequence to recover to the point of failure.

Bulk recovery mode is the same as full mode, but for BULK INSERT operations, SELECT INTO, CREATE INDEX and operations on text- and image-type columns, the server only records in the transaction logs which pages were affected by the change. When you make a transaction log backup, these pages are copied into the backup file. This does not allow rollback to a point in time, because only the latest versions of the bulk pages were stored. The data file must be available in order to back up the transaction log.

In Simple recovery mode, the log contains all the information that the Full model does, but it is automatically truncated on a checkpoint. Space occupied by transactions that had already committed becomes eligible for reuse. Long-running transactions can still cause the transaction log to grow in size.

Making a full backup of the database does not back up the transaction log (this is different from Exchange, which does). The space in the transaction log is only reused once it has been backed up. You should regularly back up the transaction log to stop it growing out of control.

If you only have an .mdf (data file) but not the corresponding .ldf (log file), you've got problems. There are ways to rebuild your database, and gain a log file, but they are not guaranteed to leave your database in a transactionally-consistent state. See here[^] for more details. You should restore a backup if you have one.

Stability. What an interesting concept. -- Chris Maunder

QuestionSQL Server 2005 BackUp Pin
dikshit0511-Oct-06 20:03
dikshit0511-Oct-06 20:03 
QuestionHow to backup data for sql server 2000 in sql server 2005? Pin
neo_605311-Oct-06 16:44
neo_605311-Oct-06 16:44 
QuestionStored Procedure Return Value HELP! Pin
Lisana11-Oct-06 6:25
Lisana11-Oct-06 6:25 
AnswerRe: Stored Procedure Return Value HELP! Pin
Private_Void11-Oct-06 7:47
Private_Void11-Oct-06 7:47 
Questionplz answer for this question Pin
Ravi Shankar4311-Oct-06 3:27
Ravi Shankar4311-Oct-06 3:27 
AnswerRe: plz answer for this question Pin
Colin Angus Mackay11-Oct-06 3:50
Colin Angus Mackay11-Oct-06 3:50 
QuestionDatabase Access help Pin
eric_tran11-Oct-06 3:01
eric_tran11-Oct-06 3:01 
AnswerRe: Database Access help Pin
Frank Kerrigan11-Oct-06 3:10
Frank Kerrigan11-Oct-06 3:10 
GeneralRe: Database Access help Pin
eric_tran11-Oct-06 3:24
eric_tran11-Oct-06 3:24 
QuestionSQL -Cursors Pin
si_6910-Oct-06 23:42
si_6910-Oct-06 23:42 
AnswerRe: SQL -Cursors Pin
Private_Void11-Oct-06 3:31
Private_Void11-Oct-06 3:31 
QuestionHow Can I Use Pivot (sql server 2005) Pin
hamidreza esmaeily10-Oct-06 22:07
hamidreza esmaeily10-Oct-06 22:07 
AnswerRe: How Can I Use Pivot (sql server 2005) Pin
Colin Angus Mackay11-Oct-06 3:02
Colin Angus Mackay11-Oct-06 3:02 
AnswerRe: some logic mistake...need [help]URGENT..help.. Pin
Frank Kerrigan11-Oct-06 2:53
Frank Kerrigan11-Oct-06 2:53 
Questiondatabase problem Pin
With_problem10-Oct-06 21:24
With_problem10-Oct-06 21:24 
QuestionHow do I connect ASP.NET page to Lotus notes to send a mail ? Pin
justprashant10-Oct-06 20:14
justprashant10-Oct-06 20:14 
AnswerRe: How do I connect ASP.NET page to Lotus notes to send a mail ? Pin
Frank Kerrigan11-Oct-06 2:54
Frank Kerrigan11-Oct-06 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.