Skip to Content
Technical Articles
Author's profile photo Julie Plummer

SAP AS ABAP 7.52 SP04 and SAP ASE: Setting the Maximum Database Size Manually

We purposely configured the database as small as possible by default, so that it would fit for as many people as possible.

However, this may limit various use cases. This is where the SAP ASE auto expansion feature comes in handy. This allows automatic database free space allocation in predefined increments when a threshold is hit. Further, the maximum database size for automatic expansion can also be set.

To set this up, follow these steps:

1. Log into the operating system as user sybnpl and execute

isql -Usapsa -X -w999 -SNPL

 

2. Next, switch into the database master by running the command

1> use master

2> go

 

3. To get an overview about the current setup of automatic database expansion rules, run the command

1>  sp_dbextend listfull

2> go
type     name              segment item    value  status   comment

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

feature  server-wide       (n/a)   (n/a)   (n/a)  enabled  set='May 25 2019 12:29PM'

database NPL               system  growby  2000M  enabled  set='May 28 2019  9:54PM'

database NPL               system  maxsize 40000M enabled  set='May 28 2019  9:54PM'

database default           (all)   growby  0      disabled mod='May 25 2019 12:29PM' set='May 25 2019 12:29PM'

device   NPL_data_001      (n/a)   growby  2000M  enabled  set='May 28 2019  9:55PM'

device   NPL_data_001      (n/a)   maxsize 40000M enabled  set='May 28 2019  9:55PM'

device   NPL_data_002      (n/a)   maxsize 0      enabled  set='Jul 11 2018  7:21AM'

device   NPL_data_002      (n/a)   growby  1024M  enabled  set='Jul 11 2018  7:21AM'

device   NPL_data_003      (n/a)   maxsize 0      enabled  set='Jul 11 2018  7:21AM'

device   NPL_data_003      (n/a)   growby  1024M  enabled  set='Jul 11 2018  7:21AM'

device   default           (n/a)   growby  0      enabled  mod='May 25 2019 12:29PM' set='May 25 2019 12:29PM'

device   saptools_data_001 (n/a)   growby  1024M  enabled  set='May 28 2019  9:56PM'

device   saptools_data_001 (n/a)   maxsize 4000M  enabled  set='May 28 2019  9:56PM'

(1 row affected)

(return status = 0)

 

4.In this example, since you are configuring auto expansion from scratch, you need to clean up the current configuration:

1> sp_dbextend 'clear', 'device', NPL_data_001
2> go
1> sp_dbextend 'clear', 'device' , NPL_data_002
2> go
1> sp_dbextend 'clear', 'device' , NPL_data_003
2> go
1> sp_dbextend 'clear', 'device' , 'default'
2> go
1> sp_dbextend 'clear', 'database' , 'default'
2> go
1> sp_dbextend 'clear', 'device', saptools_data_001
2>	go
1> sp_dbextend 'clear','database' , NPL
2> go

5. Next, we set up rules, such that for database saptools we increment by 1 GB steps as soon as only 200 MB free space is left. Automatic expansion will happen until a maximum size of 5 GB is reached:

1> use saptools
2> go
1> exec sp_dbextend 'set', 'device', saptools_data_001, '1G', '5G'
2> go
1> exec sp_dbextend 'set', 'database', saptools, 'default','1G', '5G'
2> go
1> exec sp_dbextend 'set', 'threshold', saptools, 'default','200M'
2> go
1> exec sp_dbextend 'enable' , 'database', saptools
2> go

 

6. Similar to the database saptools we are going to setup rules for database NPL. For database NPL the free space threshold will be 1G, the allocation increment will be 5G, the maximum auto expansion database size will be 40G:

1> use NPL
2> go
1> exec sp_dbextend 'set', 'device', NPL_data_001, '5G', '40G'
2> go
1> exec sp_dbextend 'set', 'database', NPL, 'default','5G', '40G'
2> go
1> exec sp_dbextend 'set', 'threshold', NPL, 'default','1G'
2> go
1> exec sp_dbextend 'enable' , 'database', NPL
2> go
1> sp_dbextend 'simulate', NPL, 'default', '2'
2> go

 

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo flavio ciotola
      flavio ciotola

      Thank you Julie for sharing this possibility

      Author's profile photo Sajid Rahim
      Sajid Rahim

      Hi Julie

      There is an error with part5,6,7.  If you can review and advise.

       

      ! D:\NetWeaver75\ShareFolder\TD752SP04part05.rar: Packed data checksum error in server\TAR\x86_64\dbdata.tgz-ab. The volume is corrupt
      ! D:\NetWeaver75\ShareFolder\TD752SP04part06.rar: Checksum error in server\TAR\x86_64\dbdata.tgz-ab. The file is corrupt
      ! D:\NetWeaver75\ShareFolder\TD752SP04part06.rar: Packed data checksum error in server\TAR\x86_64\dbdata.tgz-ac. The volume is corrupt
      ! D:\NetWeaver75\ShareFolder\TD752SP04part07.rar: Checksum error in server\TAR\x86_64\dbdata.tgz-ac. The file is corrupt

      Author's profile photo Julie Plummer
      Julie Plummer
      Blog Post Author

      Hi Sajid,

      Please post a question to the forum, hashtag #ABAP_Trial.
      BR

      Author's profile photo Brinca Aderito
      Brinca Aderito

      Thank you Julie, I just replicated the steps you've described here.

      I've installed SAP AS ABAP 7.52 SP04 on a SUSE machine some weeks ago for self-training, and I notice that it takes longer to login via the windows SAP GUI (I'm using my window laptop as client) as the days pass, and also that the performance is decreasing. Would you know if there is the need to clear logs or information about simple actions to be done by a functional to keep the performance of the server steady?

      Many thanks for all the information you've been sharing in this and other blogs

      Aderito Brinca

      Author's profile photo Julie Plummer
      Julie Plummer
      Blog Post Author

      Hi Brinca,

      I am not a specialist in this area.

      I strongly recommend you make this question easier for other Community experts to find, by creating a new question in the ABAP Development forum:

      https://answers.sap.com/questions/ask.html?primaryTagId=833755570260738661924709785639136&topics=abap_trial

      In the meantime, others have answered this question as follows:

      “There are several utility programs available, for example:

      Application Log: Delete logs in SAP (SLG2).

      You can also Display logs in SAP (SLG1).

      More information here:

      SLG2 SAP tcode - Application Log: Delete logs

      Also: Delete ST22 dumps by running RSSNAPDL.

      More information here:

      RSSNAPDL SAP ABAP Report - Reorganization Program for Table SNAP of Short Dumps

      Source:

      https://blogs.sap.com/2021/02/15/sap-abap-platform-1909-developer-edition-available-soon/ Search: SLG2 to find the comment

      HTH Julie.