ssms中怎么设置自增

This article explains the process of defining custom color codes for SQL Server connections in SSMS.

本文介绍了在SSMS中为SQL Server连接定义自定义颜色代码的过程。

介绍 (Introduction)

DBAs or developers might work simultaneously with different environments such as production, UAT, staging, development. Sometimes, you might execute a query in a different environment in case you miss to check the environment. We should always be careful as accidentally query execution might put you in trouble. For example, in a development environment, we might drop a few objects without worrying much. If the same object exists in the production database as well and you accidentally run the query in production, you are in big trouble.

DBA或开发人员可能会同时使用不同的环境,例如生产,UAT,登台,开发。 有时,您可能会在其他环境中执行查询,以防您错过检查该环境的机会。 我们应该始终小心,因为意外执行查询可能会给您带来麻烦。 例如,在开发环境中,我们可以放一些对象而不必担心。 如果生产数据库中也存在相同的对象,而您在生产中不小心运行了查询,则将遇到很大麻烦。

指定SSMS连接的自定义颜色 (Specify custom colors for SSMS connection)

Be careful while running any query. You can verify the connected instance using the status bar of SSMS. Each new query window provides the connection details.

运行任何查询时请小心。 您可以使用SSMS的状态栏来验证连接的实例。 每个新的查询窗口均提供连接详细信息。

In the following screenshot, we verify connected SQL instance as well as an authenticated user:

在以下屏幕截图中,我们将验证连接SQL实例以及经过身份验证的用户:

SSMS provides a solution for us to determine the environment as per the environment color coding. For example, we can set a red color for production, yellow for development, etc.

SSMS为我们提供了一种根据环境颜色编码确定环境的解决方案。 例如,我们可以为生产设置红色,为开发设置黄色,等等。

Usually, we launch SSMS, specify the SQL instance, and connect to the respective SQL Server.

通常,我们启动SSMS,指定SQL实例,然后连接到相应SQL Server。

Click on Options, and you get various configuration tabs in SSMS.

单击选项,您将在SSMS中获得各种配置选项卡。

Let’ have a quick overview of these tabs of SSMS:

让我们快速浏览一下SSMS的以下标签:

  • Login: It is the default connection window of SSMS. We specify the following configurations: 登录 :这是SSMS的默认连接窗口。 我们指定以下配置:

    • Server type: Type of the SQL Service we want to connect, such as database engine, Analysis Service, Integration services, and reporting services 服务器类型:我们要连接SQL服务的类型,例如数据库引擎,Analysis Service,集成服务和报告服务
    • Server Name: It is the SQL instance name. For a default instance, we can specify a dot(.) or MSSQLSERVER. For a named instance, enter the SQL instance in the format of [Server\SQLInstance]. If you use a SQL port other than the default, specify that port number as well as [Server\SQLInstance:Port] 服务器名称:这是SQL实例名称。 对于默认实例,我们可以指定点(。)或MSSQLSERVER。 对于命名实例,以[Server \ SQLInstance]格式输入SQL实例。 如果使用默认端口以外SQL端口,请指定该端口号以及[Server \ SQLInstance:Port]
    • Authentication: We can choose the authentication mechanism, either Windows or SQL authentication. For SQL authentication, specify SQL user and password details 身份验证:我们可以选择Windows或SQL身份验证两种身份验证机制。 对于SQL身份验证,请指定SQL用户和密码详细信息
  • Always Encrypted: We use this option if using SQL Server Always Encrypted feature 始终加密:如果使用“ SQL Server始终加密”功能,则使用此选项
  • Additional Connection parameters 其他连接参数
  • Connection Properties: In this connection properties, We can use the following optional configurations

    连接属性:在此连接属性中,我们可以使用以下可选配置

    • Connect to database: If we want to connect to a specific database, we can use this option, browse the server and select the required database. If we do not specify any database, the user gets a connection to the default database specified in the SQL logins

      连接到数据库:如果要连接到特定数据库,则可以使用此选项,浏览服务器并选择所需的数据库。 如果我们不指定任何数据库,则用户将连接到SQL登录名中指定的默认数据库

    • Network protocol and network packet sizes: Here, we can choose the network protocol and packet size. You should change this property only on specific requirements 网络协议和网络数据包大小:在这里,我们可以选择网络协议和数据包大小。 您仅应在特定要求下更改此属性
    • Connection time out and execution time out: We can configure the connection and execution time outs value in seconds in these values 连接超时和执行超时:我们可以在这些值中以秒为单位配置连接和执行超时值
    • Encrypt connection: if we use encrypted SQL connections, we can put a tick on this. Your SQL instance should be configured for the encrypted connection before using this option 加密连接:如果我们使用加密SQL连接,则可以在此打勾。 使用此选项之前,应为加密连接配置SQL实例
    • Use Custom color: Usually, we do not use this option much, but it can prevent us from accidental query execution in the wrong SQL instance 使用自定义颜色:通常,我们很少使用此选项,但是它可以防止我们在错误SQL实例中意外执行查询

