select [name] from sysdatabases order by name--得到数据库中所有的库名
select [name] from sysobjects where xtype='U'and [name]<>'dtproperties' order by [name]--得到数据库表中的列表
select [name] from sysobjects where xtype='V' and [name]<>'syssegments' and [name]<>'sysconstraints' order by [name]--视图
select [name] from sysobjects where xtype='P'and [name]<>'dtproperties' order by [name]--存储过程