VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


어디서나 Microsoft SQL Server, Azure SQL Database 와 SQL Data Warehouse 를 개발할 수 있는 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql




  • Microsoft SQL Server, Azure SQL Database 및 SQL Data Warehouse 에 연결합니다.
  • 연결 프로필 및 가장 최근에 사용한 연결을 만들고 관리합니다.
  • IntelliSense, Go to Definition, T-SQL snippets, syntax colorizations, T-SQL 오류 유효성 검사 및 GO 배치 구분 기호로 T-SQL 스크립트 작성
  • 스크립트를 실행하고 사용하기 쉬운 그리드에서 결과를 봅니다.
  • 결과를 json 또는 csv 파일 형식으로 저장하고 편집기에서 봅니다.
  • 명령 단축키 등을 포함한 사용자 정의 가능한 확장 옵션.



  • First, install Visual Studio Code then install mssql extension by pressing F1 or ctrl+shift+p to open command palette, select Install Extension and type mssql.
  • Open an existing file with a .sql file extension or open a new text file (ctrl+n) and change the language mode to SQL by pressing ctrl+k,m and select SQLmssql commands and functionalities are enabled in the SQL language mode in Visual Studio Code editor.
  • Create a new connection profile using command palette by pressing F1, type sqlman to run MS SQL: Manage Connection Profile command. Select Create. See manage connection profiles for more information about how to create and edit connection profiles in your User Settings (settings.json) file.
  • Connect to a database by pressing F1 and type sqlcon to run MS SQL: Connnect command, then select a connection profile. You can also use a shortcut (ctrl+shift+c).
  • Write T-SQL script in the editor using IntelliSense and Snippets. Type sql in the editor to list T-SQL Snippets.
  • Execute T-SQL script or selection of statements in the script by pressing F1 and type sqlex to run MS SQL: Execute Query command. You can also use a shortcut (ctrl+shift+e). See customize shortcuts to learn about change shortcut key bindings to mssql commands.
  • View the T-SQL script execution results and messages in result view.

The extension provides several commands in the Command Palette for working with .sql files:

  • MS SQL: Connect to SQL Server, Azure SQL Database or SQL Data Warehouse using connection profiles or recent connections.
    • Create Connection Profile to create a new connection profile and connect.
  • MS SQL: Disconnect from SQL Server, Azure SQL Database or SQL Data Warehouse in the editor session.
  • MS SQL: Use Database to switch the database connection to another database within the same connected server in the editor session.
  • MS SQL: Execute Query script, T-SQL statements or batches in the editor.
  • MS SQL: Cancel Query execution in progress in the editor session.
  • MS SQL: Manage Connection Profiles
    • Create a new connection profile using command palette's step-by-step UI guide.
    • Edit user settings file (settings.json) in the editor to manually create, edit or remove connection profiles.
    • Remove an existing connection profile using command palette's step-by-step UI guide.
    • Clear Recent Connection List to clear the history of recent connections.

The following Visual Studio Code settings are available for the mssql extension. These can be set in user preferences (cmd+,) or workspace settings (.vscode/settings.json). See customize options and manage connection profilesfor more details.

{
    "mssql.maxRecentConnections": 5,
    "mssql.connections":[],
    "mssql.shortcuts": {
        "event.toggleResultPane": "ctrl+alt+r",
        "event.toggleMessagePane": "ctrl+alt+y",
        "event.prevGrid": "ctrl+up",
        "event.nextGrid": "ctrl+down",
        "event.copySelection": "ctrl+c",
        "event.maximizeGrid": "",
        "event.selectAll": "",
        "event.saveAsJSON": "",
        "event.saveAsCSV": "",
        "event.saveAsExcel": ""
    },
    "mssql.messagesDefaultOpen": true,
    "mssql.logDebugInfo": false,
    "mssql.saveAsCSV.includeHeaders": true,
    "mssql.intelliSense.enableIntelliSense": true,
    "mssql.intelliSense.enableErrorChecking": true,
    "mssql.intelliSense.enableSuggestions": true,
    "mssql.intelliSense.enableQuickInfo": true,
    "mssql.intelliSense.lowerCaseSuggestions": false,
    "mssql.resultsFontFamily": "-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,Ubuntu,Droid Sans,sans-serif",
    "mssql.resultsFontSize": 13,
    "mssql.copyIncludeHeaders": false,
    "mssql.copyRemoveNewLine" : true,
    "mssql.splitPaneSelection": "next",
    "mssql.format.alignColumnDefinitionsInColumns": false,
    "mssql.format.datatypeCasing": "none",
    "mssql.format.keywordCasing": "none",
    "mssql.format.placeCommasBeforeNextStatement": false,
    "mssql.format.placeSelectStatementReferencesOnNewLine": false,
    "mssql.applyLocalization": false,
    "mssql.query.displayBitAsNumber": true,
    "mssql.persistQueryResultTabs": false
}


VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


원격 파일(Azure, Dropbox, S3, SFTP, FTP or Slack 와 같은)을 로컬 파일 같이 처리하기 위한 멀티 프로토콜을 지원합니다.


링크 : https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-remote-workspace




새로운 Visual Studio Code FileSystem API 의 다중 프로토콜 지원. 특히 로컬 파일 같은 원격 파일 처리에 적합합니다.



GUI에서 .code-workspace를 사용하여 파일을 작성 (또는 갱신) 하고여십시오 File >> Open Workspace....

{
    "folders": [{
        "uri": "sftp://my-user:my-password@example.com?debug=1",
        "name": "My SFTP folder"
    }]
}

.code-workspace 파일을 만든 적이 없다면 홈 디렉토리의 새 폴더 (예 : "VSCodeworkspace")로 시작할 수 있습니다. 제공된 json 파일을 새 파일로 복사하십시오. 그런 다음 VSCode GUI 를 사용하여 해당 파일을 엽니다 File >> Open Workspace....

매개 변수는 key-value-pair 로 URI 의 설정이어야 하며 .code-workspace 파일의 settings 섹션에는 설정되지 않아야 합니다.

SFTP 연결의 debug 를 1설정하려면 다음과 같이하십시오 .

{
    "folders": [{
        "uri": "sftp://myUser:myPass@example.com?debug=1",
        "name": "My SFTP folder"
    }]
}

F1을 누르고 다음 명령 중 하나를 입력하십시오 :

NameDescriptionID
Remote Workspace: Execute 'git' Command ...git원격 작업 공간에서 CLI 도구를실행합니다 .extension.remote.workspace.executeGit
Remote Workspace: Execute Remote Command ...원격 작업 공간에서 명령을 실행합니다.extension.remote.workspace.executeRemoteCommmand
Remote Workspace: Open URI ...지원되는 URI가있는 새 작업 영역 폴더를 추가 / 열기합니다 .extension.remote.workspace.openURI
Remote Workspace: Receive Remote URI ...다른 편집기에서 원격 URI를받습니다.extension.remote.workspace.receiveWorkspaceURI
Remote Workspace: Reset Remote Command History ...마지막으로 실행 된 원격 명령의 모든 값을 재설정합니다.extension.remote.workspace.resetRemoteCommandHistory
Remote Workspace: Share Remote URI ...원격 URI를 다른 편집기와 공유합니다.extension.remote.workspace.sendWorkspaceURI

로그 파일은 .vscode-remote-workspace/.logs 사용자 홈 디렉토리의 하위 폴더에 하루 단위로 저장됩니다.


+ Recent posts