- 1、本文档共21页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SQL语句快速入门(国外英文资料)
SQL语句快速入门(国外英文资料)
Create a database
Create database bvtc_db - database name
On primary - specifies the file in the main file group. The default is the first file
(
Name = bvtc_db_data -- specifies the name of the master data file (logical name)
Filename = F: \ bvtc_db_data. MDF, - specifies the main operating system file name and path. Must be installed for SQL server folders on your computer. (the physical file name)
Size = 5MB, the initial capacity size
Maxsize = 20MB - maximum capacity
Filegrowth = 20% - file growth (10% at default, no more than maxsize)
)
Log on -- specifies the transaction log file that establishes the database, and the file extension is called: LDF
(name = bvtc_db_log -- specifies the transaction log file logical name
Filename = F: \ bvtc_db_log.ldf - specify the physical file name
Size = 10MB, the initial capacity size
Filegrowth = 2MB - file growth
)
Collate Chinese_PRC_CI_AS - specifies the default sort method
The GO
View the database information
In addition to looking directly at the database properties, we use the system stored procedure sp_helpdb:
Exec sp_helpdb bvtc_db - exec is the execution statement, bvtc_db is the database name
Managing the database
(1) open or switch database: use bvtc_db
(2) change the database capacity: you can change it directly in the database attribute, or you can use the following statement:
Use bvtc_db
The go
The alter database bvtc_db
Modify the file
(
Name = bvtc_db_data, - also can be a transaction log file (bvtc_db_log)
Size = 20 MB
)
(3) reducing database capacity:
Method 1: right-click the database name - all tasks - shrink the database
Method 2:
DBCC shrinkdatabase (database_name [, masteroverride])
Example:
Use bvtc_db
The go
Exec sp_dboption bvtc_db, single user, TRUE is set to a single user mode before reducing the database.
The go
DBCC shrinkdatabase ( bvtc_db ) - this is where the database is reduced to minimal capacity.
The go
Exec sp_dboption bvtc_db, single user, FALSE
The go
(4).
Method 1: da
您可能关注的文档
最近下载
- ZJ70-4500D20石油钻机使用说(2022年-2023年)明书.docx VIP
- 2023-2024学年人教版高中信息技术必修一第二章第一节《解决问题的一般过程和用计算机解决问题》教案.docx VIP
- GB7258—2022机动车运行安全技术条件修订内容解读29.pdf
- 医学装备使用安全培训.pptx
- Unit6单元整体设计人教版九年级英语全册.pdf
- 中考数学轨迹问题集锦69739.doc VIP
- 2024年河北省继续医学教育公共必修课参考答案.pdf VIP
- 驾校学员心理调节精编.ppt
- 自考06269工程应用英语(13-19)真题试卷.doc VIP
- 智能农业传感器监测和优化农作物生长环境.pptx
文档评论(0)