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
SQL SERVER 2005 uses ALTER INDEX syntax to reindex database. SQL SERVER 2005 supports DBREINDEX but it will be deprecated in future versions. Let us learn how to do ReIndexing Database Tables and Update Statistics on Tables.
UPDATE: Please follow link for SQL SERVER – SHRINKFILE and TRUNCATE Log File in SQL Server 2008. Sometime, it looks impossible to shrink the Truncated Log file. Following code always shrinks the Truncated Log File to minimum size possible. USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY…Read More