|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这章描述如何检查和处理在MySQL数据库中的数据损坏。如果你的表损坏很多,你应该尝试找出其原因!见G.1调试一个MySQL服务器。server
明天做sqlserver2000的一个实行,对照复杂的那种,新建数据库,修正日记文件的巨细等等吧,恩,应当仍是对照复杂的了。上面仍是纪录一下啦~都这么就没有来过了的。
/*
**CREABASE.SQL
**
**DropandRereatethecreditdatabase.Recordthetimerequired.
*/
PRINTBeginCREABASE.SQL
GO
USEmaster
SETnocountON
GO
IFdb_id(credit)ISNOTNULL
DROPDATABASEcredit
GO
CREATEDATABASE[credit]
ONPRIMARY(NAME=Ncredit_Data,
FILENAME=NC:ProgramFilesMicrosoftSQLServerMSSQLDatacredit_Data.MDF,
SIZE=50,
FILEGROWTH=10%)
LOGON(NAME=Ncredit_Log,
FILENAME=NC:ProgramFilesMicrosoftSQLServerMSSQLDatacredit_Log.LDF,
SIZE=1,
FILEGROWTH=10%)
GO
ALTERDATABASEcredit
ADDFILEGROUPCreditTablesFG
GO
ALTERDATABASEcredit
ADDFILEGROUPCreditIndexesFG
GO
ALTERDATABASEcredit
ADDFILE(
NAME=CreditTables,
FILENAME=C:ProgramFilesMicrosoftSQLServerMSSQLDataCreditTables.ndf,
SIZE=8MB,
MAXSIZE=UNLIMITED,
FILEGROWTH=50MB)
TOFILEGROUPCreditTablesFG
ALTERDATABASEcredit
ADDFILE(
NAME=CreditIndexes,
FILENAME=C:ProgramFilesMicrosoftSQLServerMSSQLDataCreditIndexes.ndf,
SIZE=8MB,
MAXSIZE=UNLIMITED,
FILEGROWTH=50MB)
TOFILEGROUPCreditIndexesFG
GO
PRINT
IFdb_id(credit)ISNOTNULL
PRINTCREATEDDATABASE"credit"
ELSE
PRINTCREATEDATABASE"credit"FAILED
PRINT
GO
/*
**ThisscriptsetsthedatabaserecoverymodeltoSIMPLE
**fortheClassNorthwinddatabase.SimpleRecoveryallows
**thedatabasetoberecoveredtothemostrecentbackup.
**
**Lookunderthestatuscolumnofyoursp_helpdbresultsto
**viewtherecoverymodelthathasbeensetforadatabase.
*/
USEClassNorthwind
ALTERDATABASEClassNorthwindSETRECOVERYSIMPLE
EXECsp_helpdbClassNorthwind
GO
/*
ThisscriptmodifiesthemaximumsizeoftheClassNorthwindtransactionlogfile
andincreasesitscurrentsize.
*/
USEmaster
GO
ALTERDATABASEClassNorthwind
MODIFYFILE(NAME=ClassNorthwind_Log,
MAXSIZE=50MB)
GO
ALTERDATABASEClassNorthwind
MODIFYFILE(NAME=ClassNorthwind_Log,
SIZE=25MB)
GO
ALTERDATABASEClassNorthwind
MODIFYFILE(NAME=ClassNorthwind_Log,
FILEGROWTH=20%)
GO
EXECsp_helpdbClassNorthwind
GO
提供多语言支持,常见的编码如中文的GB2312、BIG5,日文的Shift_JIS等都可以用作数据表名和数据列名。 |
|