Access denied CREATE DATABASE LocalDB

后端 未结 2 1936
别那么骄傲
别那么骄傲 2021-01-19 10:29

I installed SSMS 18. I installed a new LocalDB instance by choosing it from the SQL Server Express 2017 installation as it is not yet included in the SSMS 18 installation.

2条回答
  •  遥遥无期
    2021-01-19 10:52

    I can't see the images due my shop's policies, but I think that you can achieve your goal in 2 ways.

    In SSMS right click the server name and select properties, then go to "database settings" there's a section named "Database default locations" modify to meet your requirements.

    As a second option is to specify the datafiles explicity like:

    CREATE DATABASE [test]
      ON  PRIMARY 
    ( NAME = N'test', FILENAME = N'c:\mypath\test.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
     LOG ON 
    ( NAME = N'test_log', FILENAME = N'c:\mypath\test_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB )
    

提交回复
热议问题