[SQL Server] server settings

Source: Internet
Author: User

-- 1 memory

-- Set to use awe to allocate memory
Exec SYS. sp_configure n 'awe enabled', n'1'
Go
Reconfigure with override

-- Set the minimum server memory to 50 MB
Exec SYS. sp_configure n 'min server memory (MB) ', N '50'
Go
Reconfigure with override
Go

-- Set the maximum server memory to 2147483647 MB
Exec SYS. sp_configure n 'max server memory (MB) ', n' 2147483647'
Go
Reconfigure with override
Go

-- Memory occupied by index creation
Exec SYS. sp_configure n 'index Create memory (Kb) ', N '0'
Go
Reconfigure with override
Go

-- Sets the minimum memory occupied by each query.
Exec SYS. sp_configure n 'min memory per query (Kb) ', n' 1024'
Go
Reconfigure with override
Go

-- 2 CPU

-- Set CPU Association
Exec SYS. sp_configure n 'affinity Mask', n'1'
Go
Reconfigure with override
Go

-- Set the I/O Association
Exec SYS. sp_configure n 'affinity I/O Mask', n'2'
Go
Reconfigure with override
Go

-- Set the maximum CPU thread
Exec SYS. sp_configure n 'max worker Threads', n' 128'
Go
Reconfigure with override
Go

-- Set the maximum CPU thread
Exec SYS. sp_configure n 'max worker Threads', n' 128'
Go
Reconfigure with override
Go

-- Improves SQL Server priority
Exec SYS. sp_configure n 'priority boost ', n'1'
Go
Reconfigure with override
Go

-- Security

-- Modify Server login authentication mode 1-Windows Authentication mode; 2-sql server and Windows Authentication Mode
Use [Master]
Go
Exec xp_instance_regwrite n 'HKEY _ LOCAL_MACHINE ', n' software/Microsoft/MSSQLServer', n' loginmode ', REG_DWORD, 1
Go

Follow-up

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.