Solutions_dat_2 /var/opt/mssql/data/Solutions_dat_2.ndf Solutions_log /var/opt/mssql/data/Solutions_log.ldf Solutions /var/opt/mssql/data/Solutions.mdf We can check the result by running the following query: USE Solutions Can be specified in KB, MB, GB, TB, or %. FILEGROWTH The automatic growth increment of the file (the amount of space added to the file every time new space is required). Can be specified in KB, MB, GB, TB, or UNLIMITED. MAXSIZE The maximum file size to which the file can grow. the operating system’s path to the file). FILENAME This is the full physical path to the file (i.e. This is the logical name used in an instance of SQL Server when referencing the file. Here’s an explanation of the various arguments used in this example: NAME Specifies the logical file name. If you use Windows, you’ll need to use backslashes ( \) instead of forward slashes ( /). ![]() Note that this example uses Linux/Mac file paths. This adds a data file with a logical name of Solutions_dat_2, and with a physical path of /var/opt/mssql/data/Solutions_dat_2.ndf (this is the physical location on the computer). Here’s an example of adding a single data file to an existing database: USE master įILENAME = '/var/opt/mssql/data/Solutions_dat_2.ndf', This article contains examples of using T-SQL to add a data file to an existing database in SQL Server. However, you’re not restricted to just one of each file. You can add data files (and log files) to a database at a later date if required. When you create a database using the default options, one data file and one log file are created. In SQL Server, databases store their data and objects (such as tables, views, stored procedures, etc) in files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |