当前位置:网站首页>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 ;
边栏推荐
- Semaphore details
- Hash - 1. Sum of two numbers - some people fall in love during the day, some people watch the sea at night, and some people can't do the first question
- 三、MFC消息映射机制实现原理
- Stack Title: basic calculator II
- C language programming code
- 使用Prometheus+Grafana实时监控服务器性能
- [QNX Hypervisor 2.2用户手册]9.2 cmdline
- Repeated calls, messages, idempotent schemes, full collation
- MySQL creates partition tables and automatically partitions them by day
- Source code analysis sentry user behavior record implementation process
猜你喜欢
随机推荐
Experience of redis deepwater area -- Interview reference
Hash - 349. Intersection of two arrays
Why is the datetime type field 8 hours earlier when I use flinkcdc to read MySQL's binlog?
Nacos permissions and databases
Hash - 1. Sum of two numbers - some people fall in love during the day, some people watch the sea at night, and some people can't do the first question
HCIP OSPF接口网络类型实验 第四天
08.01 adjacency matrix
oracle 11.2.0.4 asm单实例不随系统启动而自动开启
Literature record (part109) -- self representation based unsupervised exemplar selection in a union of subspaces
3、 Implementation principle of MFC message mapping mechanism
Database operation through shell script
Difference between GCC -l parameter and -l parameter
6k+ star,面向小白的深度学习代码库!一行代码实现所有Attention机制!
LogBack & MDC & a simple use
What is the charm of CSDN members? What's the use of him?
字符串——541. 反转字符串 II
Mysql database
Svn server and client installation (Chinese package) and simple use
什么是云原生,云原生技术为什么这么火?
【C和指针第14章】预处理器






![[C and pointer Chapter 14] preprocessor](/img/da/a9a15299157389f8738f7c642a9ff7.png)


