|
|
-
|
|
I read and used an excellent tip on: http://www.sql-server-performance.com/tb_search_optimization.asp.
The basic problem revolved around full text searches using WHERE predicates.For example:
SELECT *
FROM ads p
INNER JOIN containstable(properties, description, 'car') t
ON p.PropertyID = t.[key......
|
|
-
|
|
An excellent script to deal with XML documents that are greater than 8000 characters
Use it like:
DECLARE @hDoc int
EXEC usp_OpenXML_From_File 'c:\myXMLfile.xml', @hDoc OUTPUT
SELECT *
FROM OPENXML(@hDOC, '/rss/channel/item',2)
WITH
(
title varchar(200),
link varchar(400),
descripti......
|
|
-
|
|
Returns records form the error log based on search terms
DECLARE @SERVER NVARCHAR(50)
SET @SERVER = 'SERVER1\INSTANCE'
DECLARE @sqlStatement1 VARCHAR(200)
SET @sqlStatement1 = @SERVER + '.master.dbo.xp_readerrorlog'
CREATE TABLE #Errors (vchMessage varchar(2000), ID int)
--CREATE INDEX idx_m......
|
|
-
|
|
SQL Server database and file size is returned in this script, compared to total
and free disk space. It also displays the number of Kb that each
database file will grow by on the next extend.
/******************************************************************
*
* SQL Server Disk Space Check
......
|
|
-
|
|
select
c_c_u.table_name sr_c_table,
c_c_u.constraint_name sr_c_constraint,
c_c_u.column_name sr_c_col,
k_c_u.table_name target_table,
k_c_u.column_name target_col
from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE c_c_u,
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS r_......
|
|