How to "lose weight" on tempdb in SQL Server

SQL Server automatically creates a database named tempdb for use as a workspace, when you create a temporary table in a stored procedure, such as (Create TABLE #MyTemp), regardless of which database you are using, The SQL database engine will create

Backing up the restore SQL Server database in asp.net

In the Web, security is mainly embodied in two aspects: one is the program security, that is, to prevent the Web page in the insertion of malicious code, the other is database security, which we can often back up the database to achieve. In the

Examples of use of loops and conditional statements in SQL Server

--╔════════╗--===============================║if Statement Use example ║-- ╚════════╝declare @a int set @a=12 if @a>100 Begin print @a end ELSE begin print ' No ' end--╔══════════╗--========== The ==========

SQL Server automatically grows too big a problem

I. BACKGROUND The problems we encounter are shown in the following illustration: Automatic growth is growing in such proportions; (Figure1: Where the problem lies) If you try to modify the automatic growth value using SSMS, the following error

How to troubleshoot the SQL Server database "User, group, or role already exists

Problem scenarios When you migrate a SQL Server database, you need to re-create the user accounts on the previous database after you restore the database backup files on another server. When you create a logged-on user, you need to authorize the

SQL Server's substring (expression, start, length) function

Syntax for SUBSTRING: SUBSTRING (expression, start, length) Expression A string, binary string, text, image, column, or an expression that contains a column. Do not use an expression that contains aggregate functions. Start An integer or an

Talking about stored procedures and triggers for SQL Server

A. Stored procedures 1. Classification of stored procedures A stored procedure is a database object that is stored in a database and can be executed by an application through one call, and Allows users to declare variables, perform conditionally,

Getting Started with the execution engine in SQL Server

Brief introduction When the query optimizer (queries Optimizer) parses a T-SQL statement and selects the least-consumption execution plan from the execution plan, the specific execution is performed by the execution engine (Execution Engine). This

How SQL Server analyzes SQL performance by executing the plan

How do you know how efficient an SQL statement is, knowing only 3 of the following: 1. Analysis of disk activity (IO) information through SQL statement execution:set STATISTICS io on (open)/ set STATISTICS iooff (closed) 2. Time spent parsing,

Use of nested subqueries for SQL Server databases

Many SQL Server programmers are confused about the use of subqueries (subqueries), especially for nested subqueries (that is, a subquery that contains a subquery). Now, let's look at this question in the right way. There are two types of seed

SQL Server 2008 RC0 installation process three: installation configuration

After you have selected the components, the next step is to install the individual components. The first thing that needs to be configured is the service account. Choosing the right service account is very important, and if it is a local test

Recovery Interval in SQL Server

In fact, a lot of friends have asked recovery Interval, have asked this is why, have asked how to adjust this value, so write a small blog today, once and for all. As we all know, SQL Server relies on log to ensure performance and data persistence

SQL Server alternative notation for like statements

It is well known to mention like statements, for example, to find all users with "C" in their username, we can use the MyDatabase select * FROM table1 where username '%c% ' Here's another way to write the above function:use mydatabase select * from

Cross-Library synchronization through SQL SERVER triggers

Two servers with two SQL Server A, B A,B table Structure A,b the same A,b will do some insert,update,delete operation, require the data of AB to keep consistent (That is, a new data, request B also add, a change a piece of data, B also change the

Single-line and multiline comments for SQL Server

Environment: SQL Server 2008 R2 Question: The annotation usage in SQL Server is not clear. Solve: Single-line Comment:-- Multi-line Comment:/*......*/ Use examples: Single-line Comment: -The column ' Student.sname ' in the select list is

Magical SQL Server aggregate functions and subquery iteration summation

Let's take a look at the following table and the data: T_product Figure 1 The table has two fields: XH and Price, where XH is the primary index field, and now you have the following query results: Figure 2 As you can see from the query

SQL Server Backup History analysis

Problem Database backups occupy a very important place in the day-to-day tasks of the database administrator. This task is typically done through maintenance plans, regular SQL Server Agent jobs, or the execution of Third-party tools. Given the

SQL Server database Snapshot working principle

A database snapshot is a read-only copy of a database that is a map of all data in a database, and determines its content by the point at which the snapshot is executed. This article describes how to manipulate database snapshots through an instance.

SQL Server optimistic lock and pessimistic lock instance

This article uses an example to illustrate how optimistic locking and pessimistic locking can be used to solve a multiuser concurrency situation where other users have modified the data you want to modify to create inconsistencies in the data. In

Talking about using triggers in SQL Server database

This article explains the use of triggers, which is important to understand the inserted process. When an UPDATE statement is executed on a table that has a trigger defined, the original row (pre-image) is moved into the deleted table, and the

Total Pages: 923 1 .... 788 789 790 791 792 .... 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.