Sometimes in a production environment you may want to give developers read access to the text of the stored procedures but not be able to modify or execute them. In SQL Server 2005, you can grant VIEW DEFINITION permissions. Here are different ways to it
To grant view permissions to the entire schema
GRANTVIEW DEFINITION ONSCHEMA::dbo TO [UserName]
To grant permissions to specific stored procedure
GRANTVIEW DEFINITION ON YourStoredProcedureName TO [UserName]
To grant view definition on all the stored procedures in the database
Database snapshot is a read-only static database which provides the view of data at a point in time.Snapshots use the process of copy on write operation. If a page in the source database is modified for the first time, the original page is copied from the database to the snapshot. Updates after that don’t affect the contents of the snapshot.
Snapshots are very useful to off load historical reports from the OLTP systems. If mirroring is used for high availability, snapshots can be created on the mirror database.
SQL server management studio does not provide an option to create snapshots. The following T-SQL creates a snapshot named ProductSnap_0100 (0100 is the time stamp of when the database is created i.e. 1am) on the Products database with its sparse file named Products_data.ss.