Search:
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




After Work

Highlife Adventures
The best club in Chicago
for Chicago Singles is Highlife Adventures!


Jersey Girl Shirts
Are you looking for a
Jersey Girl T-Shirt ?



Kyoto Sushi
in Chicago, on Lincoln Ave.
Moody's Pub
in Chicago, has great burgers
Skylark
in Chicago, on Halsted .. excellent Friday fish fry!


Sybase » Administration » DBA » Corruption

DBCC Notes

     



DBCCs should be run on a regular basis to check for allocation errors, which occur due
to hardware issues (in most cases). For 24x7 needs, DBCCs can be run on a separate server
that is loaded from a current database dump.




Here is a script which will perform the basic DBCC functions


use master
go
sp_dboption invoice_db,'single user', true
go
use invoice_db
go
checkpoint
go



use invoice_db
go
select db_name()
go
checkpoint
go
dbcc checkdb
go
dbcc checkalloc
go
dbcc checkcatalog
go


use master
go
sp_dboption invoice_db,'single user',false
go
use invoice_db
go
checkpoint
go







Table or index allocation errors can be fixed by simply dropping the object and recreating
it (using BCP as needed). See below for other repair methods.








Here is a script which will fix many table allocation errors


use invoice_db
go
dbcc tablealloc(tablename, full, fix)
go




Here is a script which will fix most page allocation errors


use master
go
sp_dboption invoice_db,'single user', true
go
use invoice_db
go
checkpoint
go



use invoice_db
go
select db_name()
go
checkpoint
go
dbcc checkalloc(invoice_db,fix)
go


use master
go
sp_dboption invoice_db,'single user',false
go
use invoice_db
go
checkpoint
go














Sybase : Related Topics

Sybase : Administration : Post-installation check
Sybase : Administration : Device initialization
Sybase : Administration : Database Creation
Sybase : Administration : A backup routine
Sybase : Administration : Striping Dump Devices
Sybase : Administration : Moving the transaction log to another device
Sybase : Administration : Adding a segment to a database
Sybase : Administration : Configuring the cache
Sybase : Administration : Apply multiple transaction dumps
Sybase : Administration : Database maintenance procedure
Sybase : Administration : Database maintenance script
Sybase : Administration : Server configuration
Sybase : Administration : Dealing with a Corrupted Database
Sybase : Administration : Dealing with a Server Failure
Sybase : Administration : Create proxy tables and external logins
Sybase : Administration : Renaming a database
Sybase : Administration : Reorg: rebuilding a table
Sybase : Administration : Sybase ASE 15 Enhancements
Sybase : Administration : Setting the thresholds
Sybase : Administration : Apply a transaction dump
Sybase : Administration : Security Tasks
Sybase : Administration : Setting Process Priorities
Sybase : Administration : Sybase ASE Architecture Overview
Sybase : Administration : Drop an alias, with objects linked to login
Sybase : Administration : Display grants, effective rights to objects
Sybase : Administration : Displaying access information from sysprotects
Sybase : Administration : Database Engines: Status and Settings

Sybase Web Site
Sybase Mobile Web Site
Oracle Web Site





Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2008 Citisoft Inc All Rights Reserved.