Showing posts with label sysdatabases. Show all posts
Showing posts with label sysdatabases. Show all posts

Monday, March 19, 2012

Datamodel behind System Tables

L.S.,
How can I find out what the datamodel is behind the System Tables
(SysColumns, SysObjects, SysDatabases, etc.). I once came across a question
about finding out what the default value for a certain column in a certain
table was. There was talk about doing some heavy parsing of the result set
after using stored procedure sp_help(text). And even then it was not sure
that the desired result would be achieved, they said, leaving one to the
choice of looking up the actual SQL code.
However, after looking up some documentation on the System Tables and
guessing from there on where I might find the desired information, I found
out that one may find the default value for a certain column in a certain
table (or any other object for that matter) in the SysComments table. It
would have been a lot easier to find this out if I had had a datamodel of
those System Tables. Now, before using ER Studio, I was wondering if this
datamodel exists and if so, if it could be shared with the community at large.
Many thanks in advance,
Wilfred Damhuis
P.S.: replies may be send to wdyttg@.rubycon.demon.nl
Does this help you:
http://www.microsoft.com/sql/techinf.../systables.asp
"Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
news:0B3B2E98-6C5E-45CD-BB2E-7E844B1D197F@.microsoft.com...
> L.S.,
> How can I find out what the datamodel is behind the System Tables
> (SysColumns, SysObjects, SysDatabases, etc.). I once came across a
question
> about finding out what the default value for a certain column in a certain
> table was. There was talk about doing some heavy parsing of the result set
> after using stored procedure sp_help(text). And even then it was not sure
> that the desired result would be achieved, they said, leaving one to the
> choice of looking up the actual SQL code.
> However, after looking up some documentation on the System Tables and
> guessing from there on where I might find the desired information, I found
> out that one may find the default value for a certain column in a certain
> table (or any other object for that matter) in the SysComments table. It
> would have been a lot easier to find this out if I had had a datamodel of
> those System Tables. Now, before using ER Studio, I was wondering if this
> datamodel exists and if so, if it could be shared with the community at
large.
> Many thanks in advance,
> Wilfred Damhuis
> P.S.: replies may be send to wdyttg@.rubycon.demon.nl
|||Adam,
thanks, not only for your swift response, but also for the indeed very
helpfull info. But is it just me or is this little known?
Regards,
Wilfred Dmahuis
"Adam Machanic" wrote:

> Does this help you:
> http://www.microsoft.com/sql/techinf.../systables.asp
>
> "Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
> news:0B3B2E98-6C5E-45CD-BB2E-7E844B1D197F@.microsoft.com...
> question
> large.
>
>
|||"Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
news:EE0D57A7-EF61-4856-99B1-66EFEA8CFD0B@.microsoft.com...
> helpfull info. But is it just me or is this little known?
I have no idea how well known it is (according to the text in the link,
it's "very popular") but I only discovered it last week

Datamodel behind System Tables

L.S.,
How can I find out what the datamodel is behind the System Tables
(SysColumns, SysObjects, SysDatabases, etc.). I once came across a question
about finding out what the default value for a certain column in a certain
table was. There was talk about doing some heavy parsing of the result set
after using stored procedure sp_help(text). And even then it was not sure
that the desired result would be achieved, they said, leaving one to the
choice of looking up the actual SQL code.
However, after looking up some documentation on the System Tables and
guessing from there on where I might find the desired information, I found
out that one may find the default value for a certain column in a certain
table (or any other object for that matter) in the SysComments table. It
would have been a lot easier to find this out if I had had a datamodel of
those System Tables. Now, before using ER Studio, I was wondering if this
datamodel exists and if so, if it could be shared with the community at large.
Many thanks in advance,
Wilfred Damhuis
P.S.: replies may be send to wdyttg@.rubycon.demon.nlDoes this help you:
http://www.microsoft.com/sql/techinfo/productdoc/2000/systables.asp
"Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
news:0B3B2E98-6C5E-45CD-BB2E-7E844B1D197F@.microsoft.com...
> L.S.,
> How can I find out what the datamodel is behind the System Tables
> (SysColumns, SysObjects, SysDatabases, etc.). I once came across a
question
> about finding out what the default value for a certain column in a certain
> table was. There was talk about doing some heavy parsing of the result set
> after using stored procedure sp_help(text). And even then it was not sure
> that the desired result would be achieved, they said, leaving one to the
> choice of looking up the actual SQL code.
> However, after looking up some documentation on the System Tables and
> guessing from there on where I might find the desired information, I found
> out that one may find the default value for a certain column in a certain
> table (or any other object for that matter) in the SysComments table. It
> would have been a lot easier to find this out if I had had a datamodel of
> those System Tables. Now, before using ER Studio, I was wondering if this
> datamodel exists and if so, if it could be shared with the community at
large.
> Many thanks in advance,
> Wilfred Damhuis
> P.S.: replies may be send to wdyttg@.rubycon.demon.nl|||Adam,
thanks, not only for your swift response, but also for the indeed very
helpfull info. But is it just me or is this little known?
Regards,
Wilfred Dmahuis
"Adam Machanic" wrote:
> Does this help you:
> http://www.microsoft.com/sql/techinfo/productdoc/2000/systables.asp
>
> "Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
> news:0B3B2E98-6C5E-45CD-BB2E-7E844B1D197F@.microsoft.com...
> > L.S.,
> >
> > How can I find out what the datamodel is behind the System Tables
> > (SysColumns, SysObjects, SysDatabases, etc.). I once came across a
> question
> > about finding out what the default value for a certain column in a certain
> > table was. There was talk about doing some heavy parsing of the result set
> > after using stored procedure sp_help(text). And even then it was not sure
> > that the desired result would be achieved, they said, leaving one to the
> > choice of looking up the actual SQL code.
> >
> > However, after looking up some documentation on the System Tables and
> > guessing from there on where I might find the desired information, I found
> > out that one may find the default value for a certain column in a certain
> > table (or any other object for that matter) in the SysComments table. It
> > would have been a lot easier to find this out if I had had a datamodel of
> > those System Tables. Now, before using ER Studio, I was wondering if this
> > datamodel exists and if so, if it could be shared with the community at
> large.
> >
> > Many thanks in advance,
> >
> > Wilfred Damhuis
> >
> > P.S.: replies may be send to wdyttg@.rubycon.demon.nl
>
>|||"Rubycon" <Rubycon@.discussions.microsoft.com> wrote in message
news:EE0D57A7-EF61-4856-99B1-66EFEA8CFD0B@.microsoft.com...
> helpfull info. But is it just me or is this little known?
I have no idea how well known it is (according to the text in the link,
it's "very popular") but I only discovered it last week :)

Sunday, February 26, 2012

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIA
<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm
,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIAMy guess is that you are connecting to different SQL Server instances.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
> I'm managing the back end SQL 2000 instance for a vendors application. Th
e
> application allows users to create databases on the fly for testing, etc.
> I opened the instance in Enterprise Manager, and noted that the number of
> databases had grown to about a dozen (other than the system databases). H
mm,
> so being concerned about drive space, etc, I executed a sp_helpdb.
> Yikes..only one of the dozen user databases showed in the listing for
> sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
> But in EM I can open any of the other 11 DB's, open tables from them, view
> options, etc etc. So I'm just curious, how can I view them in EM but they
> don't show in sysdatabases?
> TIA|||<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>|||Happens to all of us... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:DBD746A2-59BE-49C8-90A9-757086DA9412@.microsoft.com...[vbcol=seagreen]
> <*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
> "Tibor Karaszi" wrote:
>