SQL Server 2022 Enterprise installation and use
Official website update instructions:
https://learn.microsoft.com/zh-cn/sql/sql-server/sql-server-2022-release-notes?view=sql-server-ver16
Official website management tool download address:
https://learn.microsoft.com/zh-cn/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16
Software download address:
Microsoft SQL Server 2022 Enterprise 简体中文版/繁体中文/英文 正式版ISO镜像
SQL Server 2022 Enterprise 简体中文企业版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_ChnSimp_MLF_X23-28422.[iso](http://www.atvnk.com/7657.html)
SHA256:E0FAF17519FC9B26107ACE7661052C9074E024DF5F87B6F3AD7BD09B59639EA6
文件大小:1.26 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1YHPj8bjfWDp_rZogl8GTtg 提取码: zekg
SQL Server 2022 Enterprise 繁体中文企业版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_ChnTrad_MLF_X23-28420.iso
SHA256:61E3E2BE853D35E2EF0715A24CAA066D1BBFEC55556F0372012BF7CC67AB92DC
文件大小:1.26 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1rw-iKeX7glmnUIws4s_5_Q 提取码: uh5a
SQL Server 2022 Enterprise 英文企业版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_English_MLF_X23-28423.iso
SHA256:E1C700F076546F0657D164B0B1DC33776B25A8D7EC6F04C9E7E664E318F6D8FE
文件大小:1.08 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1hUnlewEdkPIBF-G5_Bkw3w 提取码: 26uu
## Microsoft SQL Server 2022 Developer 简体中文版/繁体中文/英文 正式版ISO镜像
### SQL Server 2022 Developer 简体中文开发版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_ChnSimp_MLF_X23-28422.iso
SHA256:17E41F3557F8127E5D3FF70452D29C808D3B111E1BEA2F246ACC85DA258097CE
文件大小:1.26 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1cntGkikVDjsZaIz0UBJIhg 提取码: 2iyt
SQL Server 2022 Developer 繁体中文开发版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_ChnTrad_MLF_X23-28420.iso
SHA256:0A2B94D372B8F6163707DFEEC01EAA454699AFEF5C32F17B286508A8236ED81B
文件大小:1.26 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1hSEorz4D_jfSSOmtF5pvdw 提取码: g1ft
SQL Server 2022 Developer 英文开发版 正式版ISO镜像
文件名:SW_DVD9_SQL_Svr_Enterprise_Edtn_2022_64Bit_English_MLF_X23-28423.iso
SHA256:80D2CD75DD2B28098C0182F50AD86BD44F9B3A9F357C30FF617480A1497DAFFD
文件大小:1.08 GB
发布时间:2022-11-20
百度网盘: https://pan.baidu.com/s/1nQsWgCDdVI0h_O7b5LtJYA 提取码: w6ry
Serials:
Developer: 22222-00000-00000-00000-00000
Enterprise: J4V48-P8MM4-9N3J9-HD97X-DYMRM
Enterprise Core: 2Q48Q-PB48J-DRCVN-GB844-X2H4Q
Standard: FG86G-CHH2T-CB7NJ-XT7D2-V8V4X
Web: 2R97W-F4XNT-T6MYV-3TKB7-6X3JM
SQLServer installation
1. After the download is completed, right-click the download image and click Load
2. Double-click the setup.exe program in the pop-up page.
Waiting to enter the installation interface
3. Click Install and choose to install a new SQL Server standalone or add functionality to an existing installation.
4. Select the installation version Evaluation (trial version), developer (developer version) (see the difference in the picture below) ** (if there is a product key here, you can choose to enter the product key), ** click Next
5. Select to accept the license terms and click Next
6. Deselect Check for updates ** (checking is not recommended here, checking for updates is more time-consuming) ** and click Next
Until this interface
7. Function selection, it is recommended to select these two basic functions, change the instance root directory (note here that it is only recommended to change the drive letter when changing the instance root directory, and do not change subsequent paths), click Next
8. Instance configuration, generally select the default instance here, click Next
9. Service account configuration. Here you can select the account of SQL Server agent and engine. Generally, keep the default and can modify it after installation.
10. Sorting rule settings, generally keep the default. If you need to modify it, click Customize, select the specified sorting rule (Note: Database migration and high availability construction need to keep the sorting rules consistent, the sorting rules are not easy to modify after installation), click Next
11. Server configuration. Select mixed mode, set the sa password (sa is the super administrator of sql server), click to add the current user,
12. Data directory. Here you can change the default location of the user database file. You can keep the default. It is recommended to create a separate directory for distribution (note: do not modify the database root directory!!!)
13.TempDB (system temporary database, automatically updated after restarting the database), you can set the initial number of TempDB data files (recommended 4-8, no more than 8) and TempDB data file directory. It is recommended to allocate disks and directories separately. You can keep the default. One click step
14. Click to install
15. Wait for the installation to complete (you may be prompted to restart the server)
16. Restart the server
Install SSMS client
In this way, the SQL Server2022 instance is successfully installed, and then you need to install a tool to connect to the database.
It is recommended to install Microsoft’s official SQL SERVER connection tool SQL Server Management Studio (SSMS)
Download SQL Server Management Studio (SSMS)
2.1 Search SSMS in the browser and click on the link starting with https://learn.microsoft.com/zh-cn
2.2 Click to download SSMS
If you need an English installation package, you can scroll down and select the English version.
2.3 After the download is completed, open the installation program and set the program installation location
2.4 Wait for the installation to complete (this step may prompt you to restart the server)
2.5 Click the Start button, find the SQL Server Management Studio Management Studio 19 software you just installed, and double-click to open it.
Soft feature, this interface may take a while (don’t keep double-clicking if it cannot be opened, multiple interfaces will pop up)
2.6 The login interface defaults to connecting to the local database with the current windows account. You can directly click OK here.
(If the server name is empty, the local server can be replaced with .)
(If the current Windows account cannot be connected, you can change the verification method to SQL Server authentication, enter the corresponding database account password, and click Connect)
The interface looks like this after logging in
Next, we will introduce the commonly used functions here.
3.1 View database and users
Because this is a newly installed database software, there is no database on it.
The login name starting with NT is the database account that comes with the system.
3.2 Execute script
If you need to execute a script, click New Query, enter the script content, and click Execute (the window to the left of the Execute button is the database currently selected for execution, don’t make a mistake)
Okay, that’s it for this article, thank you for watching
Check whether SQLServer 2019 is activated after installation
Connect data via smss
Execute the script below and it will be displayed as "0", indicating that it has been activated.
use master
go
RECONFIGURE
GO
DECLARE @daysleft int
DECLARE @instancename sysname
SELECT @instancename = CONVERT(sysname, SERVERPROPERTY('InstanceName'))
EXEC @daysleft = xp_qv '2715127595', @instancename
SELECT @daysleft '剩余使用天数'
GO
[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-Q8Bjsk65-1688717085842) (C:\Users\11873\AppData\Roaming\Typora\typora-user-images\ image-20230621144550249.png)]
SQLserver optimization
Note: SQL Server's usage strategy for server memory is to occupy as much memory as it uses. Only when the server memory is insufficient, a little occupied memory will be released, so SQL Server server memory often takes up a lot of memory.
Cache when Sql Server is running:
1. Data cache: execute a query statement, Sql Server will load the relevant data page (the data operated by Sql Server is in pages) into the memory, if requested again next time When reading the data on this page, there is no need to read the disk, which greatly improves the speed.
2. Execution command caching: When executing stored procedures and custom functions, Sql Server needs to be binary compiled before running. The compiled results will also be cached, so there is no need to compile again when called again.
Command to clear cache (directly execute the fourth command to clear all caches):
DBCC FREEPROCCACHE --清除存储过程相关的缓存
DBCC FREESESSIONCACHE --会话缓存
DBCC FREESYSTEMCACHE('All') --系统缓存
DBCC DROPCLEANBUFFERS --所有缓存
Note: Clearing the cache will not release the memory occupied by SQL Server, so you need to release the memory by modifying the SQL Server memory or restarting the SQL Server server.
Modify SQL Server memory:
Use the following statement to find out which statement occupies the most memory, and optimize the statement that occupies the most memory.
SELECT SS.SUM_EXECUTION_COUNT,
T.TEXT,
SS.SUM_TOTAL_ELAPSED_TIME AS '总和时间',
SS.SUM_TOTAL_WORKER_TIME AS '执行耗时',
SS.SUM_TOTAL_LOGICAL_READS AS '总和逻辑读数',
SS.SUM_TOTAL_LOGICAL_WRITES AS '总和逻辑写'
FROM (SELECT S.PLAN_HANDLE,
SUM(S.EXECUTION_COUNT)SUM_EXECUTION_COUNT,
SUM(S.TOTAL_ELAPSED_TIME)SUM_TOTAL_ELAPSED_TIME,
SUM(S.TOTAL_WORKER_TIME)SUM_TOTAL_WORKER_TIME,
SUM(S.TOTAL_LOGICAL_READS)SUM_TOTAL_LOGICAL_READS,
SUM(S.TOTAL_LOGICAL_WRITES)SUM_TOTAL_LOGICAL_WRITES
FROM SYS.DM_EXEC_QUERY_STATS S
GROUP BY S.PLAN_HANDLE
) AS SS
CROSS APPLY SYS.dm_exec_sql_text(SS.PLAN_HANDLE)T
ORDER BY SUM_TOTAL_LOGICAL_READS DESC