In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about the analysis of SQLServer database management, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can gain something according to this article.
Database management
SSMS tools can be used to design and build databases and store enterprise data to meet the needs of enterprises.
1. Create a database
Before you create a database, you must determine the name of the database, the owner (the user who created the database), the size, and the location where the data file and transaction log file are stored. So before you create a database, you need to consider the following:
The right to create a database is granted by default to members of the sysadmin and dbcreator server roles, which are used to grant users server-wide security privileges
The user who created the database will become the owner of the database
Consider the location of data files and log files
Reasonable estimation of the size and combined growth of the database
1) start SSMS and log in to the database using sa
2) right-click the "Database" node and select the "New Database" command from the pop-up shortcut menu.
3) Open the "New Database" window, set the database name to "class", specify the owner of the database, and the user who created the database by default will become the owner of the database.
4) set the save directory of the file in the "path" column, click the button in the column, open the "locate folder" dialog box, and you can select the directory where the file is saved.
5) set the initial value in the "initial size" column and the automatic growth value in the "automatic growth / maximum size" column.
6) when you have set the data name and other options, click the "OK" button and a new database will be built. It generates two files, one is a .MDF file containing data, and the other is a .ldf file containing log information.
7) as a database administrator, you may deal with some special requirements for the database, all of which need to set database-level options for the database instead of the default values at the time of creation. Changes to these options can be made in the options interface of the Database Properties-class window
Extended database
When the space of the data file or log file in the database is full, you need to allocate more space for the data file and log file. SQLServer can automatically extend the database based on the growth parameters defined when you create the database, or you can manually extend the database by allocating more file space on an existing database file, or by allocating space on another new file.
Database capacity needs to be increased
When you expand a database, you must increase the capacity of the database by at least 1MB, and you can specify the maximum to which the file is allowed to grow, which prevents the file from growing indefinitely, resulting in the exhaustion of the entire disk space. According to their own needs, the growth value should be set appropriately, too large or too small is not appropriate.
1) in SSMS object Explorer, right-click the "class" database, select the "Properties" command from the pop-up shortcut menu, and open the "Database Properties-class" window.
2) in the "Database Properties-class" window, select the "File" option in the "selection Page" pane, and open the "File" selection page.
3) Select the class data file, set the initial size to 100MB, and click in the autogrow / maximum size column. Button, open the change class Auto-growth Settings dialog box, deselect the enable Auto-growth check box, and then click OK
4) Click the "add" button on the "File" selection page, add a database file, specify the new file name as "db_class" in the "logical name" column, select "Row data" in the "Files of Type" column, set the "initial size" to 50MB, and click in the "automatic growth / maximum size" column. Button and select the enable automatic growth check box in the dialog box that opens. Set the maximum file size to 500MB, select the path C:\ db_class, and then click OK
After reading the above, do you have any further understanding of SQLServer's database management analysis? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.