After a database of SQL Server 2000 is backed up, after restoration, it is found that the original user cannot connect to the database. This is because the restored database user has not logged on to SQL. solution:
Use in query Analyzer
In the left-side title bar of the registry editor window, Locate the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ msahci branch, and double-click Start in the right-side window ".
In the "Edit DWORD Value" dialog box that appears,
Detecting and resolving I/O bottleneckby: Kasim wirama, mcdba
I/O subsystem is one of critical component in SQL Server. i/O subsystem is used when SQL Server moves page between memory and I/O subsystem. with intensive activity of DML and DDL, SQL
Detect CPU bottleneck in SQL serverby: Kasim wirama, mcdba
When you have your database server experiencing a problem, there are available possibilities here, such as CPU, memory, hard disk or database configuration itself. there shoshould be a
Exec sp_droplinkedsrvlogin dbvip, nullExec sp_dropserver dbvip
Exec sp_addmediaserver@ Server = 'dbvip ', -- the alias of the accessed Server@ Srvproduct = '',@ Provider = 'sqloledb ',@ Datasrc = 'server2' -- the server to be accessed
Exec
As a DBA, you must deal with a variety of tsql code. See the following three examples:
1: parentheses are used in distinct:
SELECT DISTINCT (TransactionID),ProductID,TransactionTypeFROM adventureworks.Production.TransactionHistoryArchive
The
1: When autoshrink is enabled, If you manually contract the data file, an error will be prompted, because there is a background thread shrinking the data file, is there a way to kill this background thread?
The answer is no. You can only
Let's see how multi-Column Filtering estimates the number of returned rows.
Use adventureworksgo -- set all milliseconds to 0, so that you can see the update DBO effect. databaselog set posttime = cast (convert (varchar, posttime, 120) as datetime)
Today, the optimization statements are very interesting. The nolock prompt is added to the normal select statements to increase concurrency and reduce blocking. The speed is faster than that without nolock,
Today, the main two tables are 24 GB, the
The row version control-based isolation level can improve read concurrency by eliminating read operation locks. Microsoft SQL Server introduces two transaction isolation levels that use row version control:
When the read_committed_snapshot
Stored Procedure Design Rules
The stored procedure design rules include:
The create procedure statement can include any number of SQL statements and types, except the following statements.These statements cannot be used anywhere in the stored
Some complete log records and large-scale index operations can generate large data loads. Whether performed offline or online, these data loads can quickly fill up transaction logs. This may affect performance. By setting the database recovery mode
Establishing a performance baseline
Applies to: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Baseline performance monitoring involves establishing a performance baseline for your system.
CauseMasterThe operation types for updating and requiring backup include:
Create or delete a user database.When your database automatically grows to accommodate new data,MasterThe database is not affected.
Add or delete files and file groups.
The following example shows what operations must be performed on a partner residing on host_a. In this example, two partners are default server instances on three computer systems. Two server instances run in untrusted Windows domains. Therefore,
In SQL Server 2005 if you configure network packet size to 16388 or greater, and attempts to save SSIS packages to the MSDB package store, it will fail with the following error message:
The savetosqlserver method has encountered ole db error code 0x8
SQL Server 2008 R2 includes licensed third-party disconnections in the following languages:
Danish
Polish
Turkish
These broken characters are available, but are not installed by default. You must manually register them and add them to the lcid
There are several system stored procedures and directory views that provide information about stored procedures. You can:
View the function definition, that is, the transact-SQL statement used to create a user-defined function. This is useful if
Source: http://www.cnblogs.com/fly_zj/archive/2010/07/07/1772818.html
Original:Determining Set options for a current session in SQL Server
Question?
For each session connected to SQL Server, you can set the set Option to affect the query results
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