I don't have a mentor to ask so I am seeking direction from the DBA community. I am in charge of a SQL SERVER 2008 R2 and SQL Azure databases that are the resources for a website and an ERP system for a small company. I've already made the mistake of updating without having a WHERE statement (luckily it only affected a table w/ 30 rows). But with some table containing 20K+ rows, what is the proper way to update tables in SQL Server? Do I create a test DB copy and perform the update on that first (but this doesn't have the website or ERP connected to it, so I can see the
results in regards to those), or is the TRANSACTION function the direction I should study and learn wit it's ROLLBACK feature that seems might be the right way, Or maybe there is some other process all SQL SERVER DBA follow. Any and all advice will be appreciated.
SQL Server – Proper Way to Update a Table
azure-sql-databasesql-server-2008-r2update
Related Question
- Creating a Maintenance Plan for a SQL Azure Database
- Sql-server – Joining table from Linked Server is very slow
- SQL Server – Replication from Azure SQL Database to On-Premise SQL Server
- Sql-server – Unable to update MySQL table from linked server on SQL Server 2014
- Sql server deadlock when insert and update in one transaction
- Azure SQL Database – Fix Slow Connection with SQL Server Authentication
- Cannot set READ_COMMITTED_SNAPSHOT to OFF on Azure SQL
Best Answer
Study the following:
Then re-read this general technique: