Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Friday, March 9, 2012

Does Database Exist?

How can I run a query to see if a database exists?
I see the queries like using the sysobjects and xtype to query
different table names and stored procs...but can I use something
similar to see if a database exists?
Something along the lines of: if exists(Select * from sysobjects where
xtype = 'database' Where database name = 'Client1DB')?IF DB_ID('foo') IS NULL
PRINT 'does not exist';
ELSE
PRINT 'exists';
"INeedADip" <ineedadip@.gmail.com> wrote in message
news:1151520416.422554.20030@.j72g2000cwa.googlegroups.com...
> How can I run a query to see if a database exists?
> I see the queries like using the sysobjects and xtype to query
> different table names and stored procs...but can I use something
> similar to see if a database exists?
> Something along the lines of: if exists(Select * from sysobjects where
> xtype = 'database' Where database name = 'Client1DB')?
>|||Thanks.

Sunday, February 19, 2012

Documenting MSDE

Can anyone tell me what methods are there for documenting the tables created
in MSDE.
I would like something that would give me the field names, data type, size
etc and also be able to list the indices.
Any suggestions?
June
FMS (http://www.fmsinc.com) makes a reporting tool called Total SQL
Analyzer. They're a reputable company and have been around for a
while. There may be other third-party solutions as well if you don't
want to write your own.
--Mary
On Wed, 26 May 2004 13:12:02 +0100, "June Macleod"
<junework@.hotmail.com> wrote:

>Can anyone tell me what methods are there for documenting the tables created
>in MSDE.
>I would like something that would give me the field names, data type, size
>etc and also be able to list the indices.
>Any suggestions?
>June
>
|||hi June,
"June Macleod" <junework@.hotmail.com> ha scritto nel messaggio
news:%23c4RHpxQEHA.3744@.TK2MSFTNGP10.phx.gbl...
> Can anyone tell me what methods are there for documenting the tables
created
> in MSDE.
> I would like something that would give me the field names, data type, size
> etc and also be able to list the indices.
you can have a look at a free prj of mine, at the link following my sign.,
which provide a way to produce an HTML documentation with cross references
for this kind of thing...
or commercial tools like http://www.ag-software.com/ags_scribe_index.aspx
hth
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks Andrea
Obviously I am going blind in my old age <g>
This is a cracker of a tool! The documentation is exactly what I am looking
for and will save me hours of time.
Much appreciated.
June
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2i1kskFi58j8U1@.uni-berlin.de...[vbcol=seagreen]
> hi June,
> "June Macleod" <junework@.hotmail.com> ha scritto nel messaggio
> news:OXGnIywREHA.3056@.TK2MSFTNGP11.phx.gbl...
documentaion[vbcol=seagreen]
was
> select the databese you want to document in the left pane treeview...
> right-click... select the "Database documentation" menu item...
> hope will meet your requirements..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>