Add a connection in Server Explorer

Add new connections

The steps in this article show how to connect to a database in the Visual Studio IDE. You can use these steps to work directly with your data, such as execute queries, edit data, create and edit tables and other schema properties, edit stored procedures and functions, triggers, and so on. These functions are independent of the programming language or .NET version you are using.

You can test your connection to a database or service, and explore database contents and schemas, by using Server Explorer or SQL Server Object Explorer. The functionality of these windows overlaps to some extent. The basic differences are:

  • Server Explorer

    Installed by default in Visual Studio. Can be used to test connections and view SQL Server databases, any other databases that have an ADO.NET provider installed, and some Azure services. Also shows low-level objects such as system performance counters, event logs, and message queues. If a data source has no ADO.NET provider, it won't show up here, but you can still use it from Visual Studio by connecting programmatically.

  • SQL Server Object Explorer

    Installed with SQL Server Data Tools and visible under the View menu. If you don't see it there, go to Programs and Features in Control Panel, find Visual Studio, and then select Change to re-run the installer after selecting the check box for SQL Server Data Tools. Use SQL Server Object Explorer to view SQL databases (if they have an ADO.NET provider), create new databases, modify schemas, create stored procedures, retrieve connection strings, view the data, and more. SQL databases that have no ADO.NET provider installed won't show up here, but you can still connect to them programmatically.

Add a connection in Server Explorer

To create a connection to the database, click the Add Connection icon in Server Explorer, or right-click in Server Explorer on the Data Connections node and select Add Connection. From here, you can also connect to a database on another server, a SharePoint service, or an Azure service.

 

Connect using SQL Server Object Explorer

The experience might be easier if you use SQL Server Object Explorer, which gives you a dialog that provides more help in finding available databases locally, on the local network, and in your Azure subscriptions, and provides a history of recently used choices.

To access the connect dialog from SQL Server Object Explorer, click the toolbar button Add SQL Server.

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(25)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2018-11-28 单元测试的基本概念
2018-11-28 File.Copy的时候Could not find a part of the path
2018-11-28 xunit inlinedata classdata memberdata
2017-11-28 Adding Kentico controls to the Visual Studio toolbox
2015-11-28 git lfs
2015-11-28 使用git对unity3d项目进行版本控制
2015-11-28 从unity3d官网下载教程
点击右上角即可分享
微信分享提示