I’ve grown up reading Tom Clancy and probably most of you have at least seen Red October, so this book caught my eye when browsing used books for a recent trip. It’s a fairly human look at what’s involved in sailing on a Trident missile submarine…
How can you find if this statement is used in the script? To perform this task you should use newly added rule MI008 “Statement used”
Second – you must specify which statement you want to catch.
Each statement (and event most parts of statement) can be identified by tag. Full list of tag is pretty big and I’m not yet ready to publish it. But here are some of tags:
CREATE INDEX: index-statement
DROP INDEX: drop-index
CREATE TABLE: create-statement-table
DROP TABLE: drop-table
TRUNCATE TABLE: truncate-table
DECLARE CURSOR: cursor-declaration
If you need more tags please contact me, i’ll help you.
Ok, imagine that you want to catch DECLARE CURSOR and CREATE TABLE statements
You need to add appropriate tags to MI008 Statements list on “Options” tab of Settings window, one tag per line.
Now you can process script or database to find if statements you find is really used.
Column “Additional info” of issues list will contain tag of found statement.
That’s all, folks!