473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System catalog tables?

Hello,

I am relatively new to SQL Server, although I have used Oracle
extensively.

In Oracle, there are system tables that you can query in order to get
a list of all schemas and all the tables in them. Is there a similar
concept in SQLServer? How would I find about the system dictionary
tables?

TIA :-)
Jul 20 '05 #1
2 11119
php newbie (ne**********@yahoo.com) writes:
I am relatively new to SQL Server, although I have used Oracle
extensively.

In Oracle, there are system tables that you can query in order to get
a list of all schemas and all the tables in them. Is there a similar
concept in SQLServer? How would I find about the system dictionary
tables?


Yes, there are. They are documented in Books Online. Beware that not
all tables are documented, and not all columns in the documented tables
are docuemented. You should stick to the documented tables and columns.

In the next version of SQL Server, Microsoft is reworking how they
store metadata, and there will be a new interface for system data.
The current system tables will remain as legacy views.

Note also that Microsoft offers a set of property functions through
which you can retrieve information about various objects. There
are objectproperty(), indexproperty(), databasepropertyex() to name
a few. Again, look in Books Online.

Finally, MS SQL Server implements the INFORMATTION_SCHEMA views which
are ANSI standard for metadata. Many people are fond of these, I am not.
The problem with them is that they are incomplete, so you still need
to query system tables anyway. They are good for portability though.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
php newbie wrote:

Hello,

I am relatively new to SQL Server, although I have used Oracle
extensively.

In Oracle, there are system tables that you can query in order to get
a list of all schemas and all the tables in them. Is there a similar
concept in SQLServer? How would I find about the system dictionary
tables?

TIA :-)


If you are used to Oracle, then you are used to the DBA_* views, etc.
SQL Server does have data dictionary tables, but they are different.
First, each database in SQL Server has data dictionary tables (they
start with "sys"). You can look up each view in Books OnLine. For
instance, in Query Analyzer to get a list of all tables, use the
following query:

use Northwind
go
SELECT name FROM sysobjects WHERE xtype='U'

That data dictionary query will only give you the tables in the
Northwind database. Each database has similar tables.

The "master" database also has data dictionary tables. These tables are
from a instance-wide perspective. So if you need instance-wide
information, look here.

HTH,
Brian

--
================================================== =================

Brian Peasland
dba@remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.
"I can give it to you cheap, quick, and good. Now pick two out of
the three"
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
9741
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
4
4611
by: Uttam | last post by:
Hello, Could someone point me to the syntax required to detected whether a particular table (say tbl1) and a particular Query (Qry1) exists in the catalog? Thank you in advance. Cheers!
6
6073
by: Tony | last post by:
Dear All, When I run an example program on the http://www.dotnetjunkies.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/data/datagrid1.src&file=VB\datagrid1.aspx&font=3 ...
1
6776
by: Luis Esteban Valencia | last post by:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source...
0
3084
by: SampathTangudu | last post by:
Hi, We are trying to use the Hash Tables for passing information from one aspx page to another aspx page. We are using the below code. IsolatedStorageFile isoStore =...
3
11301
by: reachsamdurai | last post by:
Is it possible to determine the list of child/parent tables for a particular table from any system catalog tables? Using the syscat.tables I'm able to retrieve the no of dependent parent/child...
1
2253
by: TGEAR | last post by:
I am using MS SQL Server management studio. I treid to see some system tables which are sysobjects, syscolumns, systypes, etc.., but i don't see the list under the system tables folder. There is...
5
5381
by: Sam Durai | last post by:
Do db2 system catalog table require maintenance (reorg/runstat) ? Thanks, Sam
1
2755
by: awesomewebsitesforyou | last post by:
Learn DB2 system catalog tables http://db2examples.googlepages.com/systemcatalogtables
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.