Return to site

Turn Off Spell Check Sql Sever

broken image


Scenario:

Service broker is used for various purposes including database change notification etc and sometime we need to ensure that service broker is enabled for database or not, To check it use the following code snippet. Have them run spell check to identify the misspelled words. Gather up the bad records and create update statements from the db. Don't offshore applications where English spelling is important. EDIT: I should have pointed out, you might use the spell check to identify the issues but you want human eyes on the actual data as well as suggested fixes.

You are working as SQL Server / ETL developer. You need to load bunch of data to tables in SQL Server Database. Check Constraints are created on different tables. There are chances that the data you are going to load will not qualify according to Check Constraint. The business want you to load the data anyways even it does not qualify with Check Constraint. You want to temporary disable all the constraints in SQL Server database and then load the data and then re-enabled the Check Constraints.


Solution:

The below script can be used to generate Disable Check Constraint script for all the Check Constraints which are enabled in database. You can further filter the tables in where clause if you don't want to generate script for all the tables.

How to generate scripts to Disable all Check Constraints in SQL Server Database
Copy the results from DisableCheckConstraint column and run in SSMS to disable required Check Constraints.

Video Demo : How to generate scripts to disable all Check Constraints in SQL Server
Turn Off Spell Check Sql Sever

The 'sa' user is the default user created during the Microsoft SQL Server installation. You must always disable or rename the 'sa' user before handing the system to the operation team.

Sql Server Check Table Size

Running with rifles review. So, how do you check if the 'sa' user is renamed or disable.

Execute the following command line,

From the above screenshot, if the name is showing other than 'sa', it means the 'sa' user has been renamed. In this example, it has been renamed to 'opersys'. The 'is_disabled' value 1 means that the user is in disabled state, means you cannot use this user to login.

Check Sql Server Connection

Alternatively, use below command (no disabled status will be shown)





broken image