Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Database Structure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-16 : 09:43:10
Olivier writes "I enabled auditing/reporting of a sofware in a microsoft sql server. I need to purge periodically all data older than one month.
Unfortunately, there is not information about the database structure.

Is there a way with microsoft server to display a database structure ?
If not, do you have any idea how I could purge those data without knowing the database structure?

Regards,
Ol."

dsdeming

479 Posts

Posted - 2003-05-16 : 13:22:05
In Enterprise Manager you can open a database, right click on Diagrams and select New Diagram. The Wizard will walk you through the rest of the process. EM's diagrams aren't the best, but they'll do what you're looking for.

HTH

Go to Top of Page

pmr
Starting Member

37 Posts

Posted - 2003-05-16 : 13:47:48
This will display all of the non-system tables:

SELECT * FROM sysobjects WHERE xtype = 'u' AND name <> 'dtproperties'

Peter

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-16 : 14:08:14
Do you have SQL Server Client Tools?

If so you can script the entire database (if you have authority).

But your local friendly DBA should provide you with an ER Diagram.

Don't know how, but I see devlopers trying to write code with out knowing the db stuctures or constraints...

Just amazes me.



Brett

8-)
Go to Top of Page

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-05-16 : 15:33:33
Check out Graz's newest article about metadata (data about data, i.e. SQL Server's data listing it's objects)
http://www.sqlteam.com/item.asp?ItemID=13122

You will see how to use the Information_Schema views to see a database's objects and properties.

Sarah Berger MCSD
Go to Top of Page
   

- Advertisement -