Run CHECKDB against all databases

Set Nocount on
Declare @dbname varchar(100) 
Declare @servername varchar(100) 

Declare db Cursor For
        Select name from master.dbo.sysdatabases

Declare @osql varchar(1000)

select @servername = @@servername

Open db
Fetch Next from db into @dbname
While @@Fetch_status=0
    Begin
        Set @osql='DBCC Checkdb (['+@dbname+']) WITH PHYSICAL_ONLY'
        EXEC (@osql) --Execute the osql statement
        Fetch Next from db into @dbname    
    End
Close db

Deallocate db

GO