Ways to fix the MDF file for SQL Server
If the database backed up has 2 files, respectively. LDF and. MDF, open Enterprise Manager, right-click on the instance---All Tasks-append database, then select that. MDF file, it's OK.
Or, in Query Analyzer,
Problem: SQL Server 2008 Login failed with ' sa ', enable ' sa ' login method
First "Why not login with SA, prompt login failed?" "
Of course, when I installed SQL Server 2008, there was no way to log in with the SA, and when I installed the
A. FUNCTION:In sqlserver2008, there are 3 custom functions: Scalar function/Inline table value function/Multiple statement table-valued function, first summed up their grammatical similarities and differences:
Same point:1. Create the definition is
Creates a temporary table that reports errors when inserting data into a temporary table.
A start prompt does not open the primary key, and then the primary key is turned on to prompt the above error exception.
Find information from the Internet
How do you get server hardware and system information through SQL statements in SQL Server? Here's how to get the processor (CPU), Memory (Memory), disk, and operating system-related information through an SQL statement. If there are deficiencies
The phenomenon of database blocking and deadlock:
One, the database blocking phenomenon: The first connection occupies the resource is not released, and the second connection needs to obtain this resource. If the first connection is not committed
What is a trace tag?
For DBAs, mastering trace flag is one of the prerequisites for becoming a master of SQL Server, and in most cases, trace flag is just a sword-walking slant, not necessary, but in many cases, using these tags will allow you to
The code is as follows:
EXEC sp_rename ' table name. [Original column name] ', ' new column name ', ' column '
Transact-SQL Reference
sp_rename
Changes the name of a user-created object (such as a table, column, or user-defined data type) in the
Environment: SQL Server 2008 R2
Question: SQL Server date, datetime, Smalldate difference
Solve:
Datetime
Date and time data from January 1, 1753 to December 31, 9999, with an accuracy of 3% seconds (equal to 3.33 milliseconds or 0.00333 seconds)
You might want to explore ways to take advantage of different kinds of replication for a variety of reasons, but probably the biggest reason is to allow administrators to provide SQL Servers to customers, and those customers ' companies are
To do a project, the first thing to ask is:"How big is this database?" "Here's how to count the data size of the databaseUsually we will use the command: "sp_helpdb @dbname"For example, querying the usage of the database "TESTDB3"EXEC sp_helpdb
ObjectivePrevious articles we introduced how to view the query plan, the introduction of common operators, the way of parallel operations, interested can click to view.This article will analyze in SQL Server, how to use the first indexed items for
Constraints fall into the following categories:1) non-null constraints, using the not nulls keyword;2) Default value constraints, using default keyword;3) Check the constraints, use the CHECK keyword;4) Unique constraints, using the unique keyword;5)
A. Syntax Essentials:BEGIN TRY{sql_statement | statement_block}END TRYBEGIN CATCH[{sql_statement | statement_block}]END CATCH[ ; ] Exception section:within the scope of a catch block, you can use the following system functions to get the error
SQL Server 2005 COM + catalog requirements warning①. Start Distributed Transaction Coordinator serviceOpen the service, find the Distributed Transaction Coordinator service in the service, select "Properties";In the "Login" tab, select "This account"
ObjectiveIn this section we analyze the left join and not EXISTS, short content, in-depth understanding, always to review the basics.Left JOIN ... Is null and NOT EXISTS analysisWe have previously analyzed that in query processing null value is
ObjectiveIn this section we continue to talk about index knowledge, before we clustered index, nonclustered index and overlay index, there is also a filter index, through the index filter we can also improve query performance, short content,
SQL Server 2012 Database Mirroring The following configures database mirroring through a domain account:First, the Environment preparation1. Prepare the computerAD02 is a domain controller/dns server (sz1card1.com), IP:192.168.2.218/24,AD02
Detailed description of the data type in SQL Server, SQL Server
Preface
In the previous articles, we have explained the index-related knowledge. In this section, we will continue to explain the following content, including brief content and in-depth
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