Misunderstanding #28: Several misunderstandings about the log recovery mode of large-capacity transactions
28 A) Common DML operations can be "minimum logged"No. In the large-capacity transaction log recovery mode, only a small number of batch
Actually, I already have
Article Detailed explanation of the page checksum: how to tell if the IO subsystem is causing when uptions?
Misunderstanding #17: Several misunderstandings about page checksum
It is basically wrong
17 A) page
I only tested tables and stored procedures, and other objects were not actually tested,
Back up the database before use ,
I am not responsible for any errorsPai_^ .
1
/*
2
Brief: Change the owner of all objects in the database
3
What is SQL injection?
Many websites
Program At the time of writing, the legality of user input data is not determined, so that the application has security risks. You can submit a database query
Code (Usually in the browser address bar, access
The default datetime format for ms SQL Server Chinese edition is yyyy-mm-dd hh: mm: Ss. Mmm
Long/short Date Format
CopyCode The Code is as follows: -- short Date Format: yyyy-m-d
Select Replace (convert (varchar (10), getdate (), 120), N'-0 ','-')
-
CopyCode The Code is as follows: Set ansi_nulls on
Set quoted_identifier on
Go
Create procedure [DBO]. [sp_pagination]/**//***************************************** ************************* Tens of millions of paging stored procedures ***********
At work, we often need to store information greater than 8 KB to the Text, ntext, and image fields of tables in the database. During data maintenance, in this case, you may save the storage information in one location to another.
When the data size
Method 1: Use the SQL Server proxy (Alert + Job)The procedure is as follows:1. First, use the following command to enable the trace flag.SQL codeDbcc traceon (3605, 1204, 1222,-1)Note:3605 output the result of DBCC to the error log.1204 return the
Recently, I encountered a problem in the development project, that is, after inserting a record, I need to immediately obtain the ID in the database, which is auto-incrementing. How can I do this?
There are several methods available in SQL server 200
Use the following statement to update a batch of records:
Update publish set contentid =
(Select top 1 articles. contentid from articles
Where articles. articleID = publish. objectID
)
-- Where publish. objectid = @ objectID
The premise is that the
This series of articles I saw in the sqlskill.com's PAUL blog, many misunderstandings are more typical and representative, the original from the T-SQL Tuesday #11: Misconceptions about... EVERYTHING !!, Hope to help you.
Misunderstanding #28:
Method 1
Copy codeThe Code is as follows: declare @ max integer, @ id integer
Declare cur_rows cursor local for select Main field, count (*) from table name group by main field having count (*)> 1
Open cur_rows
Fetch cur_rows into @ id, @ max
While
I. Overview
SQL Server provides backup and recovery methods for "detach/Attach" databases, "backup/restore" databases, and duplicate databases. This section describes a commonly used "separation/attachment" Method for learning, similar to the
Many friends asked SQL server database "generate scripts" and exported only the SQL scripts of the database, while the data in the table is still not exported. It is very simple. Take a look at the Tutorial:
Note: I use SQLServer2008 here. Other
Misunderstanding #1: After server failover, ongoing transactions continue to be executed
Of course this is wrong!
Each failover is accompanied by some form of recovery. However, if the transaction being executed does not have a Commit, the
There are many problems with SQL Server connection. If you do not set it, you cannot connect it. Please note here! (Some materials are from the Internet)
Problems with JDBC connection to MySQL
(The example contains the JDBC2005 driver. In the lib
In industrial control applications, the returned data is often stored in binary format, and the binary data represents a hexadecimal data content every 4 bits. During parsing, a single Byte usually occupies eight digits (bit). 4 bits at the top
SQL SERVER Data Storage Format
Before talking about several different reading methods, you must first understand the SQL SERVER data storage methods. the minimum unit of SQL SERVER storage is Page ). the size of each page is 8 KB. SQL SERVER
Copy codeThe Code is as follows:-determines whether some fields are empty.
-- Case
Select case when 'field name' is null then' \ n' else convert (varchar (20), 'field name') end as 'newname'
Select case when null is null then' \ n' else convert
XML is added to SQL Server. the Modify () method is xml. modify (insert), xml. modify (delete), xml. modify (replace) corresponds to XML insert, delete, and modify operations.
The following XML is used as an example to describe three DML
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