Database Log Files
Shrink database logs in simple recovery mode. The size unit of @ database_name_log after the contraction is M.
Backup log @ database_name with no_log
Dbcc shrinkfile (@ database_name_log, 5)
12. How to analyze SQL Server SQL statements:
Set statistics time {on | off}
Set statistics io {on | off}
Dis
Many staff members are still using SQL SEVER for a variety of reasons, and the SQL database can be damaged to varying degrees, which greatly affects employees ' normal work. The loss of data can also cause huge losses to the company. This article provides additional information about the causes and workarounds of SQL
UPDATE sysdatabases SET STATUS =32768 WHERE name= ' suspect database name ' Go
sp_dboption ' suspect database name ', ' Single user ', ' true ' Go
DBCC CHECKDB (' Suspect database name ' Go
update sysdatabases set status =28
test_data.mdf.D. Start the database server. The database test status is "Suspect ". At this time, you cannot perform any * operation on this database.E. Set the database to allow direct * as a system table. You can select the database Server in
main file deleted or removed, and then the database to restore the main file to cut the past, so you can save time. )
3, start the database service, the database becomes suspect or suspicious state. Then run in Query Analyzer:ALTER DATABASE name set emergency with no log f
SQL Server 2000 database LDF is damaged. Only the restoration of SQL Server 2000 database files by MDF is often damaged. Can I fix database errors? The answer is yes. This log uses an SQL Server 2000
Category:
DB database website Optimization
109 reading comments (0)
Favorites
Report
Directory (?) [+]
2. Memory bottleneck of SQL database
When memory is insufficient
Suspected Memory leakage
CPU bottleneck
Performance problems encountered
How to locate these performance problems
I. SQL
create a database for recovery (such as test ). It can be created in SQL Server Enterprise Manager.B. Stop the database server.C. Delete the log file test_log.ldf of the database you just generated, and overwrite the generated database data file test_data.mdf with the MDF f
. How to analyze SQL Server SQL statements:Set statistics time {on | off}Set statistics io {on | off}Display query execution plan in graphical modeIn the query analyzer-> query-> display estimated evaluation plan (D)-Ctrl-L or click the graph in the toolbarDisplay query execution plan in text modeSet showplan_all {on | off}Set showplan_text {on | off}Set statistics profile {on | off}13. When an inconsistenc
.
However, if your database files are copied from other computers, the above method may not work. You may get an error message similar to the following.
Server: Message 1813, level 16, status 2, Row 1
Failed to open the new database 'test '. Create database will be terminated.
Device activation error. The physical file name 'd:/test_log.ldf' may be incorrect.
Wh
it is disabled at this time, the SQL Server will record the data in the transaction log during the next startup, rewrite the old data in the disk as follows:
1. redo
2. Roll back and undo/rollback
The above objective is to ensure Database Consistency.
If a problem occurs in the above process, it will go to the following status:
Recovery pending (PENDING restoration ):
This process suspends the data recover
Tags: database attach data diskFault DescriptionIn this case, a server store of a brand r520 model with a SQL Server database is included, and this storage contains two sets of disk arrays, with RAID levels of RAID5. Under normal circumstances, the user's SQL Server database
be incorrect.You have created a project named
'
C: \ Program Files \ Microsoft SQL Server \ MSSQL \ data \ test_log.ldf
'
.However, if your database files are copied from other computers, the above method may not work. You may get an error message similar to the following.Server: Message
1813
, Level
16
, Status
2
, Line
1
Failed to open new data
Emergency Repair mode with the following statement:
Update sysdatabases set status=-32768 where dbid=db_id (' MHDYF2005 ')
You can see in SQL Server Enterprise Manager that the database is in "read only \ suspect \ offline \ Emergency mode" to see the tables inside the database
.
RECOVERING: RECOVERING the database. The restoration process is a temporary state. After the restoration is successful, the database is automatically online. If the recovery fails, the database is in a suspicious state. The database is unavailable.
Recovery pending: the SQL
Access
The operation is very simple, the specific steps are as follows: Open your MDB database, tools--> Database Utilities--> compression and Repair Database (c) ...
SQL SERVER
In general, the contraction of the SQL
What about SQL database corruption? Teach you the data recovery contingency plan Recent period of time, Jinan with Yue technology receive a lot of customer inquiriesSQL database corruption ,additional database error problems, here to tidy up a few of the common sqlsever DatabaseFailure PhenomenaandPrecautions . curre
Problem background:
When you work with a SQL Server 2005 relational database on a day-to-day basis, there are times when the database, such as the SharePoint site metabase name Sharepoint_config, is not functioning as if the database stopped the database for no reason, res
First, the main database appears suspicious repair method:The first method:When this operation failure occurs in the database, you can do this by following the steps below, open the SQL Query Editor window in the database and run the following command:Modify the
Label:First we should know that the database is always in a specific state, the following first to understand the database of the common three states:1, offline: we can see the database in Microsoft SQL Server management, but there is an "offline" word next to the database n
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.