Put a check on Use custom color and select a color from the available colors:

选中“使用自定义颜色”,然后从可用颜色中选择一种颜色:

Now, connect the database instance and view the query pane. Notice the difference. You get a custom color code for the status bar. This way, you can easily visualize that this connection belongs to a production SQL instance. Similarly, you can configure color codes for other databases while connecting using SSMS:

现在,连接数据库实例并查看查询窗格。 注意差异。 您将获得状态栏的自定义颜色代码。 这样,您可以轻松地形象地看到此连接属于生产SQL实例。 同样,您可以在使用SSMS连接时为其他数据库配置颜色代码:

本地服务器组和自定义状态栏颜色 (Local Server groups and custom status bar color)

In the previous step, we specified the custom status bar color while connecting it using SSMS. Usually, DBAs register the supported SQL instances using the local server groups. We can create multiple server groups in various groups such as application group, environment group depending upon an individual’s requirements.

在上一步中,我们在使用SSMS连接自定义状态栏颜色时指定了该颜色。 通常,DBA使用本地服务器组注册受支持SQL实例。 我们可以根据个人的需求在不同的组(例如应用程序组,环境组)中创建多个服务器组。

We can click on the Local Server Groups from the registered servers, as shown below:

我们可以从注册的服务器上单击本地服务器组 ,如下所示:

Right-click on the Local Server Groups and click on the New Server Group. Specify the group name (mandatory) and group description (optional):

右键单击本地服务器组 ,然后单击新服务器组。 指定组名(必填)和组描述(可选):

Similarly, create another group Staging:

同样,创建另一个组暂存:

We have two local server groups, as shown below:

我们有两个本地服务器组,如下所示:

We can register the servers in the individual group. To register a server, right-click on the group name and click New Server Registration:

我们可以在各个组中注册服务器。 要注册服务器,请右键单击组名,然后单击“ 新服务器注册”

It opens the SSMS connection window. We can define the SQL Server connection along with server color coding. Save the connection, and it reflects in the corresponding server group:

它打开SSMS连接窗口。 我们可以定义SQL Server连接以及服务器颜色编码。 保存连接,它反映在相应的服务器组中:

In the following screenshot, we see both production and staging local server group contains server registered. We have defined different color codes for the ribbon bar while saving the connection. The benefit of using a local server group is that it is a one-time activity. Once we have defined connection properties, we can easily connect to that instance group without any additional configurations:

在以下屏幕截图中,我们看到生产和暂存本地服务器组都包含已注册的服务器。 保存连接时,我们为功能区栏定义了不同的颜色代码。 使用本地服务器组的好处是它是一次性活动。 定义连接属性后,无需任何其他配置即可轻松连接到该实例组:

Now, connect to servers from both production and staging local server groups. Open a new query window in both connections and notice the different color codes for both instances:

现在,从生产和暂存本地服务器组连接到服务器。 在两个连接中打开一个新的查询窗口,并注意两个实例的不同颜色代码:

重要事项 (Important points)

  • We can customize color codes for the database engine connections. We cannot use it for Analysis Services, Reporting Services, and Integration 我们可以为数据库引擎连接定制颜色代码。 我们不能将其用于Analysis Services,Reporting Services和集成
  • Ribbon bar color codes is a local SSMS feature. If you use different SSMS, you will get default color codes 色带条颜色代码是本地SSMS功能。 如果您使用其他SSMS,则会获得默认的颜色代码
  • You should use different colors for a separate environment to avoid any confusion 您应该在单独的环境中使用不同的颜色,以避免造成混淆

结论 (Conclusion)

You might have heard a famous saying – “Prevention Is Better Than Cure”. It applies to databases as well. You should always check the connections before executing a query. You can also use this article reference for customizing the ribbon bar color codes as per the environment in SSMS.

您可能已经听过一句名言:“预防胜于治疗”。 它也适用于数据库。 在执行查询之前,应始终检查连接。 您还可以根据SSMS中的环境使用本文参考来自定义功能区颜色代码。

翻译自: https://www.sqlshack.com/how-to-set-custom-colors-in-the-ssms-status-bar/

ssms中怎么设置自增

