Fast conditional deletion of massive data in SQL Server _mssql

If your hard disk space is small and you do not want to set the database log to be minimal (because you want other normal logs to still be logged), and high speed requirements, and clear all the data suggest you use Turncate table1, because truncate

[text] Three minutes learn SQL Server replication features _mssql

According to the network situation, may reach 10 seconds of delay, that is, the main database added, deleted, updated content, generally in 10 seconds can be synchronized to the standby database. Three-minute video operation demo at the bottom, don'

SQL Server 2000 database automatic backup Setup method _mssql

1. Open MS SQL Server Enterprise Manager, SQL Server Group-management-database maintenance plan -Right-click the new maintenance plan as shown below: Next: Select the database you want to back up Next: Continue to the next step: Next:

SQL Server database optimization analysis (graphic analysis) _mssql

The following are shown in the Illustrated form: First, SQL Profiler Event class Stored procedures\rpc:completed tsql\sql:batchcompleted Event-critical Fields Eventsequence, EventClass, SPID, DatabaseName, Error, StartTime, TextData, HostName,

How to use a random recordset in SQL Server _mssql

Today's article, I want to give you a brief description of how to set up random recordsets in SQL Server. SELECT * from Person.person -NEWID () go This introduces a new uniqueidentifier data type column, where SQL Server does a physical

SQL Server finds the file and filegroup implementation script based on the partition table name _mssql

SELECT Ps.name as Psname, Dds.destination_idas partitionnumber, fg.name as Filegroupname,fg.name, t.name , f.name as FileName from (((sys.tables as T INNER JOIN sys.indexes as I (t.object_id = i.object_id)) inner join

Use trigger to monitor stored procedures in SQL Server to change script instances _mssql

The following trigger are used to monitor changes to stored procedures.To create a monitoring table: CREATE TABLE auditstoredprocedures ( DatabaseName sysname , objectname sysname , LoginName sysname , ChangeDate datetime , eventtype sysname ,

SQL Server replication Features _mssql

But I think this feature is also useful for setting up a backup server or a test server. On a single machine to publish services, you can subscribe to other machines in the SQL, according to your release of different conditions, you can make a

SQL Server Database index collation statement, automatic collation of database indexes _mssql

In a large database, changes in data are very frequent. The indexes built on these data also need to be maintained frequently. Otherwise, these data indexes do not play a role. Can even become a burden on the database itself. We have to maintain the

SQL Server keyword detailed encyclopedia (text) _mssql

The following cross apply and outer apply keywords in SQL Server are presented as follows: 1.CROSS Apply and outer apply The MSDN explanation is as follows (personal understanding is not very clear): Use the APPLY operator to call a table-valued

A quick way to count each table row in SQL Server _mssql

We all know the number of rows that can be counted with the aggregate function count (). The count () function must generate a dynamic SQL statement for each table and execute it to get results if you need to count the number of rows per table for

SQL Server database service startup shutdown batch _dos/bat

Copy Code code as follows: @echo off set/p choi= Start the database, stop the database [B,e]? if/i%choi% equ b goto beginserver if/i%choi% equ e goto endserver : Beginserver NET start MSSQLServer Goto END1 : Endserver net stop

SQL Server EventData () function to get DDL trigger information _mssql

Copy Code code as follows: --Create a log table CREATE TABLE triggerlog (loginfo XML) --Create a dummy table to delete later on CREATE TABLE tabletodelete (Id int PRIMARY KEY) --Create a new table as a delete test table INSERT into

SQL Server Top statement parameterization method _mssql

DECLARE @TopCount intSet @TopCount = 100Select Top (@TopCount) * from AdventureWorks.HumanResources.EmployeeIf you have like words, be sure to spell SQL, you should also use sp_executesql to perform, examples are as follows:DECLARE @TopCount

SQL Server Common paging stored procedure _mssql

Copy Code code as follows: Create proc Commonpagination @columns varchar (500),--column names to display, separated by commas @tableName varchar (100)--Name of the table to query @orderColumnName varchar (100),--sorted column names @order

Forgotten SQL Server comparison operator predicate _mssql

The official Reference Document Http://technet.microsoft.com/zh-cn/library/ms187074%28SQL.90%29.aspx They work between comparison operators and subqueries, similar to exists, not exists, in, and not, and other logical meanings, which are also

Recursive call sample for stored procedures in SQL Server _mssql

Recursion refers to the case where the code fragment calls itself; the danger is that if you call itself once, then how to prevent him from repeatedly calling itself. This means providing a recursive test to ensure that the appropriate time to jump

System view in SQL Server details _mssql

Originally wanted this series to write something good, then think of everyone as a programmer, use the most is the database, but in fact many like me to work in the first line of the code farmers, a little knowledge of SQL, do not talk about

Novice SQL Server database DBA need to pay attention to some small details _mssql

Preface: Any optimization and modification are based on the business situation as a prerequisite, may have written wrong or inaccurate place, welcome you to shoot bricks. 1. When creating DB, the growth proposal is set to increase in MB (M), the

Tips for detecting whether a SQL Server database can be connected _mssql

Sometimes it may be necessary to detect the service of a certain machine is not up, or whether a library of a machine can be connected and can not open SSMs also do not want to log on to the server can use this method. 1. Right-click on the desktop

Total Pages: 923 1 .... 793 794 795 796 797 .... 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.