1. exclusive lockWrite in an SQL connection as follows:Begin tran-- Select * From A with (updlock)Update a set [name] = 'wq' where [ID] = 2 -- the set value here cannot be the same (that is, it cannot be originally name = 'wq' and set name = 'wq' ),
During project implementation, users often need to provide an Excel template, allow users to enter a basic data (such as department staff data, online exam question library, and device information) in EXCEL according to their actual conditions ),
An error is reported in the newly installed transaction replication environment one day.
After several twists and turns, you can find the following solutions:
The configuration is invalid many times. After careful consideration, it turns out
1. Prerequisites: The DSN name must be set in the local ODBC, and ODBC must pass the test!
You can use the following methods to set ODBC:
(1) standalone edition: when creating a new odbc dsn, use SQL Server for the selected data source;
(2)
A small amount of data is exported to SQL statements, making it easier to use. The SQL Server Import and Export function is used for a large amount of data.
I have used several methods (still using Google to search ......) :
1.Directly use stored
If you check whether the version number of SQL Server 2000 has been patched with sp4, You can query it in the following ways:
Select @ VERSIONTransact-SQL reference@ VERSIONReturns the date, version, and processor type currently installed by
SQL clearing Data Tables
Truncate table [tablename]
SQL reset primary key Seed
Dbcc checkident ([tbname], reseed, 0)
SQL Server network backup
To back up a database on the network to a local machine, you can use the following method:
SQL Server provides over 30 global variables.Frequently used:@ IDENTITY: returns the column value of the ID column of the last inserted row.@ ERROR: return the ERROR code of the last executed Transact-SQL statement. If there is no error, it is zero.@
DecimalThe data type can store up to 38 numbers, and all numbers can be placed on the right of the decimal point.DecimalThe data type stores an accurate (accurate) numeric expression, and does not store approximate values.
DefinitionDecimalThe
There are four methods for batch data import in the SQL Server database. During the implementation of the software project, data import has always been a headache for the project staff. In fact, many data import methods are integrated in SQL Server.
There are many reasons for slow query speed. The following are common causes: 1. No index or no index is used (this is the most common problem of slow query and is a defect in programming) 2. Low I/O throughput, resulting in a bottleneck effect. 3
1. Why do we need to reference background data?
When you open a browser-based form, some drop-down controls in the form, such as "product type" and "material type", you may not want the reader to input them by yourself, instead, you want to directly
There are many reasons for slow query speed. The following are common causes: 1. No index or no index is used (this is the most common problem of slow query and is a defect in programming) 2. Low I/O throughput, resulting in a bottleneck effect. 3
SQL Server R2 map report creation (2)
The map Preview pane also displays the following items:
A title, whose text is the map title.
A map shows all towns and towns in Washington, each of which is in a different color, and the township name appears
SQL Server R2 map report creation (4)
Next, you need to specify a map type that displays the tags that change with the analysis data. Here we select "analysis tag Chart ". As shown in:
Server R2 map report generation (4) "alt =" SQL Server R2 map
There are two methods here. The first method is cumbersome but detailed. The second method is relatively simple. The second method is recommended!
Method 1:
The SQL Server Agent is not started. First, we start it and create a new job named "MyDb
The actual database size is 600 MB, and the actual log file size is 33 MB, but the log file space is 2.8 GB! I tried a variety of methods, such as SHIRNK DATABASE and TRUNCATE LOG FILE. In any case, this should be a BUG of SQL Server.
Expert answer:
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.