Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: -ve values showing for used_pages

$
0
0

What is your ASE version? (select @@version)

 

I'm assuming you mean you're seeing some negative numbers in the logsegment usage counts; if so, this is (unfortunately) an issue that pops up from time to time (and has been around for many, many years).

 

Depending on your ASE version, your environment, and your acceptable risk level, there have been a few different solutions proposed over the years:

 

- put db in single user mode, use <dbname>, dbcc traceon(3604), dbcc tablealloc(syslogins,full,fix), dbcc traceoff(3604), take db out of single user mode

 

 

- put db in single user mode, use <dbname>, dbcc traceon(3604), dbcc dbrepair(<dbname>,'fixlogfreespace'), dbcc traceoff(3604), take db out of single user mode

 

- use <dbname>, dbcc traceon(3604), dbcc usedextents(<db>,0,1,1) (don't recall if this requires putting db in single user mode; will adjust space usage numbers for all segments in the database)

 

What I've used recently in ASE 15.7 servers:

 

==============

use <dbname>

go

dbcc traceon(3604)

go

-- does not require putting db in single user mode

dbcc dbrepair(<dbname>,'fixlogfreespace','scanlogchain',1)

go

==============

 

Regardless of which method you choose, I suggest you test in a non-PROD environment first!

 

NOTE: If you've got the space and time, consider dumping the affected PROD database and loading into a non-PROD environment ... if negative numbers still showing up then test on said loaded db copy.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>