|MS SQL Server 2012 - DBA Articles|
CREATE DATABASE - User Defined Data and Log Files
This article describes how to create a database in SQL Server 2012 by using SQL Server Management Studio. A maximum of 32,767 databases can be specified on an instance of SQL Server.
SQL Server Management Studio is an integrated environment for accessing, configuring, managing, administering, and developing all components of SQL Server. SQL Server Management Studio combines a broad group of graphical tools with a number of rich script editors to provide access to SQL Server to developers and administrators of all skill levels.
SQL Server Management Studio combines the features of Enterprise Manager, Query Analyzer, and Analysis Manager, included in previous releases of SQL Server, into a single environment. In addition, SQL Server Management Studio works with all components of SQL Server such as Reporting Services and Integration Services. Developers get a familiar experience, and database administrators get a single comprehensive utility that combines easy-to-use graphical tools with rich scripting capabilities.
To open SQL Server Management Studio, in the Search charm, under Apps, type SQL and then click SQL Server Management Studio option.
Select SQL Server Name and then click Connect.
In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.
Right-click Databases, and then click New Database.
In New Database, enter a database name = Sales.
Note: To create the database by accepting all default values, click OK; otherwise, continue with the following optional steps.
To change the owner name, click (...) and type short user name and then click Check Names.
Select another Name and then click OK.
To continue, click OK.
System displays new Database Owner Name.
To change the default values of the primary data and transaction log files, in the Database files grid, click the appropriate cell and enter the new value.
To specify the initial size of the data file, click Initial Size (MB) drop down list.
Make the data file as large as possible, based on the maximum amount of data you expect in the database.
To specify how the data file should grow, click (...) in the Autogrowth column.
To allow for the currently selected file to grow as more data space is required, select the Enable Autogrowth check box.
To specify that the file should grow by fixed increments, select In Megabytes and specify a value or else to specify that the file should grow by a percentage of the current file size, select In Percent and specify a value. For this example, I selected second option and defined 1 MB File Growth option.
To specify the maximum size the file should be able to grow to, select Limited to (MB) and specify a value or else, to allow for the file to grow as much as needed, select Unlimited. For this example, I selected second Unlimited option. Note: The maximum database size is determined by the amount of disk space available and the licensing limits determined by the version of SQL Server that you are using.