ssms中怎么设置自增_如何在SSMS状态栏中设置自定义颜色相关推荐

  1. pads中如何设置等长_如何在Windows 10中设置和使用Hyper-V进行OS虚拟化

    信息 Windows 10 Pro,Education和Enterprise版本带有内置的虚拟机管理程序客户端Hyper-V,允许用户在虚拟机上创建和运行其他操作系统.尽管Hyper-V主要是为运行W ...

  2. pads中如何设置等长_如何在SQL Server中设置扩展,监控系统性能

    dbForge Studio for SQL Server为有效的探索.分析SQL Server数据库中的大型数据集提供全面的解决方案,并设计各种报表以帮助作出合理的决策. dbForge Studi ...

  3. comsol如何设置距离梯度_如何在 COMSOL 软件中设置“优质的”CFD 网格

    计算流体力学(CFD)模型的质量通常由求解问题时所采用的网格质量决定.优质的网格有助于模型收敛.降低内存需求,最终得到精确的解.因此,在求解 CFD 问题时,值得我们投入时间和精力认真创建网格.在本篇 ...

  4. python怎么设置画布颜色_如何在kivy python中动态更改画布颜色?

    解决方案 提供颜色的模式(rgb,rgba).将颜色(铅笔色)替换为颜色(rgba=pencolor) 详情请参考下面的演示.笔的颜色从红色开始变为白色,即按钮的背景色.在 示例 在主.py在from ...

  5. matlab中的方波信号图片_如何在MATLAB R2019b中导出simulink的各种图片

    大家好,这里是玉树的MATLAB小知识讲堂. 今天给大家带来的是,如何在高版本MATLAB(R2018以上)的simulink中,导出我们想要的高清图片. 在做课题作业时,我发现网络中关于导出simu ...

  6. 怎样在表格中选出同一类_如何在excel表格中同一个框选择下一行 - 卡饭网

    在excel表格中怎样设置选择下拉列表? 在excel表格中怎样设置选择下拉列表? 在excel表格制作中,经常会遇到固定选项输入,例如性别( 男  女),婚否(是, 否),在制作考勤表的时候也可以利 ...

  7. echarts中x轴文件消失_实测实例:labview中波形图X轴刻度任意刻度设置

    学习labview中,做了一个波形图,X轴为时间,Y轴为其他位移压力温度变量,X轴最大值是一个变量,可以手动输入,所以最早选择了--刻度间隔---均匀,起初做模拟,设置时间300小时(1080000秒 ...

  8. 如何在cad中导入谷歌地图_如何在Google地图中设置出发和到达时间

    如何在cad中导入谷歌地图 Unless you work from home, Google Maps is fantastic at knowing where you need to be, a ...

  9. textpad设置Java版本_如何在textpad中保存设置以显示行号?

    作为Pramod对在 Configure > Preferences > General > Allow multiple instances to run 选中此框的用户的回答,您 ...

最新文章

  1. 让Windows 7揪出每一个暗中运行程序
  2. 20189222 《网络攻防实践》 第四周作业
  3. C 语言精髓之变参函数
  4. 【CodeForces - 266B 】Queue at the School (模拟)
  5. Nginx模块开发—Nginx代码规范
  6. 我的一些学习经验:视频流媒体方面
  7. ubuntu16.04安装cuda11.3、cudnn8.2.1、tensorrt8.0.3.4全过程
  8. Word2003和2007如何隐藏去掉回车符
  9. 利用自己的祖源成分结果画祖源成分饼图
  10. FireEye 网络攻击危害红队安全工具
  11. HTML caption文字颜色,HTML caption align 属性 - HTML 颜色参考手册 - 自强学堂
  12. WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK!的分析
  13. 我写了一个套路,助你随心所欲运用二分搜索
  14. 《数据结构与算法 Python语言实现》书评与学习心得
  15. 基于肤色高斯概率模型的人脸检测
  16. Mysql-DATE_FORMAT()日期格式
  17. 信息系统项目管理师 第七章-项目成本管理
  18. leetcode 1. 黑白方格画
  19. python下载ASF的sentinel1数据
  20. python 与Mysql ,Mongodb以及Redis的交互

热门文章

  1. #C++初学记录(素数判断)
  2. Python list 初始化技巧
  3. 玩转jquery插件之flexigrid 【转】
  4. Linux下软件安装和删除的命令
  5. springMVC 格式转换
  6. pytorch 归一化_用PyTorch进行语义分割
  7. 对象已死?及其判断算法
  8. 让你每天抽出两小时陪小孩子读书,你能坚持吗?
  9. 为什么有些人看起来年纪轻轻,但思想深度和高度却远高于常人?
  10. 让你难忘的一段情感故事是什么?