Quantcast
Channel: SCN: Message List - SAP Applications on SAP Adaptive Server Enterprise (SAP ASE)
Viewing all 3678 articles
Browse latest View live

Re: Update Statistics - SAP ASE

$
0
0

datachange was meant to be run on a per column per partition basis.   Running it on the entire table results in grossly aggregated percentages as you have seen.   Were I you, I would write a query against syspartitions joined with syscolumns with datachange() to see which columns/partitions are the ones most likely tripping the issue.  

 

Also, by running update all statistics, you likely caused some real fun for yourself.    ASE's optimizer can use stats on unindexed columns to cost row estimates as part of the decision making process about which way to join tables, etc.   So, sometimes this is done on columns that typically don't index well (extremely low cardinality such as gender) especially if highly skewed so that ASE picks the best plan based on better row estimates.   However, unless you keep these updated, you will potentially wreak havoc on queries that hit old/stale stats.   You might want to use delete statistics to clear these out and then run update index statistics again.


Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Hi,

 

We tried using slibclean and problem persists.

 

Do you know if the only option is a server restart?

Is there a known defect on AIX ?

 

Regards,

 

Luz Rodriguez

Re: Update Statistics - SAP ASE

$
0
0

Not sure about your update stats and datachange values.  Make sure you run "sp_flushstats" just to see if any in-memory value isn't making it to disk or some such problem.  Perhaps sampling is causing your datachange values not to be reset.   Also, is this table partitioned (ie, does it have more than 1 partition)?

 

Keep in mind a few things:

     1.  datachange(<tablename>,null,null) returns the maximum datachange value over only those columns which have histograms (statistics). 

    2.  datachange function should probably be only used to determine which tables/partitions do NOT need updated stats.  (in my opinion)

    3.  Running update stats on a global index of a partitioned table will not reset datachange values.

    4.   Determining WHEN to run update stats is more of an art form, depending on your specific environment.  There are no hard, standard rules to apply here to say a table/column _needs_ update stats.  Some use datachange, while others use the various "derived_stat()" numbers, etc.  Most shops simply chose to opt-in a group of tables to have update stats job run on a regular basis.

 

To take a closer look, run this SQLto see where your values are coming from:

 

set quoted_identifier on

select ObjectName=convert(varchar(20),object_name(p.id))

      ,PartName=convert(varchar(20),p.name)

      ,ColName=convert(varchar(20),c.name)

       ,HistDt=convert(varchar(10),s.moddate,101)

       ,Smp_Pct=str(s.c13,8)

       ,Datachg=datachange("SAPSR3."+object_name(p.id),p.name,c.name)

from syspartitions p INNER JOIN syscolumns c

                      ON p.id = c.id

                        and p.indid between 0 and 1

                      LEFT JOIN sysstatistics s

                      ON c.id = s.id

                       and p.id = s.id

                       and s.formatid = 100

                       and s.statid = 0

                       and s.sequence = 1

                       and convert(varbinary,c.colid) = s.colidarray

                       and datalength(s.colidarray) <= 2

where object_name(p.id) = '/BI0/F0SMD_PE2H'

order by object_name(p.id),p.name,c.colid

 

Columns which have histograms will show up with a "HistDt" value of the last date update stats were done for the column.  For each of these types of columns, the "max" value of those will be what is returned by "select datachange(...., null,null) "

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Hi,

It should work just with running sibclean,  but I have a customer which had to reboot ASE.

I guess the behavior  varies depending on  AIX and PL version n use.

Regards

JM

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Thanks Jose,

 

We have several servers and we are having this problema installing the last EBF, is problematic to restart the instance in some of them. I am looking for another workaround or a way to identify which instances I need to restart.

 

Regards,

 

Luz Rodriguez

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Luz,

Just to be clear, this is an OS issue as far as I know, not ASE

 

Regards

JM

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

José,

 

I know. OS people said that they have the last version installed. I am looking for a defect number to reference it .

 

Regards,

 

Luz Rodriguez

Re: Update Statistics - SAP ASE

$
0
0

