Failure inserting into the read-only column

At times when transferring data from one database to other using either Import Export wizard or using SQL Server Integration Services, you may encounter the following error:
Failure inserting into the read-only column .(SQL Server Import and Export Wizard)

T-SQL Script to Update Statistics

Index Statistics are important for query optimizer to generate optimal query plans. If indexes have outdated or stale statistics, your query's performance will suffer. It is important to update the statistics to make sure query optimizer always generates the best and...

T-SQL Script to Attach and Detach Databases

DBAs and Developers at times may need to detach and attach the databases for various reasons including the following: 1. Moving files to other drives 2. Server migration 2. Upgrades, 3. system maintenance, etc. This script takes away the headache of remembering the...

EXECUTE Query AT Remote Server

We use EXEC or EXECUTE command almost every day of our database life. Its a command that allows us execute Stored Procedures (extended, system, user, CLR, etc.)  and Functions. However, EXEC command also has a powerful feature that allows you to run any command remotely. Not many developers are aware of this feature. Historically, EXEC/EXECUTE executed commands locally, meaning if you have a SPROC you can only run that on your local instance of SQL Server. Thats changed now.

Running Antivirus on Production SQL Server

Running Antivirus software is critical part of server security but it is also important to understand the impact and effect it has on SQL Server. Imagine this: Youve installed Anti-Virus on a server that already has SQL Server running, once the server reboots, it is...

Use LOGON Triggers to Audit or Control Users

Ever felt the need for knowing who is logging on to your SQL Server and at what time? Ever felt the need to restrict specific users for certain time-period or firing a trace to track down user activity? Ever felt like limiting the number of concurrent connections for...

Best Protocol for Connecting to SQL Server

I often get this question from the community and my answer to this question depends based on your network environment whether you are on a local computer with no networks or whether you are on a Local Area Network or whether you are on a Wide Area Network. Ive tried...