zoukankan      html  css  js  c++  java
  • SqlLocalDB 的一些常用命令行

    Once installed, you can interact with SqlLocalDb using the command line. The following will tell you the version of SqlLocalDb:

    C:> SqlLocalDb info

    Result:

    v11.0

    If you want to create an instance:

    C:> SqlLocalDb create "MyInstance"

    Result:

    LocalDB instance "MyInstance" created with version 11.0.

    To start the instance:

    C:> SqlLocalDb start "MyInstance"

    Result:

    LocalDB instance "MyInstance" started.

    You can also create an instance and start it in one command using the -s argument:

    C:> SqlLocalDb create "MyInstance" -s

    To stop and delete an instance, you can issue two commands:

    C:> SqlLocalDb stop   "MyInstance"
    C:> SqlLocalDb delete "MyInstance"

    If you try to just delete the instance without first stopping it, you will get this error:

    Delete of LocalDB instance "MyInstance" failed because of the following error:
    Requested operation on LocalDB instance cannot be performed because specified instance is currently in use. 
    Stop the instance and try again.

    To check on the status and other details about an instance, you can run:

    C:> SqlLocalDb info "MyInstance"


    当 "MyInstance" 建立后就可以使用连接字符串:Data Source=(LocalDb)PRJS;Initial Catalog=PCDT;Integrated Security=SSPI;AttachDBFilename=E:prjsPCDTdbPCDT.mdf
    来连接这个数据库实例。注意,最好不要使用默认的 v11.0 实例,PRJS 为新建的实例。
  • 相关阅读:
    manjora20安装搜狗输入法
    manjora20使用体验
    deepin20体验
    deepin20搜狗输入法使用
    deepin20使用snap并设置代理
    C#服务器端使用office组件
    华为多屏互动看学英语
    ThinkPad S5立体声混响以及语音识别
    mate10碎屏机当成小电脑使用尝试
    刷机错误ERROR:STATUS_BROM_CMD__FAIL
  • 原文地址:https://www.cnblogs.com/Koy/p/3597656.html
Copyright © 2011-2022 走看看