SQL Server dba daily Check Common Sql_mssql

1. Database Copy Code code as follows: --Size of all databases EXEC sp_helpdb --Status of all databases Select Name, User_access_desc,--User access mode STATE_DESC,--database state Recovery_model_desc,--Recovery model

6 Custom Function shares commonly used in SQL Server _mssql

In the daily application, often according to the actual requirements of the input of some values, and these values can not be used directly, so in SQL often on the field value of some conventional processing. Collected here (extract the number,

SQL Server extracts a number, extracts English, extracts Chinese SQL statements _mssql

--sql Determine if the field value has a Chinese create function fun_getcn (@str nvarchar (4000)) returns nvarchar (4000) as BEGIN declare @word NCHAR (1), @CN nvarchar (4000) Set @CN = ' while Len (@str) >0 begin set @word =left (@str, 1) if

Solution to the problem of bigint int with symbolic times error in SQL Server _mssql

One requirement is to store multiple states in a cloud-monitored state value (including various exceptions, warning states that can exist simultaneously) using a bitwise operation mechanism to store in an int. Now the monitoring log data is very

SQL Server compares two-table columns _mssql

I. ProblemsGives two tables with forty or fifty columns and finds the same columns and different columns Second, query two table columns, there is a temporary table --#a, #b都是临时表, automatically deleted after the current connection is disconnected--

SQL Server Index maintenance SQL statement _mssql

Use the following script to view the size of the database index fragmentation: Copy Code code as follows: DBCC showcontig with FAST, Tableresults, All_indexes, no_infomsgs The following scripts are used to process maintenance

SQL Server converts query results to JSON format script sharing _mssql

Script Source: Copy Code code as follows: SET ANSI_NULLS on Go SET QUOTED_IDENTIFIER ON Go CREATE Procedure[dbo]. [Serializejson] ( @ParameterSQL as VARCHAR (MAX) ) As BEGIN DECLARE @SQL NVARCHAR (MAX) DECLARE @XMLString

SQL Server normal user run error resolution supplemental _win servers

In the Tutorial Windows2003 Server installation and Setup Tutorial--mssql Security Chapter One (with MS SQL Server running under ordinary users), the author said 11th step "after setting the permissions on the directory, you need to set the running

The principle of the log mechanism of tempdb in SQL Server and example sharing _mssql

Test Cases We create similar objects in the user database (testpage), tempdb, T1, #t1, create a non temp table in tempdb, then execute the corresponding insert script (to produce the log), and record the execution time for comparison to describe

SQL Server Paging query Common stored procedure (only for paging queries) _mssql

The has been used since the start of the project. The original of this stored procedure (SORRY, forget the name), write this section of the SQL code is very good, I on this basis, according to my habits and thinking mode, adjusted the code, only to

A stored procedure that queries SQL Server database deadlock sharing _mssql

Using SQL Server as a database application system, can not avoid the sometimes deadlock, deadlock, maintenance personnel or developers will only through the sp_who to find the deadlock process, and then kill with Sp_kill. Using Sp_who_lock, this

To run the MS SQL Server database in a normal user (independent user) state setting method End _mssql

Looked at the cloud Habitat Community online Many articles, sorted out the following steps, basically can be said to be the end of the solution, here to the detailed collation, hoping to help the updated friends, so that our server more secure.

SQL Server triggers create, delete, modify, view sample code _mssql

One: A trigger is a special stored procedure that cannot be invoked explicitly, but is automatically activated when you insert records into a table ﹑ update records or delete records. So triggers can be used to implement complex integrity

Teach you easy to learn SQL Server record shift skills _mssql

Example: The company staff to take three shift system: 0:00 to the morning 8:00 for the first class, 8:00 to 4:00 for the second shift, 4:00 to the evening 12:00 for the third class. The employee signs with an electronic clock that automatically

MS SQL Server database cleanup error logging method _mssql

SQL error log records the database running process encountered a variety of problems and some important information, as a problem, we usually do not take the initiative to clean up these log files, only every time the server restart, SQL will

SQL Server retrieves the method of Enterprise Manager _mssql

Open SQL Server Enterprise Manager, and suddenly a window pops up, which reads: Error Tip: The Microsoft Management Console ————————— MMC cannot open file C:Program filesmicrosoft sql Server80toolsbinnsql Server Enterprise manager.msc. This may

SQL Server Database Syntax encyclopedia _mssql

--Data manipulation SELECT-Retrieving data rows and columns from database tables INSERT-Adding new data rows to a database table Delete-deleting data rows from a database table UPDATE- Update data in a database table --Data definition CREATE

A summary of high performance optimizations for SQL Server databases _mssql

This article is to introduce you to the correct optimization of the SQL Server database experience, including in the actual operation of its optimization should be noted in the local description, as well as the most basic principles of the

Steps for SQL Server to manually implement differential backups _mssql

Steps to manually implement differential backups Character type: 1. Restore the current libraryALTER DATABASE Current library set RECOVERY full-- 2, the construction table cmd; Create table cmd (a image)-- 3, back up the current library to

SQL Server gets an instance of the stored procedure return value _mssql

1.OUPUT parameter return value Copy Code code as follows: CREATE PROCEDURE [dbo]. [Nb_order_insert] ( @o_buyerid int, @o_id bigint OUTPUT ) As BEGIN SET NOCOUNT on; BEGIN INSERT into [order] (O_buyerid) VALUES

Total Pages: 923 1 .... 384 385 386 387 388 .... 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.