SQL SERVER – Fix : Error 701 There is insufficient system memory to run this query

Generic Solution: Check the settings for both min server memory (MB) and max server memory (MB). If max server memory (MB) is a value close to the value of min server memory (MB), then increase the max server memory (MB) value. Check the size of the virtual memory paging file.…
Read More

SQL SERVER – SQL Commandments – Suggestions, Tips, Tricks

Few days ago, while searching for something on web site, I came across a very good article of 25 SQL Commandments. I really enjoyed reading it. It was for Oracle, I re-wrote it for SQL Server. First 18 points are taken from original article and last 2 I added to…
Read More

SQL SERVER – DBCC command to RESEED Table Identity Value – Reset Table Identity

DBCC CHECKIDENT can reseed (reset) the identity value of the table. For example, YourTable has 25 rows with 25 as last identity. If we want next record to have identity as 35 we need to run following T SQL script in Query Analyzer. DBCC CHECKIDENT (yourtable, reseed, 34) If table…
Read More

SQL SERVER – FIX : Error 15023: User already exists in current database.

Error 15023: User already exists in current database. 1) This is the best Solution. First of all run following T-SQL Query in Query Analyzer. This will return all the existing users in database in result pan. USE YourDB GO EXEC sp_change_users_login 'Report' GO Run following T-SQL Query in Query Analyzer…
Read More