Thanks a lot.... Jeff and Kevin ... The different angles of scrutiny into the topic was just tremendous.

 

I have 650 partitions to the table. The index size being 250 gigs and data size 10 gigs.

I will surely get back , with a results to the SQL, to fetch columns with histograms, that might have returned my strange values to select datachange.

 

 

Once done, I shall reconstruct things :-

 

 

Try sp_flushstats if flush any in_memory stats. ( check datachange values )

 

and then delete statistics and Re-run update statistics to construct the latest updated statistics for that table.

 

Thanks Anand, Jeff and Kevin.. once again for immediate help and rescue operations .

 

I shall post result after the weekend.

 

Regards,

Ajith Prabhakaran


Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Hi Luz.

Currently I have this information. Hope it helps

 

 

 

 

 

Product

-----------

 

 

Product

Product Version

SAP Adaptive Server Enterprise

SAP Adaptive Server Enterprise 15.7

 

 

 

Symptom

--------------

While upgrading ASE The installation setup fails

ASE.log, ASE_suite.log, open_client.log or jre.log may contain some of the following NonFatalErrors:

 

 

Install File: <filepath>

Status: ERROR

Additional Notes: ERROR - Flexeraal3: <filepath> (Text file busy)

Install File: <filepath>

Status: ERROR

Additional Notes: ERROR - Flexeraal3: <filepath> (Cannot open or remove a file containing a running program)

 

 

 

Environment

------------------

SAP Adaptive Server Enterprise (Any Version)

SAP Sybase IQ (Any Version)

AIX OS specific issue

 

 

 

Cause

----------

Setup fails to replace the file(s) mentioned in the error message because some binary is still using the shared library. This issue is only encountered on AIX.

 

 

 

 

 

Resolution

----------------

Move the files from the error message to a backup directory or rename them.

or

 

 

The AIX command slibclean (/usr/sbin/slibclean) unloads the binaries but sometimes does not solve the issue.

or

 

 

as last resort,

 

 

Reboot the OS host

 

 

 

See Also

 

 

IBM knowledge center - info on slibclean.

 

Regards

JM

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

$
0
0

Thanks Jose,

 

Yes, this helps a lot. Is this information in a KBA?

 

Regards,

 

Luz Rodriguez

Re: Update Statistics - SAP ASE

$
0
0

Dear Colleagues,

 

I have found something very similar, and I feel if I am hitting a bug.

