Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle Hi all, I'm getting this message when trying to clear tempdb DBCC SHRINKDATABASE (tempdb, 10) WITH NO_INFOMSGS Msg 5054, Level 16, State 1, Line 1 Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle. Msg 5054, Level 16, State 1, Line 1 Coul... 25 Jun 2010 11:00
Run query on multiple databases I have about 230 databases on my sql server. Out of which 220 or so are Dynamics Databases on which I want to run the same standard query as below. I don't want to select each db individually and run the query. Is there any way that I can run the query on the 220 dbs without selecting each one individually. ... 25 Jun 2010 08:48
Dealing with BAD Dates in SSIS I know this isn't the correct group for this tool, but it belongs to SQL Server . . . so I have a simple table with five columns. One of the column is a date. When I import the data into a datetime field I get the error: An OLE DB error has occurred. Error code: 0x80004005. Description: "Invalid charac... 28 Jun 2010 18:24
Subquery with Max(date) I have a result set that I need to filter down to the last date something was done. The problem is that I can't seem to use the derived table in the From clause of my Subquery. The Query looks something like: SELECT sFirstname, sLastName, nProductID, VisitDate, dVisitDate FROM ( ... 28 Jun 2010 18:24
XML - Eliminate Namespace in Elements I have created a stored procedure that generates an XML file. The only issue is that the namespace is being duplicated in each of the detail elements and I only want it to appear in the root. I am including my code and any help would be greatly appreciated! TIA, Mary This is just a brief display of what I a... 25 Jun 2010 04:26
How to retrieve a distinct row using one column as criteria? Hi, I have a table like the following columns: Warehouse INTEGER NOT NULL, sku INTEGER NOT NULL, qtyOnHand DECIMAL(9,4), DateLastPurchase DATE, SupplierLastPurchase INTEGER Primary key is Warehouse,Sku It actually has more columns, but t... 25 Jun 2010 08:48
Mnipulating temp table output in sql Hi, I have a temporary table output which is in the format below. site cust_num slsman sales_ytd sales_lastyr 11121 C000200 904 0 0 11199 C000200 904 1023.1 0 11099 C000200 904 0 0 11111 C000200 904 343.5 25 11112 C000200 904 0 0 11103 C000201 927 2000.12 3000 11101 C000201 927 325.12 100.33 11199 C000201 927... 24 Jun 2010 11:54
Sync two tables Hey folks, I have a table in one server (SQL2K) that, among other columns, has a [datetime] column: ActionDate. In a linked server (also SQL2K), this same table exists which needs to be updated nightly with new records from the original since the last sync. I have the following: insert into <synctable> s... 24 Jun 2010 09:37
Using a 'Union' kills the performance Hi All, I have this unusual behavior in my SQL server 2008 Ent 64bit (Clustered) environment. I migrated my SQL Instance from a SQL 2000 Ent (32Bit) With SP4 to 2008 Ent SP1 (64BIT - Clustered) instance. I have this complex query which joins a bunch of tables and has a union. When I run the query outside th... 24 Jun 2010 03:09
Trying to migrate from SQL Server 2005 to Oracle 10g Express Edition Hi, We are planning to migrate our SQL Server datbases to Oralce 10g in near future. As part of this process I am just trying to migrate a small database that has only 4 tables in Sql Server 2005 to Oralce 10g Express Edition. I am just recreating all the table definitions in Oracle by looking at the defini... 25 Jun 2010 17:36 |