SQL Editor
SQL Internals Viewer has a SQL Editor that includes a view on the Transaction Log. SQL can be run on a database and the affect on the structures displayed in the Allocation Map can be observed.
To open the SQL Editor click the SQL button on the toolbar or click View SQL Query Editor.
The SQL Editor has the following toolbar buttons:
- Execute (F5) Runs the selected SQL, if no SQL is selected everything is run
- New Clears the SQL in the editor
- Open Opens a .SQL script from file
- Save Save the current SQL script
- Cut, Copy, and Paste
- Transaction Log (See below)
Once a query has been executed the results are displayed at the bottom of the Editor with a Results and Messages tab. To toggle the results press Control-R.
Transaction Log
The Transaction Log button on the SQL Editor turns on the Transaction Log viewer for a query.
When the Transaction Log option is selected SQL Internals Viewer will include information from the database transaction log with the query results. Any changes to data caused by the query will show up on the transaction log and allocation map. The information displayed on the Transaction Log tab and has the following columns:
- LSN
- Operation
- Context
- Page
- Slot
- Allocation Unit
- Description
SQL Internals Viewer maps the pages in the transaction log to the Allocation Map displaying graphically which pages have been affected.
Pages can either be clicked on the Allocation Map or clicked from the Page or Slot column.
Note: For the Transaction Log viewer to work correctly there must be no other activity on the database.
Back to contents©Danny Gould 2008