all groups > sql server (alternate) > august 2005
Filter by week: 1 2 3 4 5
Memory usage in SQL Server
Posted by Raziq Shekha at 8/31/2005 9:19:11 PM
Hello all,
How can I tell how much memory SQL Server is using on a server. On
Windows 2000, whenever I go to Task manager/processes/memory usage SQL
Server seems to be showing 1,744,124K. On all of my servers with
various size, usage of databases, all of them show SQL Server to be
using abo... more >>
Can I force printing?
Posted by jim_geissman NO[at]SPAM countrywide.com at 8/31/2005 4:40:18 PM
I have a script or SP that takes a very long time to perform
multiple tasks, and after each one there is a PRINT statement
that shows the time and what was just accomplished, to help me
monitor what's happening and estimate how long it will take.
In a script, I can put a GO after each PRINT to c... more >>
list of clustered index in the database
Posted by bala at 8/31/2005 4:23:31 PM
hi guru's
would appreciate if someone could show how to list all the clustered
indexes in the database.
if it can done as a output of single query it would be fine. the output
should be the table name, column name and clustered index name.
thanx
bala
... more >>
convert ms access sql staement to oracle sql statement
Posted by ian m via SQLMonster.com at 8/31/2005 1:19:18 PM
Hi,
I currently have a ms access update query that runs
perfectly well and quicly in access however I now need to add this query
to convert this qeryu to oracles equivelant sql syntax and add it to the end
of an oracle sql script.
Unfortunately Im not having much success although i seem to... more >>
compond index and key faster/better?
Posted by eric.nave NO[at]SPAM gmail.com at 8/31/2005 1:18:29 PM
In a situation where you have two tables in a hierarchy like this:
create table authors (authorid int identity (1,1))
create table books (
authorid int,
bookid int identity (1,1)
)
Is there any disadvantage to having the primary key and the clustered
index as a compound key, like this:
... more >>
Assigning Foreign Key To New SQL Server Table
Posted by . . at 8/31/2005 1:15:08 PM
Hi
I am creating new SQL Server Tables using SQL Server 2005. I have set
primary key to the tables .But I do not know how to assign Foreign key
to the tables .I need to do some joins later and that is why I have to
put Foreign key to the table . The Primary key is visible and can be
assigned ... more >>
Syntax? - Searching combined columns
Posted by theintrepidfox NO[at]SPAM hotmail.com at 8/31/2005 10:05:32 AM
Dear Group
The scaenario is as follows:
FirstName and LastName are separate columns in the contact table and I
want to be able to search e.g. for the FirstName and part of the
LastName at the same time e.g. 'John A' should return 'John Adams'.
Would be grateful if you can give me some hint ... more >>
SET ANSI_WARNINGS OFF in stored procs - how to avoid recompilation?
Posted by nate.hughes NO[at]SPAM usa.net at 8/31/2005 6:22:18 AM
Ok, here's my dilemma. We're running SQL Server 2000 with the default
db setting for the ANSI_WARNINGS option set to off. However, we still
get "Warning: Null value is eliminated by an aggregate or other SET
operation" messages. To eliminate getting the message, we use the SET
ANSI_WARNINGS O... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
restore problem about sql server
Posted by Dee at 8/31/2005 5:04:16 AM
i reinstall the sql server on the machine, and use attach file method
to get the database back, and it works well on the server, which means
i can get the data using Query analyser, but when i use the web
application to access the database, it always come out with error
message, it seems that th... more >>
Case Sensitive Pattern Match
Posted by ozburger NO[at]SPAM gmail.com at 8/31/2005 3:09:26 AM
I am trying to do a select statement with SQL 2000 for all records
containing any number of lowercase letters. I have tried the following
2 statements and they both seem to match both lowercase and uppercase
letters.
SELECT * FROM customers WHERE name LIKE '%[a-z]%'
SELECT * FROM customers... more >>
The select statement is in a field
Posted by George o at 8/31/2005 12:00:00 AM
Ok, I inherited this database and there is a field that stopres a select
statement. Is there anyway possible to execute the value of the field
within a select statement?
For example:
the table:
Name "george"
lookupForName "Select orders from Ordertable"
So maybe something like select... more >>
All records within x minutes of each other
Posted by Scott Marquardt at 8/30/2005 3:20:45 PM
Consider a table that holds Internet browsing history for users/machines,
date/timed to the minute. The object is to tag all times that are separated
by previous and subsequent times by x number of minutes or less (it could
vary, and wouldn't necessarily be a convenient round number). This will
... more >>
Can I access my private db through my web server?
Posted by bcanavan NO[at]SPAM bmghomes.com at 8/30/2005 2:00:21 PM
Web server: win2003 server with iis6
DB: sql server 2000
I have 50+ remote offices running an Access 2002 app which connects
directly to sql server at a 3rd party hosting company, in part using an
odbc connection on the workstation.
We recently moved our database (and our web site) in-hou... more >>
Generating values as part of a compound key
Posted by Mark at 8/30/2005 12:42:02 PM
BEGINNER QUESTION
I have a table which has a compound primary key consisting of two columns.
One of these columns is a foreign key which is generated in another table by
an identity.
I want to be able to generate the other primary key column value
automatically when an insert occurs but... more >>
SQl server processors and threads
Posted by Verve at 8/30/2005 3:54:40 AM
Hi,
I have an application where I need to find out about the following
information regarding SQL server:
Processors enabled
i. Threads allocated
ii. Priority
Can somebody throw some light on this. How are the processors related
to the threads running and the priority is w.r.t. what?
Th... more >>
Strange date/time anomaly, or am I just stoopid?
Posted by teddysnips NO[at]SPAM hotmail.com at 8/30/2005 3:30:59 AM
To set up the problem, paste this into QA:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[WorkOTRate]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[WorkOTRate]
GO
CREATE TABLE [dbo].[WorkOTRate] (
[TimeFrom] [smalldatetime] NOT NULL ,
[TimeTo] [... more >>
How to "undo" a delete with cascades
Posted by dsfsdfs878 NO[at]SPAM tiscali.co.uk at 8/30/2005 3:26:19 AM
Hello,
Somebody accidently deleted a record with cascade deletes
and took out about 80 records.
The database has been used heavily since then.
How do I put back the data?
I have spent hours researching BOL and all I can find
is how to restore the database to a point in time.
But tha... more >>
Why the performace differs?
Posted by MAG at 8/29/2005 11:40:05 PM
All,
I have a problem regarding SQL Server 2000 SP3,
I have SP that calls other SP and it inserts about 30,000 records as a
time,
in the development environment (MS Windows 2003 Enterprise, 256 RAM,
3.0 GHz Intel Processor) takes about 6 seconds to run this SP.
But, with the same Software bu... more >>
Installing SQLServer 2000 service packs on Clustered server
Posted by lyn.duong NO[at]SPAM gmail.com at 8/29/2005 8:15:15 PM
Hi,
I am planning to install sql server 2000 sp4 on my clustered server
running in active/passive mode.
I plan to stop all sql services using cluster administrator, install
the service pack from the primary node and then reboot all nodes.
Are there any missing steps that need to be done or pr... more >>
Can @@ROWCOUNT return NULL?
Posted by Dimitri Furman at 8/29/2005 7:40:51 PM
SQL Server 2000 SP3.
Is it possible for the @@ROWCOUNT function to return NULL after a
statement? I am troubleshooting a relatively large stored procedure with
multiple SELECT statements and a couple of INSERTs into table variables.
Immediately after each statement I save the value returned... more >>
Will SQL 2k 64bit ed dump files load on 32bit SQL2k?
Posted by jaykwon72 NO[at]SPAM gmail.com at 8/29/2005 1:11:00 PM
Hi there. I apologize if this topic had already been covered. I'm
trying to find out whether I can load up a data dump files, generated
off of a 64bit SQL server on Itanium, to a 32bit MSSQL 2K server. If
anyone has tried this before, please let me know your findings. Thank
you very much in ... more >>
SET IMPLICIT_TRANSACTIONS ON
Posted by Driesen via SQLMonster.com at 8/29/2005 12:51:10 PM
Hi all
The SET IMPLICIT_TRANSACTIONS ON syntax turns on Begin Transaction by default,
yet when the ROLLBACK command is used everything in that session gets rolled
back. Is there a way to use the set implicit command to rollback only the
last transaction?
Thanks in advance
Driesen
-- ... more >>
Memory usage\Performance problem
Posted by Magnus Österberg at 8/29/2005 12:22:02 PM
I am experiencing the following problem;
I boot my Windows 2000 sp#4 machine. I check sqlservr.exe's memory usage in
Task manager. It is ca 20 mb, everything is OK. Then I run this query;
select postoffice, count(*) as counter from tblTable
where postoffice is not null
group by postoffice
... more >>
Backup User - Server Role?
Posted by rcamarda at 8/29/2005 10:54:48 AM
I wish to create a user that can backup any or all databases in our SQL
Server 2000 Instance. I thought there would be a server role for this
function, however I can only find that after I grant access of a
database to the user, then I can choose ds_backupoperator.
I want to create a user that w... more >>
Rewrite a WHERE clause
Posted by joshsackett at 8/29/2005 8:23:06 AM
I have a WHERE clause that could be an "=" or a "LIKE" depending upon
if the passed variable is populated or not. I would like to know the
best way to write the WHERE clause to make it dynamically switch
between the 2 and make best use of the indexes.
CREATE TABLE myTable(ID INT PRIMARY KEY CL... more >>
MS SQL Server 7.0 SP4 on Windows 2003 Server.
Posted by Lucio Chiessi [VORio] at 8/28/2005 12:06:06 PM
My regards for all on this NG!
My client need to use Windows 2003 Server, but it have some databases
and systems that use SQLServer 7.0
I need to know if MS SQL Server 7.0 can be instaled and if will run
with no problems into Windows 2003 Server.
Thanks a lot!!
Lucio
... more >>
Database file size question please
Posted by time_to_go at 8/28/2005 12:00:00 AM
Hi,
I have set the DB to auto grow by 30 %. As well I have set it to
unrestricted size.... However , I see the available size continually being
reduced to now less then .54 MB... Why is there not enough available ?
G
... more >>
need help with SQL Macro in MS Access
Posted by gethrog at 8/27/2005 12:00:00 AM
Having trouble with this assignment. My teachers say it should work but it
just doesn't. This part of a macro is designed to take payment from the cost
and show the balance owing. What am I doing wrong. The sql is shown below.
No error message is showing but the process still dosen't work.
... more >>
Searching multiple entities at a time
Posted by theintrepidfox NO[at]SPAM hotmail.com at 8/26/2005 6:31:47 PM
Dear Group
Can anyone provide a sample query for the following scenario?
Let's assume I want to search for an order someone placed which might
be an individual or company. An individuals first name is stored in
column FirstName And the individuls last name in column LastName of the
contac... more >>
Convert float to char
Posted by jaijai_kumar NO[at]SPAM hotmail.com at 8/26/2005 3:14:46 PM
Select Cast('100.1234' as float)
give me the result 100.1234
Now when I convert it back to char I want exactly 100.1234
Select Convert(char(100),Cast('100.1234' as float))
Gives me 100.123 (Here I was expecting 100.1234)
When I do
Select STR(Cast('100.1234' as float),25,4)
I get back the re... more >>
Datediff needs to deliver month AND days
Posted by thrilled at 8/26/2005 2:30:53 PM
with datediff all I can get it to return is months or a total of the
days...
so if the difference in dates is 12 months 4 days how do I adjust the
SQL to accommodate both?
... more >>
Indexes and UniqueIdentifier Fields
Posted by christopher.secord NO[at]SPAM gmail.com at 8/26/2005 1:31:34 PM
I have a table that contains articles (as in, newspaper articles, blog
articles, whatever). I need to use a column of type uniqueidentifier
because one of the requirements is that I be able to write the articles
out to XML or import them from XML, and references (as in, "for more
info read this... more >>
Check Constraints or Triggers
Posted by sebastian.streiger NO[at]SPAM gmail.com at 8/26/2005 1:26:45 PM
Hi, I=B4m facing teh following situation:
This are just sample table names, but should do for discussing
purpouses.
Create table Invoice
(
InvoiceID Integer Not Null,
CustomerType Integer Not Null,
CustomerCode Integer Not Null,
Amount DECIMAL(10,2) Not Null,
.................... more >>
How to keep a running total
Posted by fwells11 NO[at]SPAM hotmail.com at 8/26/2005 12:29:36 PM
Hi there. As you will see from my questions, I am an SQL newb. I
dabble but never get to spend enough time to get proficient so base any
feeedback on that basis please. This is all theoretical information at
this point so I am also going to post this in a MySQL related group. I
will create s... more >>
Key and Index on Same Column?
Posted by christopher.secord NO[at]SPAM gmail.com at 8/26/2005 12:24:19 PM
Is there any advantage to doing this:
ALTER TABLE testtable ADD
CONSTRAINT PK_sysUser
PRIMARY KEY NONCLUSTERED (UserID)
WITH FILLFACTOR = 100,
CONSTRAINT IX_sysUser
UNIQUE NONCLUSTERED (UserID)
WITH FILLFACTOR = 100
GO
over just having the primary key? Does having both ... more >>
Query Analyzer Question
Posted by Northern Storm at 8/26/2005 11:24:10 AM
Hi,
Is SQL Query Analyzer available anywhere as a stand alone application?
Thanks... more >>
What does schema mean?
Posted by wackyphill NO[at]SPAM yahoo.com at 8/26/2005 11:21:51 AM
I know in SQL Server the terms Database and Catalog are used
interchangably. But a table is also assigned a schema. As seen in the
INFORMATION_SCHEMA.Tables View. I don't get what this schema qualifier
is all about. Like if a table has a schema of dbo.
Can someone explain the relationship the ... more >>
WHERE field=(select field from tables)??????
Posted by stoppal NO[at]SPAM hotmail.com at 8/26/2005 11:12:48 AM
I need some help.
I am trying to write a query which does the following
SELECT * from table1 where field1=(SELECT distinct field1 FROM table1
WHERE field2='2005' or field2='2010')
I need all the values from table1 which match any value from field 1
from the subquery.
Any help ... more >>
Just being curious
Posted by theintrepidfox NO[at]SPAM hotmail.com at 8/26/2005 9:37:32 AM
Hi Group
It's a rainy day and because of pure boredom have right-clicked a row
in EM and selected 'Properties'.
Just being curious what the dialog coming up is all about (call me
ignorant!) and where I can find more information (Keyword?)in BOL?
One thing I wonder however and maybe some... more >>
Login failed for user 'null'
Posted by dobrzak at 8/26/2005 12:00:00 AM
Hello,
I have problem with linked servers (MS SQL Server 2k)- when I try to execute
query(update, insert..) with linked servers, I have message Login failed for
user 'null'. This is very strange problem, some computers in AD (2k3 std)
don't have this error, when the other have this problem for f... more >>
Select Distinct Keyword Problems...
Posted by wirelessguy at 8/25/2005 7:11:48 PM
Let's say i have a database with the following structure and data
tablename: customers
customerID| customername | PictureID|
1 | MyCustomer | 1.jpg |
1 | MyCustomer | 1_1.jpg |
1 | MyCustomer | 1_3.jpg |
2 | MyCustomer2 | 2.jpg |
3 ... more >>
Show All Months in First Column of Stored Procedure
Posted by paulmac106 NO[at]SPAM hotmail.com at 8/25/2005 3:53:09 PM
Hi,
I need what would be similar to a cross tab query in Access.
First Column down needs to show all the months, column headings would
be the day of the month....
1 2 3 4 etc...
Jan
Feb
Mar
etc
how do i set this up in a stored procedure?
any help to get me in the right dire... more >>
Web Survey database design
Posted by JG at 8/25/2005 2:55:13 PM
I am a developer and I have a problem trying to design a system to
manage data coming from web surveys. Each section can potentially have
dozens of questions, i.e., fields.
I am focusing here only on the table(s) that will hold the survey data.
I do not have any DDL as I am still trying to under... more >>
Application Roles for Cross-Database Joins
Posted by Jason_Schaitel at 8/25/2005 2:07:54 PM
I have an application that segregates data into two different
databases. Database A has stored procs that perform joins between
tables in database A and database B. I am thinking that I have reached
the limits of Application Roles, but correct me if I am wrong.
My application creates a connectio... more >>
Comparing time values
Posted by teddysnips NO[at]SPAM hotmail.com at 8/25/2005 9:24:33 AM
I have a table called WorkItem. It models a chunk of work done during
a working day.
It has two columns that I'm interested in:
Start (smalldatetime) - the TIME the work block is begun
Duration (int) - the duration in minutes of the work block.
In another table called OvertimeRates I hav... more >>
Stored procedure error handling
Posted by dtwilliams NO[at]SPAM hotmail.com at 8/25/2005 9:08:59 AM
OK, i'm trying to do some error checking on stored procedures and am
following the advise in Erland Sommarskog's 'Implementing Error
Handling with Stored Procedures' document.
Can anybody help with my stored procedures and why it keeps erroring at
the '-- Create new Address Detail stage'? The ... more >>
SQL bug?
Posted by joshsackett at 8/25/2005 8:22:47 AM
Hi all,
I am thinking of opening a case with Microsoft unless someone else has
seen this bug before (or knows a quick fix, BESIDES using a temporary
table).
DECLARE @T TABLE (CHECKDATE VARCHAR(50))
INSERT INTO @T SELECT '01/01/2005'
INSERT INTO @T SELECT '02-02-206' -- bad value
INSERT IN... more >>
Bi-directional Transaction Replication
Posted by senthilprabu at 8/25/2005 3:54:14 AM
Two Servers,
1st 2nd
database a -------> after replication a'
b' <------- after replication b
on 1st server a is replicated to 2nd
on 2nd server b is replicated to 1st
I tried with merge replication it i... more >>
SQL Reporting Services Passing parameters
Posted by bherrington NO[at]SPAM insighthealthsolutions-dot-com.no-spam.invalid at 8/25/2005 2:11:15 AM
I am creating a drill through that will go out and find the correc
report out of 27 that equal my 2 parameters NAME_ID and DETAIL_ID.
Does anyone out there have any ideas for me? I can make it conect to
report. I do not know how to make it search for the correct repor
... more >>
Select unique
Posted by whitehare NO[at]SPAM ureach-dot-com.no-spam.invalid at 8/25/2005 2:11:15 AM
We have a transaction record that, for the sake of brevity, I will us
a simple paradigm to convey my need:
A sales clerk sells several pairs of shoes over the period of a day
each & every day the clerk works. Each transaction is recorded i
a database. All clerks use a single physical register b... more >>
|