My cpu useage is running at an abnormally low rate. It rarely peaks above 27% although I cant discover the reason why... any ideas?
I have 4 cpu (1996 MHz Intel) server running SQL 2K SP3 on Win 2K V5.0 SP3 operating system.
Memory set to dynamically configure and the database on average has...
I have a sql2k table with columns "line_num", "task_index" and "task".
The table is basically a list of tasks that need to be completed in a specific order. "Line_num" should always read 0, 1 etc and is incorrect (Column "Task" and...
I have two columns (ColumnA and ColumnB)
ColumnA contains text strings, ColumnB is empty
Id like to update ColumnB with the string values of ColumnA but I want to remove all vowels during the update.
How do I do this?
Thanks,
Lauryn Bradley
SQL Server DBA
I have a table, one column that contains a long text string (varchar(500)). I would like to split the strings between empty columns/fields Ive created after, say, every 70 characters.
Any ideas?
Lauryn Bradley
SQL Server DBA
I need to alter the way the data is stored within a table.
A typical row looks currently like this:
Col1 Col2 Col3 Col4
---- ------ ----- -----
XXXXX AAAAA BBBBB CCCCC
I need to 're-arrange' my...
This code works but its messy and inefficient. Can you see a better way???
SELECT REPLICATE('0',LEN(n_num)-LEN(n_num+60)) + LTRIM(str(n_num+60))
FROM numbr
WHERE num_id=1
AND LEN(n_num)-LEN(n_num+60)>0
UNION
SELECT REPLICATE('0',0) + LTRIM(str(n_num+60))
FROM numbr
WHERE num_id=1
AND...
Hi,
Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent. I am at a loss as to how to do this!!
Oracle SQL is:
SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr;
It takes the n_num column from the numbr table and increases the...
Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent. I am at a loss as to how to do this!!
Oracle SQL is:
SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr;
It takes the n_num column from the numbr table and increases the...
Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent.
Oracle SQL is:
SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr;
It takes the n_num column from the numbr table and increases the number by the set amount.
eg n_num
00123...
Version: SQL2k Standard Edition
No service pack applied.
Basically, I have a view (taken from two tables) which contains an 'address' column containing the concatenated values of 3 existing columns (number, street and area).
My problem is that when I display the view in Enterprise manager I...
Ive had to restore all my sql databases including master and msdb. I seem to have lost my DTS packages. Are they stored in another location other than msdb or have I lost them? I am working with version 7.
Help!
Lauryn Bradley
SQL Server DBA
Ive been posed this question but not quite sure how to answer it apart from the obvious answers.
What would cause a table to require reindexing on a daily basis if it has 100 transactions per second writing to it? Also, the sql service cannot be stopped for down time and the whole process of...
Im about to apply my first service pack upgrade to our SQL2K cluster. Are there any known issues or potential problems that I may encounter?
I am assuming that if all data is backed up (incl.system databases) that it should be reasonably straightforward if I follow the guidelines supplied with...
-- Converts todays date into (dd/mm/yy) format without
-- the timestamp
-- declare @date as datetime datatype
-- set @date as todays date
-- convert todays date into dd/mm/yy format
DECLARE @date smalldatetime
SET @date = getdate()
SELECT CONVERT(char(12), GETDATE(), 3)
GO Lauryn Bradley
SQL...
-- NB: Works on version 2000 only!
-- Script to check integrity on all tables in a database
-- Uses DBCC CHECKTABLE
-- exec lb_check_table_all
-- If procedure exists, drop it
IF EXISTS (SELECT so.name
FROM sysobjects so
WHERE so.name = N'sp_check_table_all'
AND so.type =...
-- Here is a small script that will perform maintenance
-- on all databases on a SQL server.
SET QUOTED_IDENTIFIER OFF
--Start with master
USE master
-- Create Variables
DECLARE @DBName CHAR(64)
DECLARE @TableName CHAR(64)
DECLARE @FQTableName CHAR(64)
DECLARE @TempVar CHAR(256)
--...
-- Gets active database connections older than # of
-- days specified.
-- Accepts integer input parameter for # of days.
-- Place in master database
IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N'sp_connections'
AND type = 'P')
DROP PROCEDURE sp_connections
GO...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.