devxlogo

SQL

Get a User that has Deleted Rows with SQL

Getting a user that has deleted rows with SQL is a multi-part process. First you have to search the transaction log file for information on deleted rows. SELECT [Transaction ID],

Restrict the Connection to a Database in SQL

You can restrict the connection to a database by specifying Single User mode, as shown below: USE master;GOALTER DATABASE YourDatabaseNameSET SINGLE_USERWITH ROLLBACK IMMEDIATE;GOALTER DATABASE YourDatabaseNameSET READ_ONLY;GOALTER DATABASE YourDatabaseNameSET MULTI_USER;GO This

The sp_spaceused Procedure in SQL

The sp_spaceused special SQL procedure displays the number of rows, disk space reserved, disk space used by a table, or indexed view in the current database. Here is a small