Use the SQL Server Event Viewer (activity monitor) to view executed SQL statements

For example, I would like to share with his family a tips that are commonly used in development. During the development process, ourProgramIf something goes wrong, we may doubt the SQL script we execute. How can we check this SQL script? Some people

SQL Server trigger update method to determine whether a column is updated

Every one know's that: in the trigger, I may be changed because of the value of a field. I will trigger this trigger. OK. We will write if Update (column1) this statement is OK, but you need to know that it is based on your SQL statement. That is to

SQL Server trigger example

Trigger exampleCodeWhen the monitoring data exceeds the set warning value based on real-time data, insert the data into the abnormal data table. Use [mointor] Go/****** object: trigger [DBO]. [realtimedata_trg] script Date: 08/15/2013 13:20:55 **

Use distributed query to query excel in SQL Server

1. Enable 'ad hoc distributed queries 'in SQL Server 2008 r2' Exec sp_configure 'show advanced options', 1 go reconfigure go exec sp_configure 'ad hoc distributed queries ', 1 go reconfigure go 2. Use the OpenDataSource or OpenRowSet function to

View the current number of connections of the SQL Server database

1. Number of connections to the query database Use masterselect * From DBO. sysprocesses where dbid in (select dbid from sysdatabases where name = 'dbname ') Dbname indicates the name of the database to be queried, and the number of records is

Go to: SQL statements under Microsoft SQL Server worth adding to the Favorites list

 I. Basics 1. Description: Create a databaseCreate Database database-name2. Description: delete a database.Drop database dbname3. Description: Back up SQL Server--- Create a device for the backup dataUse masterExec sp_addumpdevice 'disk', 'testback',

What is the difference between char varchar nchar nvarchar (Why does SQL server automatically add spaces at the end of the string)

Based on the low carbon principle, several variables are declared as nchar. The result shows that there is a large string of spaces on the tail each time. in C #, trim has to be hard-working and error-prone for many times. When I check the Internet,

SQL Server interview questions for a foreign company

Question 1:Can you use a batch SQL or store procedure to calculating the Number of Days in a MonthAnswer 1:Select datepart (dd, dateadd (dd,-1, dateadd (mm, 1, cast (year (getdate () as varchar) + '-' + cast (month (getdate () as varchar) + '-01' as

SQL Server is Missing NextVal Functionality

Someone asked me a question yesterday: How can I find the next value for the auto-increment column in SQL Server, which is equivalent to the nextval sequence in Oracle? It seems that there is no good way, just like this: Select @ identity + ident_

SQL Server splits strings to simulate arrays.

Arrays are a convenient data structure, but they are not supported in SQL server. Therefore, it is inconvenient to compile the storage process, we can connect multiple strings with specific connection characters as parameters and separate them as

In SQL Server, users can only access the specified stored procedure.

In SQL Server, users can only access the specified stored procedure.In addition to ticket sales at the station, there is a passenger ticket sales system that allows external units to sell tickets through Internet or leased lines. To this end, we

Several key tips on SQL Server CLUSTERS

Overview: Run SQL Server on the Cluster Hardware and software requirements Add a node to a cluster Cost-saving methods   Server clusters allow you to connect many physical servers (or nodes) as

Two Methods for querying by page on SQL Server

Two Methods of SQL Server paging query Abstract: SQL Server paging query is frequently used. The following describes how to implement two methods of SQL Server paging query, if you are interested in this, take a look. Two Methods of querying by

JSP uses SQL Server Stored Procedures

This time, I went to Beijing to attend XCon, China Information Security Focus conference, and transferred to Seoul on the way. There are 4 computers in the business class lounge in Seoul to provide Internet services. I have seen many people view

SQL SERVER SERVICE BROKER-QUEUE Retention

It is also important to specify a retention when creating a queue .. 1. If retention = on. Then, even if the message is receive, it will remain in the queue until the conversation is ended Alter queue [DBO]. [targetqueue] with status = on,

SQL Server Management studio-use query menu

In a T-SQL script, connect to different SQL Server databases without manual connection and frequent switching of SQL Server   The following are network instances:What is the T-SQL syntax to connect to another SQL server? If I need to copy a stored

SQL Server foreign key point record

When you need to crack the foreign key constraint, you need to know the foreign key name. Two attempts in SQL server 2005 can be used: a) sys. foreign_key_columns B) sys. foreign_keys Query the foreign key in the current database using SQL and

SQL Server Installation problem program suspended error Solution

When installing SQL Server, the installation program prompts me that the installation program has been suspended and asked me to restart the computer, but even if I restarted the installation, the installation program of SQL Server2000 still prompts

SQL server Installation experience

1. If your serial number cannot be verified or is invalid when you download SQL server 2000 in windows2003, check whether the following services are in normal status if you have changed multiple serial numbers. Application Experience Lookup Service

Procedure for connecting to the ms SQL Server database (pubs) using ADO

Procedure for connecting to the ms SQL Server database (pubs) using ADO1: ADO inherits ole db, while ole db is compiled based on com technology. So ADO itself is also a COM component. 2: Create a basic dialog boxIn stdafx. h// Import the dynamic

Total Pages: 923 1 .... 756 757 758 759 760 .... 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.