SQL Server Common functions

1. String functions:len (expression) returns the number of characters (not bytes) of the given string expression, with no trailing spaces. DATALENGTH (char_expr) returns a string that contains the number of characters but does not contain the

"SQL Server" query maintenance related logs

1. View job History Select TOP [instance_id], [ job_id] , [step_id] , [step_name] , [sql_message_id] , [Sql_severity] , [message] , [run_status] , [run_date] , [run_time] , [run_duration] , [

SQL Server-master database Corruption resolution summary

After the SQL Server primary database is damaged, the SQL Server service fails to start, viewing the error log, and you see the following error message: ' master '. 2015-10-27 10:15:23.01 spid6s Error: 9003, severity: 20, State: 1. inch '

Introduction to the CONVERT () function of SQL Server

Definition and Usage:The CONVERT () function is a general function that converts a date to a new data type.The CONVERT () function can display date/time data in different formats.Grammar:CONVERT (data_type (length),

SQL Server attaches a database file without a log file to the servers

Today made a very annoying thing, accidentally put a 40 more g of the database log files deleted, and before the deletion I made a log in, dead or alive can not attach to the server has been prompted multiple logs cannot be automatically created,

Several methods of SQL Server Traversal table

In the database development process, we often encounter the situation to traverse the data table, a reference to traverse the table, our first impression may think of the use of cursors, although the use of cursors is intuitive, but it does not

SQL statement that SQL Server is executing

SELECT [Spid] =session_id, Ecid,[Database] = db_name(sp.dbid),[User] =Nt_username,[Status] =er. STATUS,[Wait] =Wait_type,[individual Query] = SUBSTRING(QT.TEXT, Er.statement_start_offset/ 2, ( Case

SQL Server Minimized log operation parsing, application [manuscript]

Some of the operations of databases in SQL Server in Bulk_logged/simple mode take the form of minimizing log logging to reduce the amount of Tran log disk logs to improve overall performance.Here I'll briefly describe which operations will minimize

Introduction to SQL Server logical query processing phase

Introduction to the Logical query processing phase From : performs a cartesian product (Cartesian product) (cross join) on the first two tables in the FROM clause, generating a virtual table VT1 On : apply an on filter to VT1. Only those rows

The SQL Server lookup field contains Chinese characters

/***************************************************************%%Percent percent Description: whether the SQL statement query field contains percent of Chinese characters****************************************************************Percent write:[

Queries about recursion in SQL Server database are used

Metric Rapid Development Platform database supports SQL Server database, the way that we used to use the Oracle recursive query with the start with dept_id=1000 connect by prior dept_id=upper_id.For example, our organization has a lot of subordinate

SQL Server Replication Optimizations

A replication system has been set up to search the business, adding some special features to the business, and the read library pressure increases, resulting in replication delays. Optimizations are made in a variety of ways, one of which is to

SQL Server Common Performance diagnostic statements

/* General server dynamic management objects include: dm_db_*: Database and Database object dm_exec_*: Execute user code and associated connection dm_os_*: Memory, lock, and schedule dm_tran_*: Transactions and isolation dm_io_*: input/output */-for

SQL Server Trigger

1 --====================================2 --Create Database Trigger template3 --====================================4 Use [easyjobextest]5 GO6 7 --determine if a trigger exists, delete it8 IF EXISTS(9 Select Top 1T.name asTrigger_name,a.name

Summary of SQL Server usage issues

1.datetime,smalldatetime,date difference 1) datetimeDate and time data from January 1, 1753 to December 31, 9999, with an accuracy of 3% seconds (equal to 3.33 milliseconds or 0.00333 seconds). Adjust the values to. 000,. 003, or. 007 seconds

SQL Server Stored Procedures

A stored procedure in Transact-SQL, very similar to a method in the Java language, can be called repeatedly. After the stored procedure executes once, the statement can be cached so that the statements in the cache are used directly at the next

Mysql_dev about SQL Server-side understanding

Recommended books: MySQL must know, head first SQLViewA view is a virtual table, unlike a table that contains data, and the view contains only queries that retrieve data dynamically when they are used, and do not contain any data on their ownWhy use

SQL Server access to remote servers

SELECT * from Sys.servers;EXEC sp_helpserverexec sp_droplinkedsrvlogin dbvip,null--Deleting mappings (mapping to remote logins on linked servers) exec sp_dropserver DBVIP EX EC sp_addlinkedserver @server = ' DBVIP ',--the server alias being accessed

Commonly used string functions in SQL Server

len (expression) returns the number of characters (not bytes) of the given string expression, with no trailing spaces. DATALENGTH (char_expr) returns a string that contains the number of characters but does not contain the following spacesLength

SQL Server Tuning----index missing

SELECTMig.index_group_handle, Mid.index_handle,CONVERT (Decimal (28,1),Migs.avg_total_user_cost * Migs.avg_user_impact * (Migs.user_seeks + Migs.user_scans)) as Improvement_measure,' CREATE index idx_ ' + object_name (object_id,database_id) + '

Total Pages: 923 1 .... 606 607 608 609 610 .... 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.