First scenario: RAID, do you need to do a database backup?
Answer: Need. With raid, if part of the disk is damaged, you can repair the database, and in some cases the database can even continue to use. But what if one day your co-worker
1. View the version of the database
SELECT @ @version
2. View the machine operating system parameters of the database
EXEC master.. xp_msver
3. View Database Startup Parameters
sp_configure
4. View Database Startup time
Select CONVERT (varchar,
OpenRowset usage can refer to the MSDN
Http://technet.microsoft.com/zh-cn/library/ms190312.aspx
If there are many files, it is recommended to use the program to pour
Copy Code code as follows:
if (object_id (' T_bulkresult ') is not null)
1, SQL Server 2005 performance tools have SQL Server Profiler and Database Engine Tuning Advisor, excellent Dongdong, must be skilled use.
2. When querying SQL statements, open "Show estimated execution plan" and analyze the situation of each step
The last reload N times did not find the VS2005 option, but this thing does exist after installation.
Another problem is to install a database to spend so much time, and occupy space, many tools have not been used after the installation. Can I
First, enable the database to support SQL cache dependencies.
Second, enable the table to support SQL cache dependencies.
Third, include the SQL connection string in the Web.config file for the ASP.net application.
Use SQL cache dependencies in the
Copy Code code as follows:
Use master
DECLARE @DbName varchar (60)
DECLARE @BackSql varchar (1000)
DECLARE mycursor cursor FOR
SELECT [name] from sysdatabases
where [name] not in (' Master ', ' model ', ' msdb ', ' tempdb ')
Order BY
This article imitates the universal class that implements database access, the code is clear and practical, including all the common operations on the database.
///Database Access Universal Class/// public class SqlHelper {private String
1. Calculate each person's total score and rank
Select Name,sum (Score) as Allscore from Stuscore Group by name ORDER by Allscore
2. Calculate each person's total score and rank
Select DISTINCT T1.name,t1.stuid,t2.allscore from Stuscore T1,
Copy Code code as follows:
declare @delStr nvarchar (500)
Set @delStr = ' '--the field string injected here
/****************************************/
/********** The following are operational entities ************/
SET NOCOUNT ON
The specific URL is not saved, but I this person is accustomed to good code to remember the way to save, now posted out, I hope the original author understanding.
Copy Code code as follows:
---The first day of the month
Select CONVERT (
Method One: (This is the most commonly used, because many large sections of content use the text ntext and other data types, and we usually also replace the contents)
The varchar and nvarchar types are support replace, so if your text is no more
1. SQL Server Import Export Wizard, this is the most convenient way.
Import Wizard, Microsoft provides a variety of data source drivers, including SQL Server Native cliant, OLE DB for Oracle,flat File Source,access,excel,xml, and so on, basically
Here, I'm not going to introduce the tips of using SQL Server, nor do I provide a panacea, and what I do is summarize some of the experience----about how to make a good design. These experiences come from the lessons I've endured over the years, and
first, describe the steps to create a FULL-TEXT index using system stored procedures: 1To start the Full-text processing of the database (sp_fulltext_database)2) to establish a Full-text catalog (sp_fulltext_catalog)3Registers the table that
char (n) is a fixed-length format in which a field formatted with char (n) occupies an n-character width, and if the actual stored data is longer than N, it will be truncated, if the length is less than n, filled with a blank character.
VARCHAR (n)
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.