Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Scripts by Rafal Skotak
SQLServerCentral.com profile
Items 1 to 18 of 18
Kill all connection to database
Procedure tries to kill all connections to the specified database.
Read more...
By
Rafal Skotak
2011/03/01
|
Source:
SQLServerCentral.com
|
Category:
sql server 2005
Rating:
|
Discuss
|
Briefcase
|
3,694 reads
Compare databases structure
This procedure is supposed to compare structure (tables, procedures, triggers, foraign keys etc.) of two specified databases.
Read more...
By
Rafal Skotak
2008/10/27
|
Source:
SQLServerCentral.com
|
Category:
sql server 2005
Rating:
|
Discuss
|
Briefcase
|
2,641 reads
Row count and space used for all tables in database (update)
This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).
Read more...
By
Rafal Skotak
2011/05/25
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
9,730 reads
Select from stored procedure
This terse script shows an easy (but "dirty" - so not advisable for production environments - rather for personal use) way to select data from stored procedure.
Read more...
By
Rafal Skotak
2011/12/14
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
3,944 reads
Generating number sequences with Common Table Expressions
The script shows one of ways generating number sequence - this one uses CTE.
Read more...
By
Rafal Skotak
2011/10/04
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
1,728 reads
Generating permutations - procedure
This procedure prepares a query for generating permutations of n-numbers set and executes it.
Read more...
By
Rafal Skotak
2008/03/18
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
870 reads
Clear database - delete all records from a database (updated)
The procedure below deletes all records from the specified database's(except master, model, msdb and tempdb) tables (except those from the schema 'sys').
Read more...
By
Rafal Skotak
2011/12/09
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
3,959 reads
Search for a text in all databases
This procedure searches for a specified text in all (or one selected) databases in all (or selected) tables.
Read more...
By
Rafal Skotak
2011/03/02
|
Source:
SQLServerCentral.com
|
Category:
sql server 2005
Rating:
|
Discuss
|
Briefcase
|
4,661 reads
Search for a specified GUID (or its part) in all databases (updated)
This procedure searches for the specified GUID (or its part) in all (or selected one) databases
Read more...
By
Rafal Skotak
2008/03/06
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
718 reads
Sorted views in 2005 and TOP clause
These examples show how You can circumvent the problem with not working TOP 100 PERCENT and ORDER BY in views.
Read more...
By
Rafal Skotak
2008/02/22
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
1,230 reads
Show all database's tables' columns' collations.
Created view displays all text columns' collations in the current database with the information whether the collation is different from the database's one.
Read more...
By
Rafal Skotak
2008/04/04
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
1,491 reads
Generating combinations 'm elements from n-element set'
This procedure generates a dataset with combinations of elements_to_select taken from number_of_values element set. It prints also the prepared query.
Read more...
By
Rafal Skotak
2008/04/01
|
Source:
SQLServerCentral.com
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
1,080 reads
Generating permutations
This script shows one on ways of generating permutations.
Read more...
By
Rafal Skotak
2008/02/27
|
Category:
miscellaneous
Rating:
|
Discuss
|
Briefcase
|
965 reads
Random varchars
This procedure generates a list of random varchars (8 charactes length, only letters - lower or upper case).
Read more...
By
Rafal Skotak
2008/02/28
|
Source:
SQLServerCentral.com
Rating:
|
Discuss
|
Briefcase
|
572 reads
Shrink all databases
Procedure changes all databases' recovery mode to simple and shrinks them all (or at least it tries to).
Read more...
By
Rafal Skotak
2012/03/07
|
Source:
SQLServerCentral.com
|
Category:
backup / restore
Rating:
|
Discuss
|
Briefcase
|
3,729 reads
Db files size per directory
This procedure displays amount of disk space used by database per directories.
Read more...
By
Rafal Skotak
2008/02/29
|
Source:
SQLServerCentral.com
Rating:
|
Discuss
|
Briefcase
|
854 reads
Generating number sequences
Two queries below show one of many ways how You can generate a sequence of numbers.
Read more...
By
Rafal Skotak
2013/05/24
|
Source:
SQLServerCentral.com
Rating:
|
Discuss
|
Briefcase
|
699 reads
Days of month function
Functions return tables with days of the specified month.
Read more...
By
Rafal Skotak
2013/05/24
|
Source:
SQLServerCentral.com
Rating:
|
Discuss
|
Briefcase
|
831 reads
Items 1 to 18 of 18
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.