Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
691 views
in Technique[技术] by (71.8m points)

sql-server - SQL Server数据库错误和已知信息(SQL Server database error and known information)

There are many queries of restoring database in SQL Server - below are two:

(在SQL Server中有许多恢复数据库的查询-以下是两个:)

Query #1

(查询#1)

restore database database_name 
from disk = 'databaselocation+name'

Query #2

(查询#2)

use master 
restore database database_name 
from disk = 'location'

What is the difference between simple restoration and master restoration?

(简单还原和主还原之间有什么区别?)

  ask by Ahmed Javed translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is no difference between these two queries.

(这两个查询之间没有区别。)

However, management queries are created using the master database by default when created by the SSMS.

(但是,默认情况下,SSMS创建管理查询是使用master数据库创建的。)

It is better you also do this as these queries may change some information inside the master database.

(最好也这样做,因为这些查询可能会更改master数据库中的某些信息。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...