2079837 - SYB: Avoid redundant statistics update due to CR 770415

 

 

  1. select datachange('S30.SAPSR3./BI0/F0SMD_PE2H',NULL,NULL
  2. go 
  3. --------------------------- 
  4.                    51328.034017 
  5. (1 row affected) 
  6. updateallstatistics"S30.SAPSR3./BI0/F0SMD_PE2H" 
  7. go 
  8. sp_flushstats 
  9. go 
  10. (return status = 0) 
  11. select datachange('S30.SAPSR3./BI0/F0SMD_PE2H',NULL,NULL)
  12. go 
  13. --------------------------- 
  14.                    51328.034017 

 

"to avoid running into CR 770415, we need to enforce no hashing for partitioned tables on older releases

if partcnt > 1 and ( dbrel < '15.7.0.132' or ( dbrel+0(4) = '16.0' and dbrel < '16.0.01.00' ) ).

 

The version I am using is ASE 15.7 on SP134. So I plan to raise a case with SAP.

 

What is your call?

SAP data collection fails post upgade of SAP ASE 15.7 from SPS 12 to SPS 14

$
0
0

Hello All,

 

Post SPS upgrade from SAP ASE 15.7 from SPS 12 to SPS 14, all the SAP data collection fails in DBA logs in dbacockpit with following error

Can you please help. What could be the issue.

 

Regards,

Vishwanath B

Re: While Patching 15.7.0.021 to 15.7.0.030, some nonfatal error.

Re: Update Statistics - SAP ASE

$
0
0

You didn't mention using hashing for statistics.  I don't see that in your syntax.  Perhaps you have and set it to be "sticky"?  Hashing statistics is known to be a bit buggy pre-16.0.   You might need to use the "no hashing" option of update stats command.

 

Try looking at this output:

 

set quoted_identifier on

select ObjectName=convert(varchar(20),object_name(c.id))

 

      ,ColName=convert(varchar(20),c.name)

 

      ,"HashSticky_Group1" = case

        when s.c1 & 6144 = 2048 then "Stats partial hashing sticky"

        when s.c1 & 6144 = 4096 then "Stats hashing sticky"

        when s.c1 & 6144 = 6144 then "Stats no hashing sticky"

        else "Not set"

        end

      , "Hashing Pll Sticky" = case

        when s.c1 & 65536 = 65536 then "Stats hashing parallel sticky" else "Not set"

        end

      , "Hash Low Domain Sticky" = case

        when s.c1 & 8192 = 8192 then "Stats hashing low domain sticky" else "Not set"

        end

      ,"Hash High Domain Sticky" = case

        when s.c1 & 16384 = 16384 then "Status hashing high domain sticky" else "Not set"

        end

      ,"Stats Sampling Sticky" = case

        when s.c1 & 256 = 256 then "Stats sampling sticky" else "Not set"

        end

from syscolumns c

                      INNER JOIN sysstatistics s

                      ON c.id = s.id

                       and s.formatid = 100

                       and s.statid = 0

                       and s.sequence = 1

                       and convert(varbinary,c.colid) = s.colidarray

                       and datalength(s.colidarray) <= 2

where object_name(c.id) = '/BI0/F0SMD_PE2H'

order by object_name(c.id),c.name,c.colid

ASE 16.0 instance not starting

$
0
0

Hello All,

 

DB is not starting when running startsap all or startsap db command.

 

Below are lines from SID.log

46.10 kernel  Using config area from primary master device.

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  SySAM: Checked out license for 8 ASE_PARTITIONS (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  Checked out license ASE_PARTITIONS

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  SySAM: Checked out license for 8 ASE_COMPRESSION (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  Checked out license ASE_COMPRESSION

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  SySAM: Checked out license for 8 ASE_ASM (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  Checked out license ASE_ASM

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  os_create_region: can't allocate 1843200000000 bytes

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  kbcreate: couldn't create kernel region.

00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  kistartup: could not create shared memory

 

Below are the lines from startdb.og

startdb: Terminating with error code 13

 

 

Regards

Suresh


Re: ASE 16.0 instance not starting

$
0
0

you are configured to request 1.6 Tb of memory from your operating system:

 

>> 00:0000:00000:00000:2015/12/22 07:28:46.11 kernel  os_create_region: can't allocate 1843200000000 bytes

 

My guess is that you don't have that much memory on your OS.  Adjust "total memory" or go through whatever SAP configuration step you need to to adjust your total memory requirements for ASE.  Typically this is done in the $SYBASE/$SYBASE_ASE/<sid>.cfg file.

Re: ASE 16.0 instance not starting

The log segment in the target database 'BIS' is too small (56320 MB) to accommodate the log segment from the dumped database (102400 MB).

$
0
0

Hi All,

 

Getting below error.

Please help.

 

1> load database BIS from "/space/bid211215.dmp"

2> go

 

Backup Server session id is: 14. Use this value when executing the

'sp_volchanged' system stored procedure after fulfilling any volume change

request from the Backup Server.

Backup Server: 6.28.1.1: Dumpfile name 'BID1535511011    ' section number 1

mounted on disk file '/space/bid211215.dmp'

Msg 3185, Level 16, State 1:

Server 'BIS', Line 1:

 

The log segment in the target database 'BIS' is too small (56320 MB) to

accommodate the log segment from the dumped database (102400 MB).

1>

 

Regards,

karthik

Re: Update Statistics - SAP ASE

$
0
0

Hello Kevin,

 

You are spot on. I actually did not use the featre "hashing"  while running Update Statitics.

 

Meanwhile I was trying to get the output for the query you pasted. I get all

 

Msg 207, Level 16, State 4:

Server 'S30', Line 1:

Invalid column name errors.

 

I am troubleshooting this.

 

Would it be better to run this an a input sql file?

 

Regards,

Ajith Prabhakaran

Signal 11 infected

$
0
0

Dear Colleagues,

 

I have a stack trace that hit my ASE.

 

Can I request you all to  please help to break the error message and assists me with further scrutiny and examine the error.

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Current process (0x1525017b) infected with signal 11 (SIGSEGV)

Address 0x00000001007a0808 (kbfusage.fdpr.chunk.2+0xbc), siginfo (code, address) = (50, 0x0300003161000220)

**** Saved signal context (0x0000000171e4b0c0): ****

__sc_onstack: 0x0, __sc_uerror: 55

uc_sigmask: 0xffffffff1ffef877 0xffffffffffffffff 0xffffffffffffffff 0x7fffffffffffffff

Machine Save State:

PC (iar): 00000001007a0808 (kbfusage.fdpr.chunk.2+0xbc)

Link Register (lr): 00000001005c42bc (ubfprop.fdpr.chunk.3+0x8)

Stack Pointer (stkp): 0000000171e4b5b8

msr : a00000000000d032  ctr : 0000000000000000  cr  : 48224444

xer : 00000003

r0  : 0000001b3834c900  r1  : 0000000171e4b5b8  r2  : 0000000110767430

r3  : 0300003161000208  r4  : 0000000000003100  r5  : 0000000000000000

r6  : 0000001b3834c800  r7  : 0000000000000002  r8  : 0000000171e4baf8

r9  : 0000000102e5be50  r10 : 0000000000000004  r11 : 0000000171e4bb20

r12 : 0000000102a4c25c  r13 : 0000000110d2d800  r14 : 0000000000000000

r15 : 0000000000000000  r16 : 0000000000030d35  r17 : 0000000000000000

r18 : 0000000000000000  r19 : 0000000000000000  r20 : 0000000000000002

r21 : 0000000000000001  r22 : 0000000000013f19  r23 : 0000000000030d35

r24 : 000000000000043c  r25 : 0000000000013f1a  r26 : 00000000000b4442

r27 : 0000000000000006  r28 : 0000000000003100  r29 : 0000000000000002

r30 : 0000000000000000  r31 : 0000000171e4ba28

**** end of signal context ****

************************************

SQL causing error : INSERT INTO saptools..DBH_SNAP_MEMORYUSAGE(        COLLECT_MODE,        SNAPSHOT_TIMESTAMP,        FreeSize_Delta_KB,        FreeSize_KB,        Memor

************************************

SQL Text: INSERT INTO saptools..DBH_SNAP_MEMORYUSAGE(        COLLECT_MODE,        SNAPSHOT_TIMESTAMP,        FreeSize_Delta_KB,        FreeSize_KB,        MemoryPoolCategory,        MemoryPoolName,        NumAllocs,        NumBlocks,        NumBlocks_Delta,        NumFrees,        NumRetries,        NumSearches,        NumSleeps,        PoolType,        SOURCE_HOSTNAME,        TotalSize_Delta_KB,        TotalSize_KB,        UsedSize_Delta_KB,        UsedSi

SQL Text: _KB) SELECT 'S',        current_bigdatetime() AS SNAPSHOT_TIMESTAMP,        ((FreeSize/1024)) AS FreeSize_Delta_KB,        ((FreeSize/1024)) AS FreeSize_KB,        (CASE WHEN ConfigOption = 'cfgpss' THEN 'Pss Frag Pool' ELSE MemoryPoolName END) AS MemoryPoolCategory,        SRC_MONMEMORYUSAGE.MemoryPoolName,        SRC_MONMEMORYUSAGE.NumAllocs,        SRC_MONMEMORYUSAGE.NumBlocks,        (NumBlocks) AS NumBlocks_Delta,        SRC_MONMEMORYUSAGE.N

SQL Text: Frees,        SRC_MONMEMORYUSAGE.NumRetries,        SRC_MONMEMORYUSAGE.NumSearches,        SRC_MONMEMORYUSAGE.NumSleeps,        SRC_MONMEMORYUSAGE.PoolType,        (saptools.dbo.sap_realhostname(0)) AS SOURCE_HOSTNAME,        ((TotalSize/1024)) AS TotalSize_Delta_KB,        ((TotalSize/1024)) AS TotalSize_KB,        ((UsedSize/1024)) AS UsedSize_Delta_KB,        ((UsedSize/1024)) AS UsedSize_KB FROM   master..monMemoryUsage AS SRC_MONMEMORYUSAGE

SQL Text:  DBH_MEMORYUSAGE: SNAPSHOT */

curdb = 5 tempdb = 2 pstat = 0x10100 p2stat = 0x901000

p3stat = 0x800 p4stat = 0x40000000 p5stat = 0x8 p6stat = 0x1 p7stat = 0x10000

lasterror = 0 preverror = 0 transtate = 0

curcmd = 195 program = JS Agent - sapsa

extended error information: hostname:  login: sapsa

pc: 0x0000000100026acc pcstkwalk+0x654()

pc: 0x0000000100025c40 ucstkgentrace+0x178()

pc: 0x0000000100025070 ucbacktrace+0xa8()

pc: 0x000000010011c084 terminate_process.fdpr.chunk.4+0x240()

pc: 0x0000000101bed0a0 kisignal+0x2e8()

pc: 0x00000001007a0808 kbfusage.fdpr.chunk.2+0xbc()

pc: 0x00000001005c42bc ubfprop.fdpr.chunk.3+0x8()

pc: 0x000000010007c87c kbprop+0xac()

pc: 0x0000000102a4ce6c mda__MemUsg_one_FragmentPool+0xc4()

pc: 0x0000000102a4c25c mda__MemUsg_FragmentPool+0x12c()

pc: 0x0000000102a4bb34 mda_populate_monMemoryUsage+0x1dc()

pc: 0x0000000100313f18 mda_exec+0xf8()

pc: 0x000000010298ff5c VTABRemoteAccess::startScan(short,short,bool)+0x290()

pc: 0x00000001023889ec LeScanOp::_LeOpNext.fdpr.chunk.7(ExeCtxt&)+0x1a8()

pc: 0x000000010063f8a0 LeInsertOp::_LeOpNext(ExeCtxt&)+0x1b8()

pc: 0x0000000100629f6c LeEmitNoSndOp::_LeOpNext(ExeCtxt&)+0x2bc()

pc: 0x00000001006296c0 LePlanNext+0x178()

[Handler pc: 0x00000001007904e4 le_execerr installed by the following function:-]

pc: 0x00000001006277b0 exec_lava+0x2d0()

pc: 0x0000000100630bd4 s_execute.fdpr.chunk.32+0x2e4()

[Handler pc: 0x00000001007903c4 hdl_stack installed by the following function:-]

[Handler pc: 0x0000000100899ce8 s_handle installed by the following function:-]

pc: 0x000000010061bba8 sequencer+0x480()

[Handler pc: 0x00000001015be514 intsql__handle installed by the following function:-]

pc: 0x000000010071be08 internal_sql+0x4b4()

pc: 0x000000010071b71c s_execute.fdpr.chunk.55+0x54()

[Handler pc: 0x00000001007903c4 hdl_stack installed by the following function:-]

[Handler pc: 0x0000000100899ce8 s_handle installed by the following function:-]

pc: 0x000000010061bba8 sequencer+0x480()

pc: 0x0000000100612acc execproc+0x450()

pc: 0x00000001006e2864 s_execute.fdpr.chunk.43+0xcc()

[Handler pc: 0x00000001007903c4 hdl_stack installed by the following function:-]

[Handler pc: 0x0000000100899ce8 s_handle installed by the following function:-]

pc: 0x000000010061bba8 sequencer+0x480()

pc: 0x000000010071d3c4 tdsrecv_language+0x258()

[Handler pc: 0x00000001007747a4 ut_handle installed by the following function:-]

pc: 0x000000010071cfc0 conn_hdlr.fdpr.chunk.12+0xc4()

end of stack trace, spid 433, kpid 354746747, suid 4

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Viewing all 3678 articles
Browse latest View live


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