Skip to main content

Posts

Showing posts from October, 2012

"Login failed" (Error 18456) error messages in SQL Server - Web links Compilation

Please check the link for a list of Error States explained in detail for the Logon Errors 18456 on SQL Server. http://sqlblog.com/blogs/aaron_bertrand/archive/2011/01/14/sql-server-v-next-denali-additional-states-for-error-18456.aspx http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx These are for now, and will add to this if there are any more useful found.

Databases that are Subscribers on an Instance

The following script was made as a requirement to check if there are databases that are subscribing in an instance.  This can be executed on any database.  Create table #TempTable ( DB varchar(100), Is_Subscriber varchar(10)); EXECUTE sp_MSforeachdb 'USE [?]; if exists (SELECT name FROM sys.sysobjects WHERE name = ''MSreplication_subscriptions' ')         begin insert into #TempTable values (db_name(), ''YES''); END' select * from #temptable drop table  #TempTable