• SqlLocalDB工具的一些有趣发现


    本文只是记录个人使用SqlLocalDB过程中的一些有趣现象,并不一定适用所有情况。关于SqlLocalDB的简介及相应命令行工具的具体使用,参见: SQL Server LocalDB 入门SqlLocalDB Utility

    1. 当本地安装多个版本的SQL Server LocalDB时,无法创建低版本的名为MSSQLLocalDB的默认实例(注: LocalDB的第一个版本是SQL Server 2012, 默认实例名是v11.0, 从SQL Server 2014开始,默认实例名修改成了MSSQLLocalDB), 也无法通过指定Version创建该默认实例。但是不指定Version或者通过SSMS连接(localdb)MSSQLLocalDB却可以创建该实例。
      C:>SqlLocalDB versions
      Microsoft SQL Server 2016 (13.1.4001.0)
      Microsoft SQL Server 2017 (14.0.1000.169)
      
      C:>SqlLocalDB info
      MSSQLLocalDB
      ProjectsV13
      
      C:>SqlLocalDB delete MSSQLLocalDB
      Delete of LocalDB instance "MSSQLLocalDB" failed because of the following error:
      The specified LocalDB instance does not exist.
      
      C:>SqlLocalDB create MSSQLLocalDB 13.1
      Creation of LocalDB instance "MSSQLLocalDB" failed because of the following error:
      The parameter for the LocalDB Instance API method is incorrect. Consult the API documentation.
      
      C:>SqlLocalDB create MSSQLLocalDB 13.1.4001.0
      Creation of LocalDB instance "MSSQLLocalDB" failed because of the following error:
      The parameter for the LocalDB Instance API method is incorrect. Consult the API documentation.
      
      C:>SqlLocalDB create MSSQLLocalDB 14.0
      Creation of LocalDB instance "MSSQLLocalDB" failed because of the following error:
      The parameter for the LocalDB Instance API method is incorrect. Consult the API documentation.
      
      C:>SqlLocalDB create MSSQLLocalDB 14.0.1000.169
      Creation of LocalDB instance "MSSQLLocalDB" failed because of the following error:
      The parameter for the LocalDB Instance API method is incorrect. Consult the API documentation.
      
      C:>SqlLocalDB create MSSQLLocalDB
      LocalDB instance "MSSQLLocalDB" created with version 14.0.1000.169.
      
    2. 虽然安装了多个版本的SQL Server LocalDB, 但是却不能创建同名实例,试着创建同名实例,返回消息也不一样。
      C:>SqlLocalDB create MyDataBase 13.1
      LocalDB instance "MyDataBase" created with version 13.1.4001.0.
      
      C:>SqlLocalDB create MyDataBase 14.0
      Creation of LocalDB instance "MyDataBase" failed because of the following error:
      Unable to create the LocalDB instance with specified version. An instance with the same name already exists, but it has lower version than the specified version.
      
      C:>SqlLocalDB create MySQLDB
      LocalDB instance "MySQLDB" created with version 14.0.1000.169.
      
      C:>SqlLocalDB create MySQLDB 13.1.4001.0
      LocalDB instance "MySQLDB" created with version 14.0.1000.169.
      
      C:>SqlLocalDB info
      MSSQLLocalDB
      MyDataBase
      MySQLDB
      ProjectsV13
      
      C:>SqlLocalDB info MyDataBase
      Name:               MyDataBase
      Version:            13.1.4001.0
      Shared name:
      Owner:              XXXXXXXXXX
      Auto-create:        No
      State:              Stopped
      Last start time:    2020/8/23 11:14:50
      Instance pipe name:
      
      C:>SqlLocalDB info MySQLDB
      Name:               MySQLDB
      Version:            14.0.1000.169
      Shared name:
      Owner:              XXXXXXXXXX
      Auto-create:        No
      State:              Stopped
      Last start time:    2020/8/23 11:15:42
      Instance pipe name:
      
    3. 无意中发现,原来CMD也支持管道,好吧, 认知再一次被刷新(另: 默认实例MSSQLLocalDBAuto-create属性是Yes, 其他的是No)!
      C:>SqlLocalDB info MSSQLLocalDB | sort
      Auto-create:        Yes
      Instance pipe name:
      Last start time:    2020/8/23 10:56:20
      Name:               MSSQLLocalDB
      Owner:              XXXXXXXXXX
      Shared name:
      State:              Stopped
      Version:            14.0.1000.169
      
      C:>SqlLocalDB info | sort
      MSSQLLocalDB
      MyDataBase
      MySQLDB
      ProjectsV13
      
  • 相关阅读:
    Autodesk Infrastructure Map Server 2012(MapGuide 2012) 最新特性介绍
    MapGuide Fusion Viewer API 如何获取Fusion对象
    MapGuide Fusion viewer中如何用Google Map/Yahoo Map/Bing Map做底图
    Visual Studio 2010开发AutoCAD 2012 .net 应用程序调试时断点不起作用
    MapGuide 用户调查关于RFC 111 Subversion
    MapGuide Enterprise 2011 授权错误的解决办法
    AutoCAD的定制开发接口(高级篇)专题培训材料介绍[转载]
    【转】Autodesk实验室从照片进行三维建模
    AutoCAD 2012最新特性概览
    Autodesk Map 3D 2012 新功能介绍
  • 原文地址:https://www.cnblogs.com/makesense/p/13548025.html
Copyright © 2020-2023  润新知