Posts tagged SQL Server 2005
Detach, Move, and re-Attach database
012 months ago
The Transact-SQL Script below, is useful if you want to standardise the location of your databases. I have been managing a server whereby databases created by other people were created all over the place!! Therefore, this script was written to make life so much easier.
Be sure to read through [...]
List of tables and indexes, with associated File Group
01 year ago
in Transact-SQL
The script below (written using SQL Server 2005), returns a list of all tables (along with the schema name), and indexes (where they exist), and the name of the associated file group.
This will useful to find out which objects have been assigned to the wrong file group.
I have a database with over [...]
Search all table columns for specific text
01 year ago
in Transact-SQL
I needed to find out which columns within all tables in the database, contained a specific string of text. I therefore wrote the script below to do exactly that
CREATE TABLE TempTableColumnResults
( TableName VARCHAR(100),
ColumnName VARCHAR(100)
)
DECLARE @TableName VARCHAR(100)
DECLARE [...]
Transfer Logins and Passwords to a new server
01 year ago
If you need to transfer the logins and passwords from one server or instance to another server or instance, please refer to this very useful article from Microsoft:
How to transfer the logins and the passwords between instances of SQL Server 2005 and SQL Server 2008
Finding table column names with a specific word
01 year ago
in Transact-SQL
The code below can be used to find all tables that contain columns that have “ADDRESS” in the name. It can easily be modified to search for table column names with any specific word.
SELECT
CASE O.xtype WHEN 'U' THEN 'Table' WHEN 'V' THEN 'View' END AS Type,
O.name AS TableName,
[...]
Count of values within every field in a table
01 year ago
in Transact-SQL
The Transact-SQL script below (written for SQL Server 2005), returns a list of the values and a count for each and every field within a table. You just need to change the schema name and table name, and specify a limit (if needed) for the number of values returned for each field.
For [...]
Microsoft Certified IT Professional – Business Intelligence Developer 2008
02 years ago
As of Tuesday 1st September 2009, I have gained the Microsoft Certified IT Professional (MCITP) Business Intelligence Developer 2008 Certification. This is on top of my MCITP Database Administrator and MCITP Database Developer certification that I gained last year.
Microsoft Certified IT Professional
03 years ago
As of Friday 3rd October 2008, I have gained the Microsoft Certified IT Professional (MCITP) Database Developer Certification. This is on top of my MCITP Database Administrator certification that I gained in April.