Tag Info

Hot answers tagged

2

Instead of using "Copy-and-paste" to copy from the user-interface; use a T-SQL script to copy the rows from one table to another. Setup a test-bed with two tables, one will be the source, the other the destination: USE tempdb; CREATE TABLE dbo.StatusTable1 ( StatusNumber NUMERIC(18,10) ); CREATE TABLE dbo.StatusTable2 ( StatusNumber NUMERIC(28,2) ...


2

For the unused stored procedures you can make use of dmv's especially sys.dm_exec_procedure_stat. To find unused stored procs, please see the answer as explained by Aaron Bertrand. Also, there is an good read to identify as explained here in the article How to find unused Stored Procedures in SQL Server 2005/2008 To tack down unused views: a) ...


1

Version store basically cause from long running transaction or high transaction throughput. You need to look for the queries which are causing this. Other than that version store is used in following conditions: Row version which are generated by data modification transactions for features (MARS, online indexes, AFTER trigger etc) Row version which are ...


1

How to rename sa to new_sa in SQL Server 2000? How to do and what is the impact I'm not sure how to rename sa in SQL 2000 or even if you can that far back. SA rename impact in SQL Server 2005, 2008, 2008R2, 2012, 2014, Express Edition I have heard of this as a best practice from some people. To the best of my knowledge there is no effect other than trying ...


1

I love Aaron Bertrand's answer. Although I don't understand it completely, it looks really elegant. In the past I've ran into problems with permissions when using sys.objects. Combined with the need for me to troubleshoot the code, I've come up with a variation on Aaron's code, and added it below. This is my procedure: CREATE PROCEDURE ...


1

You will almost always be susceptible to vendor updates when it comes to schema changes and their app, especially when it comes to ERP applications such as SAP Business One or it's bigger brother. The issue is how will their update scripts react to your table being added/modified? Usually it's not a big deal for me but sometimes it could cause massive ...


1

Index Scan scans each and every record in the index. Table Scan is where the table is processed row by row from beginning to end. If the index is a clustered index then an index scan is really a table scan. Since a scan touches every row in the table whether or not it qualifies, the cost is proportional to the total number of rows in the table. Index Seek: ...



Only top voted, non community-wiki answers of a minimum length are eligible