For this tip let’s assume that we are changing the collation of every column in our database. If you read the following link,Set or Change the Column Collation, from TechNet you’ll notice that there are some
When you change collation of database, it will be new default for all new tables and columns, but it doesn't change the collation of existing objects inside database. You have to go and change manually the collation of every table and column. Luckily there are scripts available on the int...
To check the state of a database in SQL Server, you can use the following query: SELECT name, state_desc FROM sys.databases; This query will return a list of all the databases on your SQL Server instance and their current state. The state_desc column will show you the current state of...
Before going through the workaround to update the values in identity column, you have to understand that: You cannot update the value of the identity column in SQL Server using UPDATE statement. You can delete the existing column and re-insert it with a new identity value. The only way to...
[Sql server 2012] Change from vertical to horizontal table as dynamic @@FETCH_STATUS in nested loops @@ServerName returns wrong value in SQL SERVER 2008 ##TempTable and INSERT-SELECT FROM an existing Table with an IDENTITY column %rowtype equivalent in SQL server ++ operator in TSQL - bug ...
1. Using SQL Query ALTER TABLE table_name ADD column_name tada_type NOT NULL CONSTRAINT constraint_name DEFAULT default_value; If you set the new column nullable, that column value for all existing rows will be NULL instead of the default value. In that case, you can addWIT...
In order to avoid conflicts with the transactions used by replication, explicit transactions should not be used in custom procedures. The schema at the Subscriber is typically identical to the schema at the Publisher, but can also be a subset of the Publisher schema if column filtering is used...
Specify that the change should be propagated using an INSERT, UPDATE, or DELETE statement (the default for non-SQL Server Subscribers). Specify that a custom stored procedure should be used. Specify that this action should not be performed at any Subscriber. Tra...
Data validation was one of my top priorities from the start with SQL Spreads. I wanted to make sure this step was automatic, so that anytime I or a non-tech business user edited data, it would be checked against the data type in SQL Server, saving both time and headaches. ...
In SQL Server 2008 and later versions of SQL Server, nodes can be added and connected while activity is occurring in the system. If a topology includes SQL Server 2005 nodes, you can connect a new node to one existing node, but you must quiesce the system to connect to more than one ...