Fixing a Munged Log in Sybase?
Submitted by: AdministratorSybase Technical Support states that this is extremely dangerous as it "jacks up the value of the timestamp" which is used for recovery purposes. This may cause potential database corruption if the system fails while the timestamp rolls over.
In 4.9.2, you could only run the dbcc rebuild_log command once and after that you would have to use bcp to rebuild the database
In System 10, you can run this command about 10 times.
In System 11 I (Pablo, previous editor) tried it about 20 times and no problem.
1. use master
2. go
1. select count(*) from your_database..syslogs
2. go
-----------
some number
1. sp_configure "allow updates",1
2. go
1. reconfigure with override /* for system 10 and below only*/
2. go
1. begin tran
2. go
/* Save the following status to be used later... */
1. select saved_status=status from sysdatabases where name = "your_database"
2. go
1. update sysdatabases set status = -32768 where name = "your_database"
2. go
1. commit tran
2. go
1. shutdown
2. go
Submitted by: Administrator
In 4.9.2, you could only run the dbcc rebuild_log command once and after that you would have to use bcp to rebuild the database
In System 10, you can run this command about 10 times.
In System 11 I (Pablo, previous editor) tried it about 20 times and no problem.
1. use master
2. go
1. select count(*) from your_database..syslogs
2. go
-----------
some number
1. sp_configure "allow updates",1
2. go
1. reconfigure with override /* for system 10 and below only*/
2. go
1. begin tran
2. go
/* Save the following status to be used later... */
1. select saved_status=status from sysdatabases where name = "your_database"
2. go
1. update sysdatabases set status = -32768 where name = "your_database"
2. go
1. commit tran
2. go
1. shutdown
2. go
Submitted by: Administrator
Read Online Sybase Job Interview Questions And Answers
Top Sybase Questions
☺ | What is a Coalesce? What is the equivalent of Oracle/Db2 Coalesce Function in Sybase? |
☺ | How to pad with leading zeros an int or smallint in Sybase? |
☺ | Explain about the features of Sybase IQ? |
☺ | How can I execute dynamic SQL with ASE in Sybase? |
☺ | Explain about Power Designer Data modeling software? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |