PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > T-SQL to List Important SQL 2005 Objects
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
T-SQL to List Important SQL 2005 Objects

Réponse
 
LinkBack Outils de la discussion
Vieux 28/03/2008, 22h46   #1
Rubens
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut T-SQL to List Important SQL 2005 Objects

I am wondering if anyone has created T-SQL that lists various categories of SQL 2005 objects that quickly lists them. For example, if I wanted to see all the system objects that were related to triggers or if I wanted to see all objects related to constraints. Basically a breakdown of a lot of the useful objects a DBA can use for daily administration (indexes, database mail, SQL jobs, database mirroring etc. etc. etc.).

In essence I'm looking for something to arm me for my day-to-day tasks when its not always easy to remember all of the built-in views / proc's available to us. An example...

-- Display all mail related objects
select [name], type, type_desc
from msdb.sys.objects
where type in
(
'P', -- Stored Procedure
'V', -- View
'S', -- System Table
'U', -- User Table
'V' -- View
)
and [name] like '%mail%'
order by type, [name]

Thank-you,
Rubens

P.S. The reason I thought about this was because I came across sp_text which I had completely forgotten about and can be very useful to see how / what Microsoft is doing with some of their built-in code.
  Réponse avec citation
Vieux 30/03/2008, 10h32   #2
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: T-SQL to List Important SQL 2005 Objects

Rubens
select * from sys.tables

select * from sys.views

select * from sys.procedures







"Rubens" <rubensrose@hotmail.com> wrote in message news:%23Gos61RkIHA.5396@TK2MSFTNGP06.phx.gbl...
I am wondering if anyone has created T-SQL that lists various categories of SQL 2005 objects that quickly lists them. For example, if I wanted to see all the system objects that were related to triggers or if I wanted to see all objects related to constraints. Basically a breakdown of a lot of the useful objects a DBA can use for daily administration (indexes, database mail, SQL jobs, database mirroring etc. etc. etc.).

In essence I'm looking for something to arm me for my day-to-day tasks when its not always easy to remember all of the built-in views / proc's available to us. An example...

-- Display all mail related objects
select [name], type, type_desc
from msdb.sys.objects
where type in
(
'P', -- Stored Procedure
'V', -- View
'S', -- System Table
'U', -- User Table
'V' -- View
)
and [name] like '%mail%'
order by type, [name]

Thank-you,
Rubens

P.S. The reason I thought about this was because I came across sp_text which I had completely forgotten about and can be very useful to see how / what Microsoft is doing with some of their built-in code.
  Réponse avec citation
Vieux 30/03/2008, 15h48   #3
Rubens
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: T-SQL to List Important SQL 2005 Objects

Thank-you Uri. This isn't exactly what I was looking for but it will be a to search these views as well.

Rubens
"Uri Dimant" <urid@iscar.co.il> wrote in message news:eYasnikkIHA.980@TK2MSFTNGP06.phx.gbl...
Rubens
select * from sys.tables

select * from sys.views

select * from sys.procedures







"Rubens" <rubensrose@hotmail.com> wrote in message news:%23Gos61RkIHA.5396@TK2MSFTNGP06.phx.gbl...
I am wondering if anyone has created T-SQL that lists various categories of SQL 2005 objects that quickly lists them. For example, if I wanted to see all the system objects that were related to triggers or if I wanted to see all objects related to constraints. Basically a breakdown of a lot of the useful objects a DBA can use for daily administration (indexes, database mail, SQL jobs, database mirroring etc. etc. etc.).

In essence I'm looking for something to arm me for my day-to-day tasks when its not always easy to remember all of the built-in views / proc's available to us. An example...

-- Display all mail related objects
select [name], type, type_desc
from msdb.sys.objects
where type in
(
'P', -- Stored Procedure
'V', -- View
'S', -- System Table
'U', -- User Table
'V' -- View
)
and [name] like '%mail%'
order by type, [name]

Thank-you,
Rubens

P.S. The reason I thought about this was because I came across sp_text which I had completely forgotten about and can be very useful to see how / what Microsoft is doing with some of their built-in code.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h43.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08540 seconds with 11 queries