SQL Server Recovery process

During the recovery process, only those changes that have occurred since the last checkpoint are parsed to determine if a redo or revocation is required.Actions done before the last checkpoint are accurately reflected in the data file, and the

SQL Server detach and attach Database

Pre-Preparation:Create a databaseCreate DATABASE StudioOn primary(name = ' Studio ', filename = ' E:\Studio.mdf '),Filegroup FG2(name = ' Studio_fg2_file_1 ', filename= ' E:\Studio_FG2_file_1.ndf ')Log on(Name= ' Studio_log ', filename= '

SQL Server Database status options

Option 1,Single_user (single user), Multi_user (multi-user), Restricted_user (limited user);Describes the user access properties of the database, which are mutually exclusive, and setting any of these options cancels the setting of the other

SQL Server Cascade Delete

The CNAME foreign key in the T_student table is constrained to the CNAME in the T_class tableYou cannot directly delete records in the T_class table:1 Delete from where cname='CR19'Because the T_student table uses the data from the T_class tableSo

SQL Server uses CTE recursive queries

1. Data Environment Preparation Refer to the Oracle recursive query article. 2. Querying all child nodes under a node With CTE (ID,NAME,PARENT_ID) as ( Selectid,name,parent_id fromSc_districtwhereName='Bazhong'Union

SQL Server file Stream file group

Background:File streams integrate the database engine with NTFS files by storing BLOB data files on the file system, using T-SQL and Win32 to access data.File streams use Windows systems to cache data, helping to reduce the potential impact of file

Simple use of SQL Server stored procedures

--create a stored procedureCreate procTest_proc@date datetime as Select * fromT_userwhere TimesbetweenConvert(datetime,CONVERT(varchar(Ten),DATEPART(YYYY,@date))+ '-' + CONVERT(varchar(Ten),DATEPART(MM,@date))+ '-' +

SQL Server creates a full-text index

Background knowledge:Full-text Catalogs are full-text indexes that are containers, so full-text catalogs are available before you create full-text indexes.The first step:To create a full-text catalog:Create fulltext Catalog Catalog_name[On Filegroup_

SQL Server Blog Directory

SQL Server Blog directory 1 SQL Server database Learning 2 GUID globally unique identifier 3 SQL Server Profiler using method 4 SQL Server data encryption and decryption 5 SQL injection Attack 6 SQL Server basic operations accumulated 7 Tra

Memory classification for SQL Server

First Class,According to the method of application:Commit TypeIt refers to the amount of space that the reserve applies for a chunk before it is submitted by commit. This way the application to the space can be enabled AWE!Stolen typecorrespond to

SQL Server 1 ways to proactively prevent blocking

Method 1,Set LOCK_TIMEOUT 5000; This setting timeout is 5 seconds;Example:Connection ABEGIN TranUPDATE dbo. TestTableSet String = ' AAA 'where id=1;GoConnection bUPDATE dbo. TestTableSet String = ' BBB 'where id=1;GoYou can see that you are not

2 methods for SQL Server blocking exclusions

Background knowledge:What caused the blockage?From the point of view of the lock, be sure to lock the object before you can access it whether you are reading or writing, if User A is to be held by the object, a to lock on the object, if BYou also

8 Types of SQL Server locks

The 1th kind,Shared locks, generated by read lookups.The 2nd kind,Intent locks, with intent locks, indicate the intention to acquire a resource.The 3rd kind,Update the lock and get it before modifying the data.The 4th kind,Exclusive lock, which is

No equals equals in SQL Server 2005, the master skips by itself.

Set ANSI_NULLS onSET QUOTED_IDENTIFIER ONGoALTER TRIGGER [Qiandaotrigger]on [dbo]. [Bbsqiandao]After insertAsBEGIN--set NOCOUNT on;declare @uid int, @count int;Select @uid =uid from insertedSelect @count =count (*) from inserted where [email

What SQL Server DBCC CHECKDB did.

The first step:After reading the system metadata and reading the data, DBCC CHECKDB knows what kind of database it is going to detect, and if there is an error in this step, DBCC will make a direct error.And will not run anymore.Step Two:The DBCC

4 ways SQL Server creates an index

Pre-Preparation:CREATE TABLE Employee (ID int NOT null primary key,Name nvarchar (4),credit_card_id varbinary (max)); ---Be careful with this data type.GoDescription: The index on this table will be deleted before the next index is created.----------

8 factors that SQL Server affects DBCC CHECKDB

The first type:The size of the database.The second type:The speed of the IO system.The third type:The current CPU load.The fourth type:The higher the concurrent modification of the current database, the greater the cost of maintaining the database

2 ways SQL Server views Database space allocation

Method 1, Sys.dm_db_file_space_usage.Method 2, Sys.dm_db_session_space_usage.--------------------------------------------------------------------------------------------------------------- -----------------------------------------------Method

SQL Server Objects

First item: Renaming an ObjectExecute sp_rename @objname = ' Nums ', @newname = ' Numbers ', @objtype = ' object ';GoBe especially careful here @newname this parameter does not take a schema such as: @newname = ' dbo. Numbers ' This is not good, the

SQL Server remote Backup and recovery

SQL Server Service Instance name: 192.168.0.2Name of database to be backed up: aBackup machine name (client side): 192.168.0.3Backup machine User: ZF Password: 123Backup machine domain name: domainfolder where the backup machine provides backup

Total Pages: 923 1 .... 687 688 689 690 691 .... 923 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.