URGENT! - DBCC Keeps Running Without Any Results?
May 30, 2001
One of our databases seems to be looking dodgy as some scheduled jobs are failing, but DBCC CHECKDB is no use since it has been running for over 1/2 hour without giving me any results, just the spinning globe.
How do I find out what is wrong without resorting to backups?
View 3 Replies
ADVERTISEMENT
May 28, 2015
In my environment, there is maintenance plan configured on one of the server and while running DBCC checkdb on a database of size around 200GB, log file usage of tempdb is increasing and causing the maintenance job to fail.
What can I do to make the maintenance job run successfully, size of the tempdb database is only 50GB and recovery model is set to simple. It cannot be increased as the mount point on which it is residing is 50GB.
View 3 Replies
View Related
May 14, 2008
Hi All,
I have a stored proc which is executing successfully...but the results of that stored proc are displaying in the Messages Tab instaed of results Tab. And in the Results Tab the results shows as 0..So, Any clue friends..it is very urgent..I am trying to call this stored proc in my Report in SSRS as well but the stored proc is not displaying there also...Please help me ASAP..
Thanks
dotnetdev1
View 4 Replies
View Related
Oct 4, 2005
Hello Ryan.
I run DBCC PAGE (dbname, 1, 136, 3) with trace 3604 on:
Server: Msg 8968, Level 16, State 1, Line 1
Table error: DBCC PAGE page (1:136) (object ID 0, index ID 0) is out of the range of this database.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
View 10 Replies
View Related
Nov 15, 2007
Dear Experts,
just now i've read a great article from sql server performance.com
and understand several key factors related to performance.
still i have one doubt that what will be the best ratio between
extents scanned and extent switches.
here i'm pasting some of my table result. please suggest me how is the performance of the table
table 1
- Pages Scanned................................: 85618
- Extents Scanned..............................: 11283
- Extent Switches..............................: 85405
- Avg. Pages per Extent........................: 7.6
- Scan Density [Best Count:Actual Count].......: 12.53% [10703:85406]
- Logical Scan Fragmentation ..................: 49.93%
- Extent Scan Fragmentation ...................: 46.31%
- Avg. Bytes Free per Page.....................: 2707.1
- Avg. Page Density (full).....................: 66.55%
table2
- Pages Scanned................................: 60648
- Extents Scanned..............................: 7650
- Extent Switches..............................: 60639
- Avg. Pages per Extent........................: 7.9
- Scan Density [Best Count:Actual Count].......: 12.50% [7581:60640]
- Logical Scan Fragmentation ..................: 50.93%
- Extent Scan Fragmentation ...................: 64.01%
- Avg. Bytes Free per Page.....................: 2672.5
- Avg. Page Density (full).....................: 66.98%
thankyou very much
Vinod
Even you learn 1%, Learn it with 100% confidence.
View 3 Replies
View Related
Nov 6, 1998
Has anyone had experience in running DBCC in a 24x7 environment. The only time that I can run them is after a server crash. I have had the server lock up when the results page returned. It almost immpossible to go down for more than hour, because we have international clients. The database is 1.2 GB but it is in constant use because we run reports from Crystal Info server and through an ASP for client use. I have consider dump the database to another site, running DBCC, copying back to the original and restoring the logs until the current time. Any suggestions will be greatly appreciated.
Lisa Bodine
Systems Analyst/DBA
Cyntergy Corp
View 3 Replies
View Related
Jul 28, 2004
I have lost the reference but I read somewhere that when running DBCC DBREINDEX against a clustered index, all the secondary indexes on the table are automatically re-indexed as well. I did a test of this on a small table and it seemed to confirm this. However, now I've put this into practice, I am finding that it doesn't seem to work this way. I noticed that having run DBCC DBREINDEX against a table's clustered index (DBCC DBREINDEX ('tablename', 'clusteredIndexName', fill_factor)), the secondary indexes were not automatically re-indexed - as born out by the fact that they remained badly fragmented.
First of all, do the dba's who read this beleive it is correct that DBCC DBREINDEX run against a clustered index will automatically rebuild the secondary indexes too? If so, why wouldn't it work in all cases?
Clive
View 12 Replies
View Related
Aug 9, 2004
Normally, after I use DBCC DBREINDEX, I can be sure that Scan Density on a clustered or non-clustered index is very good - eg. 99% or 100%. However, I have one database where there are a number of indexes that are not showing any improvement in Scan Density after running DBCC DBREINDEX. In on case, a clustered index, I run it on two days in succession and Scan Density actually go worse! Can anyone give me a reason for this? Can anyone suggest how to fix it?
Clive
View 1 Replies
View Related
May 21, 2008
Dear All,
i've used the DBCC showcontig command against my table table103
but i dont know how to analyze the results of fragmentation levels. please give me some explanations or some good links.....
the results are:
DBCC SHOWCONTIG scanning 'TABLE103' table...
Table: 'TABLE103' (1899257921); index ID: 1, database ID: 10
TABLE level scan performed.
- Pages Scanned................................: 20
- Extents Scanned..............................: 13
- Extent Switches..............................: 18
- Avg. Pages per Extent........................: 1.5
- Scan Density [Best Count:Actual Count].......: 15.79% [3:19]
- Logical Scan Fragmentation ..................: 90.00%
- Extent Scan Fragmentation ...................: 92.31%
- Avg. Bytes Free per Page.....................: 3281.4
- Avg. Page Density (full).....................: 59.46%
Vinod
Even you learn 1%, Learn it with 100% confidence.
View 10 Replies
View Related
May 10, 2007
Does anyone know if there is a simple way to get the results of a DBCCINPUTBUFFER() request into a table? I have a process for monitoringactivity that will give me the results of sp_who2 into a temp table,and want to scroll through the active connections and get the inputbuffers into another table for review:Insert into #TmpWhoexec sp_who2 'active'Something like that with the dbcc command.I am using SQL 2000 SP4.Thanks,Tom
View 3 Replies
View Related
Feb 28, 2008
So, basically I'm trying to do an insert into exec(dbcc shrinkdatabase)
Code Snippet
DECLARE
@SQL VARCHAR(1024)
,@DBName VARCHAR(512)
SET @DBName= 'admin'
IF OBJECT_ID('tempdb.dbo.#ShrinkDB') IS NOT NULL
DROP TABLE #ShrinkDB
CREATE TABLE #ShrinkDB
(
DbId INT
,FileID INT
,CurrentSize BIGINT
,MinimumSize BIGINT
,UsedPages BIGINT
,EstimatedPages BIGINT
)
SET @SQL=
'
INSERT INTO #ShrinkDB
(DbId,FileId,CurrentSize,MinimumSize,Usedpages,EstimatedPages)
EXEC(''DBCC SHRINKDATABASE(' + @DBName + ')'')
'
EXEC(@SQL)
SELECT * FROM #ShrinkDB
and receive the following:
Cannot perform a shrinkdatabase operation inside a user transaction. Terminate the transaction and reissue the statement.
I've tried adding a begin tran and commit tran around it, doesn't help ...
Is there any way around this? Is there any other way to capture the output of a shrink database from a procedure perspective?
Thanks
View 4 Replies
View Related
May 23, 2008
Guys,
I need to send a group of people a list of specific processes running on the server, one of the requirements is to send them what's actually being ran on the machine. I have the information I was on the sysprocess tabke and the results of the DBCC Inputbuffer. Is there a way to link both result sets?
This is the criteria of the processes that neeed to be sent out to my users:
SELECT *
FROM master.dbo.sysprocesses p
WHERE last_batch < DATEADD(mi, -5, GETDATE())
AND dbo.fncGetNumLocks(p.spid, DB_ID('EngDataMart')) > 1
GROUP BY p.spid, p.loginame, p.hostname, dbo.fncGetNumLocks(p.spid, db_id('DBName'))
ORDER BY p.spid
Thanks,
View 1 Replies
View Related
May 16, 2000
I am trying to reindex a large table, and cannot because there isn't enough room on the the primary filegroup. the database consistes of one physical file in the primary filegroup. the table is over 50% of the size of the database. When the table is less than 50% of the size of the database, I do not see this problem.
BTW, the only index on the table is the primary key which consists of two columns, one is an integer and the other datetime.
It seems as if SQL server needs 1x the current size of the table to be free in order to reindex? Is this the case?
It is not an option for me to allow the database to autogrow. Is there anything else I can do?
Thanks for your help!
View 3 Replies
View Related
Feb 13, 2006
SQL2000 Server, SP4, a database with a 17Gb log file. It has been backed up so all transactions should be validated, now the real file size needs to be shrunk because I need the diskspace plus I want to speed up the backup process.
http://support.microsoft.com/kb/272318/ Tells me what to do but not where to do it.
So I need to run this code : DBCC SHRINKFILE(pubs_log, 2)
but from what console do I run it?
View 4 Replies
View Related
Jan 22, 2008
Hi everybody,
I have a very strange problem. I have installed MS WS2003 SP2 and MS SQL 9.0.3054 SP2.
I have database dbTraceIT with data file on D drive and log file on E drive. If I run T-SQL command:
use dbTraceIT
go
dbcc checkdb
or Integration Services Package (task: Check Database Integrity Task, developed with MS VS)
this comand/or task has generated the hard disk errors on D drive. The chkdsk tool reports errors when hdd index verification has been completed. After hdd errors€™ repairing, if I run checkdb T-sql command the situation is repeated again.
Question: is it a bug or something different? Do you have similar disk error if you use e.g. Integration Service Packages (for instance index rebuild or whatever)?
Regards,
Dariusz
PS
Steps to reproduce
Find any DB on your MS SQL. Run chkdsk command on hard drive where DB€™s data file is stored. Verify that everything is OK.
Run t-sql command
use dbTraceIT
go
dbcc checkdb
3. Run chkdsk again. It should show hdd errors.
View 20 Replies
View Related
Jun 29, 2001
Msg 2503, Level 16, State 1
Table Corrupt: Page Linkage is not consistent; check the following pages: (Current page#=298065; page pointing to this page =286585; previous page# indicated in this page=283321).
Can somebody urgently help? Any help will be appreciated.
View 1 Replies
View Related
Nov 8, 2001
Does any one know how to resolve DBCC errors 9000 to 9999? The BOL does not give any explaination as to how to handle such errors. Microsoft search engine also does not offer any help on these error messags.
Thanks.
View 2 Replies
View Related
May 26, 2015
I can find many examples of loading DBCC results into tables. They all begin with a create table statement defining the results. My question is , other than trial and error, is there a way to determine what data types will be returned. Sure you can say that first element looks like an integer, but is it really a bigint, and that text string can be varchar(max) but will char(2) work.
I'm not looking for an answer for a specific DBCC function, but rather a generic way I can determine the characteristics of any DBCC result set.
I tried
SELECT *
INTO #tmp
FROM OPENROWSET('SQLOLEDB',
'Server=ray;Trusted_Connection=Yes;Database=Ed_sandbox',
'Set FmtOnly OFF; DBCC loginfo WITH tableresults ')
but I got back
Msg 11527, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1
The metadata could not be determined because statement 'DBCC loginfo WITH tableresults' does not support metadata discovery.
View 1 Replies
View Related
Jul 20, 2005
Can someone please help me interpret this result set below and suggeston way I can speed up my table? What changes should I make?DBCC SHOWCONTIG scanning 'tblListing' table...Table: 'tblListing' (1092914965); index ID: 1, database ID: 13TABLE level scan performed.- Pages Scanned................................: 97044- Extents Scanned..............................: 12177- Extent Switches..............................: 13452- Avg. Pages per Extent........................: 8.0- Scan Density [Best Count:Actual Count].......: 90.17% [12131:13453]- Logical Scan Fragmentation ..................: 0.86%- Extent Scan Fragmentation ...................: 2.68%- Avg. Bytes Free per Page.....................: 1415.8- Avg. Page Density (full).....................: 82.51%DBCC execution completed. If DBCC printed error messages, contact yoursystem administrator.Thank you.
View 2 Replies
View Related
Apr 19, 2008
hi all
its urgent really urgent
please reply soon
I am getting error in sysindexes when i run dbcc checkdb on a production db.
the error is Server: Msg 8928, Level 16, State 1, Line 1
please help me to remove this
all the options of dbcc checkdb as well as table are not helping me
thanks in advance
View 4 Replies
View Related
Jul 20, 2005
I'm running a simple DBCC DBREINDEX ('myTable') and I receive thefollowing error:"Server: Msg 169, Level 15, State 2, Line 2A column has been specified more than once in the order by list.Columns in the order by list must be unique. DBCC executioncompleted. If DBCC printed error messages, contact your systemadministrator."I can successfully reindex other tables in this database. I thoughtthat perhaps I had objects in the database that ended up with the samename, but I've pretty much ruled that out.Any suggestions?ThanksJohn D. Morrismailto://jmorris_42@hotmail.com
View 2 Replies
View Related
Apr 16, 2008
Hi
I have a full backup Job in SQL Server2000 server(designed by some body).
Step1.DBCC SHRINKDATABASE
Step2.DBCC SHRINKFILE -->It is shrinking log file
and
BACKUP DATASE()
Is it OK Shrinking Database and log files before full backup..
Your advice is appreciated.
View 10 Replies
View Related
Feb 19, 2008
Hi:
how could I load "DBCC showcontig (@TableName) with tableResults" to a table?
I created a table and let insert to it via above "DBCC...."
but problem is the results with "DBCC execution completed. If DBCC printed error messages, contact your system administrator.", or how could I mute this output line for each table ?
thanks
David
--=========================================
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
ObjectName ObjectId IndexName IndexId Level Pages Rows MinimumRecordSize MaximumRecordSize AverageRecordSize ForwardedRecords Extents ExtentSwitches AverageFreeBytes AveragePageDensity ScanDensity BestCount ActualCount LogicalFragmentation ExtentFragmentation
-------------------------------------------------------------------------------------------------------------------------------- ----------- -------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- -------------------- -------------------- ----------------- ----------------- ---------------------- -------------------- -------------------- -------------------- ---------------------- ---------------------- ---------------------- -------------------- -------------------- ---------------------- ----------------------
sysproxylogin 37575172 clust 1 0 0 0 0 0 0 0 0 0 0 0 100 0 0 0 0
View 1 Replies
View Related
Mar 7, 2001
My program is copying several hundred thousand records from an Access DB to a sql server 7 db. It has to do some conversions and lookups along the way. At seemingly random times, a DBCC job gets started up by the system that locks up my program.
Any thoughts as to why it happens? What I can do to detect/prevent it so that my program doesn't lock up?
View 6 Replies
View Related
Feb 12, 2015
What is the use of running DBCC FREESESSIONCACHE.
How frequently can we do this on all the databases.
What happens if we schedule to run it every 1min.
Are there any advantages/disadvantages of running this on all databases.
View 5 Replies
View Related
Jun 17, 2015
For reasons beyond the scope of my question, is there a way to run this command within a Stored Procedure from a low privileged user login? I can grant the entity "db_ddladmin" privilege and the proc runs, but I'd rather not give out that level of permission to what is basically a glorified web access login.
View 5 Replies
View Related
Mar 12, 2007
hi
im using sql server 2005
i have a table called download_transactions which contains wallpaper and video downloads. videos have a download_type of 110 and wallpapers 104. i need to pull out a count of these transactions where download_type is 110 and 104.
so one results column is count of 110 downloads
and the other column is count of 104.
thing is, one canned do; ..
where download_type 110 And 104
where download_type in (110, 104)
because this just confuses SQLserver. two conditionals.
how to do this, any ideas.
must i use a cursor to go through results once for 110, then again for 104?
at the moment, i select to pull out the count, and it gives two rows for each download type e.g.
clientID date count
50015 2007-03-06 00:00:00.000922
50015 2007-03-06 00:00:00.0001430
50020 2007-03-06 00:00:00.000486
50020 2007-03-06 00:00:00.000872
two rows for each clientID, one is count of 110, and one is count of 104.
i just need the 2nd row count to be in a 4th column next, like this:
clientID date 104/count 110/count
50015 2007-03-06 00:00:00.000922 1430
this is the sql i am using:
declare @start_date datetime
declare @end_date datetime
declare @start_timeshift int
declare @end_timeshift int
declare @client_id int
select@start_timeshift =0,
@end_timeshift =23,
@start_date = (dateadd(hh,@start_timeshift,'2007-03-06')),
@end_date = (dateadd(hh,@end_timeshift,'2007-03-06'))
select c.client_id,
@start_date[date],
count(txn.download_transaction_id) + '' + count(txn.download_transaction_id)
from[main_tbl].dbo.download_transactions txn with ( nolock )
inner join [main_tbl].dbo.billing_partners as b with ( nolock ) on ( ( b.billing_partner_id = txn.billing_partner_id )
and ( b.is_active = 1 ) and ( b.is_development <> 1 ) )
inner join [main_tbl].dbo.suppliers s with ( nolock ) on ( ( s.supplier_id = txn.supplier_id )
and ( s.is_active = 1 ) and ( s.is_development <> 1 ) )
inner join [main_tbl].dbo.clients c with ( nolock ) on ( ( c.client_id = txn.client_id )
and ( c.is_active = 1 ) and ( c.is_development <> 1 ) )
inner join [main_tbl].dbo.downloads d with ( nolock ) on ( ( d.download_id = txn.download_id ) )
inner join [main_tbl].dbo.download_types dt with ( nolock ) on ( ( dt.download_type_id = d.download_type_id ) )
--inner join [LOGGING].dbo.wap_sessions wp with (nolock)on ( ( wp.client_id = txn.client_id ) )
where (txn.client_id in (50025,50015,50030,50020))
and (txn.date_created between @start_date AND @end_date) --between '2007-01-01' And '2007-01-10')
and(txn.billing_successful = 1)
and (txn.PORTAL_CAMPAIGN_ID is null)
--and (dt.download_type_id = '104' + '110') --choose downloadtype
--and (dt.download_type_id = 110) --ch+oose downloadtype
--and (dt.download_type_id = 104) --ch+oose downloadtype
group by
c.client_ID, datepart(day,txn.date_created), dt.download_type_id, dt.download_type_id
order by
c.client_ID, dt.download_type_id
any help will be VERY VERY VERY appreciated.
Thanks
James
View 1 Replies
View Related
Oct 17, 2000
How to run a DTS job from command prompt? Any help is appreciated!
Thanks.
View 2 Replies
View Related
Aug 28, 2001
I have a question on database size, specifically, what difference would I expect in the size of a db (the space actually used for data, not indexes) if I have one single data device vs. multiple data devices spanned across different physical drives. I have 2 customers that have identical database tables (all columns are integers), customer A has 27 million rows and customer B has 36 million rows. If I do an sp_spaceused on the table, customer A's data takes up 9.7 gig, whereas customer B only takes up 3.2 gig, even though it has 9 million more rows. Statistics have been updated, so I'm confident the sp_spaceused is accurate on both databases.
The only differences I can see between the 2 databases is that customer B has 5 separate data files (6 gig each) for the database which are part of the Primary filegroup. These files are all on the D: drive, which is a partition on a RAID 5 array. Customer A has a single large data file (24 gig), which is also on a RAID 5 array.
Any ideas?
View 4 Replies
View Related
Apr 17, 2000
I need to run stored procedures which are currently run on server A(located in another city),by connecting myself to it through my laptop running on SQL server 7.0(only client components installed)on NT workstaion4.0. Can anyone tell all the steps involved to run those stored procedures everyday.Even I need to monitor Server A from my laptop.Please advice...Urgent!!
View 1 Replies
View Related
Oct 12, 2000
hi,
my Backup job, took a backup at 3.00am , backup went well, but this job is still running , now the time is 10.00am.
I tried to kill this job but it is still running.
Why my process still running after taking a backup also.
Can anyone suggest me, how i have to resolve this.
Thanks!
--Ram
View 2 Replies
View Related
Dec 29, 2001
Hi,
I have SQLServer 6.5 SP5a update running on Windows NT 4.0 SP6
with 4 gig RAM and 4 processor.
Suddenly the SQL 6.5 jobs running on the production server started running very very slow. A job that suppose to run in 30 minutes are running like 2 hours and completing successfully.
(I suspect the after the Norton Anti virus automatic live update may be the reason but not the Second Vulnerability as mentioned by Microsoft Bulletin last week)
I check the SQLServer, ran the performance monitor, checked pagefiles, disk space, databases,memory, tempdb. Everything seems to be normal.
I rebooted the server, checked any other process making that slow. But no use.
Please help me out with this issue as this is a production and the CRM applications from the clients uses the database server.
Thanks in advance,
Anu
View 1 Replies
View Related
Nov 6, 2006
Hi,
I need to write a select query that will run all returned results through a separate stored procedure before returning them to me.
Something like....
SELECT TOP 10 userid,url,first name FROM USERS ORDER by NEWID()
......and run all the selected userids through a stored procedure like.....
CREATE PROCEDURE AddUserToLog (@UserID int ) AS INSERT INTO SelectedUsers (UserID,SelectedOn) VALUES (@UserID,getdate())
Can anyone help me to get these working togethsr in the same qurey?
Thanks
View 7 Replies
View Related