当前位置:网站首页>Microsoft SQL Server database language and function usage (XII)
Microsoft SQL Server database language and function usage (XII)
2022-07-24 11:57:00 【Pzz_ Lite】
Microsoft SQL Server Database language and function use ( Twelve )
notes : Use Microsoft SQL Server 2019
One 、 Backup and restore
1、SQL Server The type of backup
(1). Full backup : It can back up the entire database , Include user table 、 The system tables 、 Indexes 、 All database pairs such as views and stored procedures like . But what? , It also costs more Time and space .
①、 Use SSMS Tool backup
example : Select the database with the mouse in the database and right-click to select the task ==> Backup , The backup type is “ complete ”, Add database backup path ,“ Backup options ” You can set the backup expiration time ,0 Then it means no expiration .
②、 Use SSMS Scheduled backup
example 1: Turn on SqlServer Agency service , Find open SQL Server 2019 Configuration manager , choice “SQL Server service ”, hold SQL Server The agent starts with the right mouse button .
②、 Go back to the database and put SQL Server Agent enabled , Then find the maintenance plan in the management –> Maintenance plan wizard .
③、 Rename the backup name , Run identity :SQL Server Agent service account , Check : Overall planning or no plan .
④、 Change the backup execution plan , Create a new backup plan , Set the backup content according to personal needs , If the plan type is repeated execution , Frequency is daily , The interval is 1 God , Daily backup frequency and interval 、 The duration of the .
⑤、 routine : Select the database to back up , The goal is : Specify the database backup location , The backup file extension defaults to bik, Options : The default setting is server .
(2)、 Restore backup database , Select system database –> Restore database , Click on the device : Select database , Add database select the database to back up ,

(3). Transaction log backup : The content of transaction log backup starts from the transaction log that has not been backed up , The last thing until the end of the backup Until the business log .
(4). Differential database backup : Include all data pages that have changed since the last integrity backup , And some activities at the end of the backup Transaction log .
One 、 Database exercises
notes : Use Microsoft SQL Server 2019
1. Take the student learning management database as an example
(1)、 Inquire about “c001” Course than “c002” Student numbers of all students with high course scores ;
①、 The first one uses self join queries , Query the course numbers of the two courses respectively , Then use the student number to compare grades , For the first time, you can find “c001” The corresponding grades and student numbers are assigned A, For the second time, you can find “c002” The corresponding grades and student numbers are assigned B, Then use your own connection to compare the corresponding data , Then compare the results through the conditions A Table must be greater than B The data table .
②、 The second uses related subqueries ,SQL Server Exists Operator EXISTS The operator is a logical operator , Used to check whether the subquery returns any rows . If the subquery returns one or more rows , be EXISTS Operator return TRUE ;
边栏推荐
- 使用Prometheus+Grafana实时监控服务器性能
- 第1章 引言
- Guys, do you need to configure anything to use rocksdb when using flinksql? Or do you need any jar packages
- LogBack & MDC & a simple use
- Stack Title: basic calculator II
- Skillfully using command line parameters in Delphi to realize the trigger function of dragging files onto program icons
- HCIP MGRE实验 第三天
- Difference between GCC -l parameter and -l parameter
- Recommended SSH cross platform terminal tool tabby
- L1-043 reading room
猜你喜欢
![MOS tube - Notes on rapid recovery application (I) [principle]](/img/a1/8427c9b1d0ea0cecce820816510045.png)
MOS tube - Notes on rapid recovery application (I) [principle]

How to use a third party without obtaining root permission topic: MIUI chapter

1184. Distance between bus stops: simple simulation problem

Cgo+gsoap+onvif learning summary: 9. Go and C conduct socket communication and onvif protocol processing

NFT digital collection system construction - app development

链表——剑指offer面试题 02.07. 链表相交

Paging query of employee information of black maredge takeout

Install JMeter

PDF处理还收费?不可能!
![Detailed OSPF configuration of layer 3 switch / router [Huawei ENSP experiment]](/img/a9/f080940ec7bf94ab83c922990efa62.png)
Detailed OSPF configuration of layer 3 switch / router [Huawei ENSP experiment]
随机推荐
Experience of redis deepwater area -- Interview reference
L1-064 AI core code valued at 100 million
[Commons beanautils topic] 005- convertutils topic
An analysis of the CPU surge of an RFID tag management system in.Net
字符串——剑指 Offer 05. 替换空格
哈希——18. 四数之和
C # entry series (29) -- preprocessing commands
Import the data in MariaDB into columnstore
CCF 201803_ 1 jump jump
L2-011 玩转二叉树
HCIP OSPF接口网络类型实验 第四天
Shengxin weekly issue 37
What is the charm of CSDN members? What's the use of him?
Skillfully using command line parameters in Delphi to realize the trigger function of dragging files onto program icons
Three small knowledge points about data product managers
3、 Implementation principle of MFC message mapping mechanism
JVM visualvm: multi hop fault handling tool
Differences between JS map and foreach
Chapter 0 Introduction and environment configuration
Operational amplifier - Notes on rapid recovery [II] (application)