 |
| Home |
 |
| Events |
|
 |
| Services |
 |
| Resources |
 |
| Partners |
 |
| Communications |
 |
| Contact Us |
 |
 |
 |
|
 |
| SQL Scripts |
| If you're looking for Demo Scriptsfrom a specific event or you're looking for an upcoming event, use the links below. |
| Event Schedules and Event Resources:
Upcoming Events
Past Events
|
| Sample Scripts |
| The following are just a few of the more popular scripts taken from demos at conferences. Enjoy! |
Column List
This sample script will help you capture all columns as well as
adding an alias and properly "quoting" the column name using the QUOTENAME
function.
Column List.txt
Tabular Output for SHOWCONTIG
This sample script will help you manipulate the tabular data as returned by
DBCC SHOWCONTIG WITH TABLERESULTS - a new feature for SQL Server 2000. At a minimum, at least you won't need to figure out the table definition!
Showcontig with Tableresults.txt
Never Give Base Table Permissions
This sample script will help you to understand how to create stored
procedures to manipulate data - instead of granting base table permissions.
Additionally, you can see how triggers (especially INSTEAD OF triggers) can
help to prevent these to occur even if a Systems Administrator performs the
delete. No one can get past these accidentally!
DeleteASale-NeverGiveBaseTablePermissions.txt
Backup & Restore
This sample script will help you understand the right way to automate database settings in order to perform a batch operation using the BULK_LOGGED recovery model.
DB Alter for Batch Operation.txt
Index Maintenance
This sample script will help you to automate the process of rebuilding indexes using CREATE with DROP_EXISTING for the clustered indexes and DBCC DBREINDEX for the nonclustered. If you are trying to achieve high availability you should consider using DBCC INDEXDEFRAG instead.
sp_RebuildIndexes.txt
|
|