sql-server-2000

TempDB full error

Hi, I have a web application running across a few sites, and last week I got a call to say they keep getting an error when accessing one specific page. The error is that tempdb is full, and i'm a bit stumped as to what to do about it. I've restarted the sql server (I'm led to believe this should re-create tempdb), but still the same pr...

How can I find out which data won't cast?

I have a SQL table with a date field defined as char(8), or 20090609, and a time field defined as char(4), or 1230. I am moving this data into another table and I want to combine the two fields and put them in a smalldatetime field in the new table. My query is like this: INSERT NewTable(eventdate) SELECT CAST((datecol + ' ' + substr...

One in Ten Query in SQL Server very slow.

When running a very simple query in SQL Server 2000. SELECT getDate() Most queries are sub second, but one query randomally in 10 takes about five seconds. I am running these queries from SQL Server 2008 Management studio, but it occurs in other clients and on other machines as well, so it is not client specific. The query is running...

How do I call a SQL Server 2000 DTS package in VB.net

How do I call a DTS from a VB.net application? ...

SQL query for top and bottom value for a particular date

SQL Server 2000 My Table: CARDNO CARDEVENTDATE CARDEVENTTIME 121 20090610 025050 121 20090611 040000 121 20090611 050000 121 20090611 020000 122 20090611 030001 122 20090611 030000 123 20090611 080000 123 20090611 100000 123 20090611 132449 123 20090611 025959 124 20090610 030000 124 20090612 030001 125 20090611 030002 125 2009061...

T-SQL 2000: Four part table name

I don't usually work with linked servers, and so I'm not sure what I'm doing wrong here. A query like this will work to a linked foxpro server from sql 2000: EXEC('Select * from openquery(linkedServer, ''select * from linkedTable'')') However, from researching on the internet, something like this should also work: Select * from link...

Undocumented System Procedure 'sp_MSforeachtable' and the @whereand parameter

I'm attempting to use the undocumented system procedure sp_MSforeachtable. But I need to restrict the affected tables to those that start with "smp" and that are in the "dbo" schema. I was able to find how to find procedures that start with "smp". I simply do: sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%...

exception problem with odbc and C++ causes bizarre database behavior

I have a C++ application (compiled with VS2003 running on windows 2000 server against SQL 2000 database) that ran fine for years and now is crashing. My logging shows that the database connection (ODBC using the SQL Server driver) will be working fine (read and update database) then after an exception throws (and is caught/logged but no...

Stored procedure question with IS_MEMBER

I have a table Users with columns ID nvarchar(4000) GroupRank int Definition nvarchar(4000) ID can be a userid (in which case groupRank is NULL), a domain group with a rank (in which case grouprank is not null) or a reserved default group called #DefaultGroup. I need a stored procedure that will: If ID=SYSTEM_USER, return that Defin...

InTime and OutTime for the modified date?

Using SQL Server 2000 Table CARDNO CARDEVENTDATE CARDEVENTDATE CARDEVENTTIME ADJUSTED 0121 20090611 20090610 025050 0121 20090611 20090611 040000 0121 20090611 20090611 050000 0121 20090612 20090611...

SQL Server 2000 > EXECUTE AS

Hey all. Could someone tell me how to elevate the execution of a stored procedure in SQL Server 2000? I've tried using EXECUTE AS, but that was added in SQL SERVER 2005. ...

SQL query to return one single record for each unique value in a column

I have a table in SQL Server 2000 that I am trying to query in a specific way. The best way to show this is with example data. Behold, [Addresses]: Name Street City State -------------------------------------------------------- Bob 123 Fake Street Peoria IL Bob 234 Other...

Error while running DTS package: SQL Server 2000

Hi, could any one help me to resolve this issue. I'm executing a DTS package on my system from SQL Server Enterprise Manager by connecting to the Database Server (Remote server). The execution completes with the error message "DTSStep_DTSDataPumpTask_1:Error at Destination for Row number . Errors encountered so far in this task:" Th...

Determining with C# Whether a SQL Backup File is Password Protected

How would I go about using C# to programmatically determine whether a SQL Server 2000 backup file has been password protected? ...

Install SQL Server 2000 from Install Shield 2009 Premier

I got an basic MSI project in Istall Shield 2009 Premier. I have some files(dlls, exes) to be copied, no problem. But what I need is I have to install SQL Server 2000 in addition to this. What I did during development time is install SQL Server 2000 before development(C#.net). I saw re-distributable "Microsoft SQL Server 2000 Desktop Eng...

view when table or view last altered, sql server 2000

Is there a an easy way to see(timestamp) when a database was last altered within a sql 2000 instance? Apparently the solution is not as simple as 2005 where i can query the "sys.tables." ...

How can I run a query when both the column name and table name are passed in?

Given a table name and column name in a pair of variables, can I perform a select query without using dynamic sql? for example, I'd like something nicer than this: CREATE PROCEDURE spTest (@table NVARCHAR(30), @column NVARCHAR(30)) AS DECLARE @sql NVARCHAR(2000) SELECT @sql = N'SELECT ' + @column + N' FROM ' + @table PRINT @sq...

SQL 2005 Find Out Who Created a View

Hi: Does SQL store any information about who originally created a view, or who last modified it? ...

Label.Text change being blocked?

I am attempting to use a Microsoft.SqlServer.Management.Smo.Restore object to restore a SQL Server 2000 database. Just before I begin the restore operation, I change the text of a label so that the user knows what is going on. However, the changed text isn't visible on the GUI (i.e., the text remains the same as it was) until AFTER the f...

Is SQL IN bad for performance?

I have a query doing something like: SELECT FieldX, FieldY FROM A WHERE FieldW IN (108, 109, 113, 138, 146, 160, 307, 314, 370, 371, 441, 454 ,457, 458, 479, 480, 485, 488, 490, 492, 519, 523, 525, 534, 539, 543, 546, 547, 550, 564, 573, 629, 642, 643, 649, 650, 651, 694, 698, 699, 761, 762, 768, 772, 773, 774, 775, 778, 784, 843, 844, ...