Sql Queries for getting the list of tables and Stored Procedure.

For Tables:

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES

For Stored Procedure:

Select [NAME] from sysobjects where type = 'P' and category = 0

For Views:

Select [NAME] from sysobjects where type = 'V' and category = 0