1. The first day of a monthSelect dateadd (mm, datediff (mm, 0, getdate (), 0)2. Monday of the weekSelect dateadd (wk, datediff (wk, 0, getdate (), 0)3. The first day of the yearSelect dateadd (YY, datediff (YY, 0, getdate (), 0)4. The first day of
A connection has been established with the server, but an error occurs during logon. (Provider: named pipeline providesProgram, Error: 0-No process exists on the other end of the MPs queue .) (Microsoft SQL Server, error: 233)
Solution: Open "start-
Sysaltfiles: files stored in the database in the master database
Syscharsets primary database character set and sorting order
Sysconfigures master database configuration options
Current configuration options of the syscurconfigs master
Depressed, I want to convert a struct field into an int variable in the trigger. If an error occurs, set the variable to 0 and the result will always jump out when an error occurs, the @ error judgment is useless at all, so I searched the internet
When I went to an interview with a new company, the future leaders said that I still need to strengthen this aspect. I knew it myself. I used to do a loan management system because I hadCodeBecause of the generator, the stored procedures are
I am making a report today, but I did not pay attention to it at first glance. I checked it carefully. It turns out that I want to count the sales volume for a certain period of time in a sales detail list in SQL Server and compare it by week, I had
Sqlserver architecture: NetworkProgramLibrary, user-mode scheduler, relational engine, Ole database, storage engine, Io manager, WIN32API.
1. Update execution is divided into two situations::1) direct replacement;
2) perform the delete and insert
Read the SQL Server database Stored Procedure List and parameter information
Obtain the database Stored Procedure List:
Select * from dbo. sysobjects where OBJECTPROPERTY (id, N 'isprocedure ') = 1 order by name
Obtain the parameter information of a
Check whether the database exists in SQL Server:Method (1 ):
Select * from Master. DBO. sysdatabases where name = 'database name'
Method (2 ):If db_id ('database name') is not null
Drop database...Go
Create...
Check whether the table object exists
After all, the CPU of the database server was reduced from over 50% (opening five program threads) to 100% (opening 10 program threads. I found some tips and summarized them.
1. SQL server 2005's performance tools include SQL Server Profiler and
Reprinted to http://www.cnblogs.com/whz881027/articles/2112525.html1. HOLDLOCK: Keep the shared lock on the table until the entire transaction ends, instead of releasing the added lock immediately after the statement is executed.
2. NOLOCK: no
Different Options for Importing Data into SQL ServerWritten By: Greg RobidouxProblemMoving data into SQL Server is something that most DBAs or Developers are faced with probably on a daily basis. one simple way of doing this is by using the
1. Clear logsDump transaction database name WITH NO_LOG2. truncate transaction logs:Backup log database name WITH NO_LOG3. Compress database files (if not compressed, the database files will not be reducedEnterprise Manager -- Right-click the
Introduction: the basis of MySql error handling is to select the appropriate SQL SERVER mode to identify which will report errors and which will report warnings, and then you can select the appropriate statement to capture.
The MySQL server can
In fact, you only need to use the built-in storage process sp_spaceused to obtain table-related information.
For example, sp_spaceused 'tablename'
The following is a stored procedure for writing convenience. The purpose is to store all the
// All namespaces used in the import program
Using system;
Using system. Data. oledb;
Class oledbtest {Public static void main (){String strconnect = "provider = sqloledb.1; persist Security info = false; user id = sa; initial catalog = xsgl; Data
A. the first day of a month
Select dateadd (mm, DATEDIFF (mm, 0, getdate (), 0)
B. Monday of the week
Select dateadd (wk, DATEDIFF (wk, 0, getdate (), 0)
C. The first day of a year
Select dateadd (yy, DATEDIFF (yy, 0, getdate (), 0)
D. The first
The following exception occurs during the configuration of Transactional Replication in SQL Server 2005/2008.
Exception information: Replication. Utilities----------
SQL Server replication requires an actual Server name to connect to the Server.
1. Transaction replication works normally. An error occurs on a certain day:
I was so scared that I thought I had to redo it.
2. Visit the peak hours, and do not have time to redo it. I am lucky to put my dog on...
3. Use a dead horse as a live
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.