[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

View Error Log from T-Sql

Alex S

3/15/2007 5:58:00 PM

Is there a way to view error log from Query Analyzer?


Thank you


5 Answers

Tibor Karaszi

3/15/2007 8:32:00 PM

0

Google for sp_readerrorlog. It is undocumented and unsupported. Use at your own risk.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://sqlblog.com/blogs/tib...


"Alex S" <alexsdba@aol.com> wrote in message news:eP$RJuyZHHA.1400@TK2MSFTNGP06.phx.gbl...
> Is there a way to view error log from Query Analyzer?
>
>
> Thank you
>
>

AlterEgo

3/15/2007 8:37:00 PM

0

Alex,

Try this:

declare @Cmd varchar(8000)
drop table #t
create table #t (tID int identity (1,1), LogEntry varchar(8000))
set @Cmd = 'type "c:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\ERRORLOG"'
insert #t
exec master..xp_cmdshell @Cmd
select * from #t

-- Bill

"Alex S" <alexsdba@aol.com> wrote in message
news:eP$RJuyZHHA.1400@TK2MSFTNGP06.phx.gbl...
> Is there a way to view error log from Query Analyzer?
>
>
> Thank you
>


Hari

3/16/2007 1:05:00 AM

0

See the samples using the method Tibor mentioned.

http://vyaskn.tripod.com/sp_readerrorlog_undocu...

Thanks
Hari

"Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in
message news:uEJFsD0ZHHA.2448@TK2MSFTNGP02.phx.gbl...
> Google for sp_readerrorlog. It is undocumented and unsupported. Use at
> your own risk.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/d...
> http://sqlblog.com/blogs/tib...
>
>
> "Alex S" <alexsdba@aol.com> wrote in message
> news:eP$RJuyZHHA.1400@TK2MSFTNGP06.phx.gbl...
>> Is there a way to view error log from Query Analyzer?
>>
>>
>> Thank you


Rahul

3/16/2007 9:36:00 AM

0

On Mar 16, 6:04 am, "Hari Prasad" <hari_prasa...@hotmail.com> wrote:
> See the samples using the method Tibor mentioned.
>
> http://vyaskn.tripod.com/sp_readerrorlog_undocu...
>
> Thanks
> Hari
>
> "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com> wrote in
> messagenews:uEJFsD0ZHHA.2448@TK2MSFTNGP02.phx.gbl...
>
>
>
> > Google for sp_readerrorlog. It is undocumented and unsupported. Use at
> > your own risk.
>
> > --
> > Tibor Karaszi, SQL Server MVP
> >http://www.karaszi.com/sqlserver/d...
> >http://sqlblog.com/blogs/tib...
>
> > "Alex S" <alexs...@aol.com> wrote in message
> >news:eP$RJuyZHHA.1400@TK2MSFTNGP06.phx.gbl...
> >> Is there a way to view error log from Query Analyzer?
>
> >> Thank you- Hide quoted text -
>
> - Show quoted text -

declare @sql varchar(255)
set @sql = 'SQLSRVR' + '.master.dbo.xp_readerrorlog '
EXEC (@sql)

--Rahul

Alex S

3/16/2007 8:19:00 PM

0

THANK YOU ALL



"AlterEgo" <alterego55@dslextreme.com> wrote in message
news:eAWw4N0ZHHA.4808@TK2MSFTNGP04.phx.gbl...
> Alex,
>
> Try this:
>
> declare @Cmd varchar(8000)
> drop table #t
> create table #t (tID int identity (1,1), LogEntry varchar(8000))
> set @Cmd = 'type "c:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\LOG\ERRORLOG"'
> insert #t
> exec master..xp_cmdshell @Cmd
> select * from #t
>
> -- Bill
>
> "Alex S" <alexsdba@aol.com> wrote in message
> news:eP$RJuyZHHA.1400@TK2MSFTNGP06.phx.gbl...
>> Is there a way to view error log from Query Analyzer?
>>
>>
>> Thank you
>>
>
>