cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase ASE - Cannot change parameter to start DB

Former Member
0 Kudos

Hi,

We are facing an issue while trying to start our Sybase ASE database running on Windows 2012. This is after we had to take a reboot of the server and the application/DB were stopped correctly.

The corresponding SQL service Sybase SQLServer_<SID> is not running even after trying manually.

The ASE <SID>.log file has the following information.
----------------------------------------------------
kernel libomni1 - Component Integration Services: using 'Sybase Client-Library/15.7/P-EBF23553 SP132/X64/BUILD1570-046/OPT/Sun Nov 02 11:18:33 2014'

kernel Cannot allocate shared memory as 'max memory' limit of '3398304' pages has been reached. Please increase configuration parameter 'max memory' to allow additional shared memory allocation. Total physical memory allocated so far '3398304' pages.

server  Configuration of the cache (default data cache) failed since the defined cache configuration consumes more memory than is available for buffer caches.

server  Invalid Configuration: Unable to start Adaptive Server. The server may be started with a default configuration using the -c startserver option.

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


Tried starting the DB using -c startserver, but that doesnt work.

Logs:

------------------------------------------------------------------------------
D:\sybase\SED\ASE-15_0\install>RUN_SED.bat -c startserver

D:\sybase\SED\ASE-15_0\install>rem

D:\sybase\SED\ASE-15_0\install>rem Adaptive Server Information:

D:\sybase\SED\ASE-15_0\install>rem  name:                          SED

D:\sybase\SED\ASE-15_0\install>rem  master device:                

D:\sybase\SED\sybsystem\master.dat

D:\sybase\SED\ASE-15_0\install>rem  server page size:              16384

D:\sybase\SED\ASE-15_0\install>rem  master device size:            400

D:\sybase\SED\ASE-15_0\install>rem  errorlog:                     

D:\sybase\SED\ASE-15_0\install\SED.log

D:\sybase\SED\ASE-15_0\install>rem  interfaces:                    D:\sybase\SED\ini

D:\sybase\SED\ASE-15_0\install>rem

D:\sybase\SED\ASE-15_0\install>"D:\sybase\SED\ASE-15_0\bin\sqlsrvr.exe" -d"D:\sy

base\SED\sybsystem\master.dat" -sSED -e"D:\sybase\SED\ASE-15_0\install\SED.log"

-i"D:\sybase\SED\ini" -M"D:\sybase\SED\ASE-15_0"

00:0000:00000:00000:2015/01/14 12:36:15.92 kernel  kcinit: couldn't open error l

og file 1'D:\sybase\SED\ASE-15_0\install\SED.log'.

00:0000:00000:00000:2015/01/14 12:36:15.92 kernel  Failed to log the current mes

sage in the Windows NT event log
------------------------------------------------------------------------------

The problem is that since database is down, we cannot login to isql to change the parameters. We even tried modifying the <SID>.cfg file manually  and restarting DB to update the parameter, but didn't help. The <SID>.log file is not updated after restart.

How to change the database parameter when sybase database is down? Any other way to start the database?

The problem is similar to the one mentioned in the following thread:

http://scn.sap.com/thread/3633956

Would appreciate your inputs.

Regards,

Varun

Former Member
0 Kudos

Hi Mark,

We have sufficient memory available, so we are trying to scale up the max memory parameter.

The issue is that when we are trying to update the database <SID>.cfg file using any windows editor, the changes are not being captured in the database <SID>.log file after restart.

Hence, it seems like the new parameters are not being accepted using this method.

Is there any other way to change the max memory parameters?

Regards,

Varun

Mark_A_Parsons
Contributor
0 Kudos

I'd suggest making sure you're using notepad as it doesn't introduce any funky EOL characters that could be messing up the format (thus keeping the dataserver from properly reading the file).

I'm wondering if you're updating the correct file ...the log should print out a message stating the full path of the *cfg file it's using (ie, are you editing the correct file?).

Is the *log still showing the same number of pages (ie, '3398304'), or is it showing a new/larger number?

Former Member
0 Kudos

Hi Mark,


We are using the correct configuration file, as mentioned in the <SID>.log file and using notepad for updating the <SID>.cfg file.

Unfortunately, the log file is no longer getting updated, so not sure if the updated values for memory are being read correctly.


Please find extract from <SID>.log file for reference. Any further pointers would be appreciated.

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

00:0000:00000:00000:2015/01/14 09:30:57.57 kernel  SySAM: Checked out license for 4 ASE_CORE (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:30:57.57 kernel  This product is licensed to: SAP, for use with SAP Business Applications.

00:0000:00000:00000:2015/01/14 09:30:57.57 kernel  Checked out license ASE_CORE

00:0000:00000:00000:2015/01/14 09:30:57.61 kernel  Adaptive Server Enterprise (Enterprise Edition)

00:0000:00000:00000:2015/01/14 09:30:57.91 kernel  Using config area from primary master device.

00:0000:00000:00000:2015/01/14 09:30:57.97 kernel  Warning: Using default file 'D:\sybase\SED\SED.cfg' since a configuration file was not specified. Specify a configuration file name in the RUNSERVER file to avoid this message.

00:0000:00000:00000:2015/01/14 09:30:58.02 kernel  The value of the option 'number of engines at startup' is not set to its default. This option has no effect in threaded mode.

00:0000:00000:00000:2015/01/14 09:30:58.04 kernel  SySAM: Checked out license for 4 ASE_PARTITIONS (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:30:58.04 kernel  Checked out license ASE_PARTITIONS

00:0000:00000:00000:2015/01/14 09:30:58.05 kernel  SySAM: Checked out license for 4 ASE_COMPRESSION (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:30:58.05 kernel  Checked out license ASE_COMPRESSION

00:0000:00000:00000:2015/01/14 09:30:58.07 kernel  SySAM: Checked out license for 4 ASE_ASM (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:30:58.07 kernel  Checked out license ASE_ASM

00:0000:00000:00000:2015/01/14 09:30:58.08 kernel  Allocating a shared memory segment of size 1352794112 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.02 kernel  Allocating a shared memory segment of size 255918080 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.05 kernel  Allocating a shared memory segment of size 4295032832 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.14 kernel  Allocating a shared memory segment of size 1055981568 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.35 kernel  Kernel memory at 0x0000000020000000, 1352794112 bytes

00:0000:00000:00000:2015/01/14 09:31:00.35 kernel  Kernel memory at 0x0000000020000000, 4622336 bytes

00:0000:00000:00000:2015/01/14 09:31:00.35 kernel  Server part of first shared memory region at 0x0000000020468800, 1348171776 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.36 kernel  Failed to log the current message in the Windows NT event log

00:0000:00000:00000:2015/01/14 09:31:00.36 kernel  Server region 0 at 0x0000000070BD0000, 255918080 bytes

00:0000:00000:00000:2015/01/14 09:31:00.36 kernel  Server region 1 at 0x000000007FFF0000, 4295032832 bytes

00:0000:00000:00000:2015/01/14 09:31:00.36 kernel  Server region 2 at 0x0000000180030000, 1055981568 bytes

00:0000:00000:00000:2015/01/14 09:31:00.36 kernel  Highest valid address is 0x00000001BEF40000

00:0000:00000:00000:2015/01/14 09:31:00.38 kernel  Adaptive Server is using the threaded kernel mode.

00:0000:00000:00000:2015/01/14 09:31:00.38 kernel  Using 100000 file descriptors.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Adaptive Server Enterprise/15.7/EBF 23465 SMP SP131 /P/X64/Windows Server/ase157sp131x/3896/64-bit/OPT/Mon Nov 03 17:27:09 2014

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Confidential property of Sybase, Inc.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Copyright 1987, 2014

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Sybase, Inc.  All rights reserved.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Unpublished rights reserved under U.S. copyright laws.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel 

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  This software contains confidential and trade secret information of Sybase,

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Inc.   Use,  duplication or disclosure of the software and documentation by

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  the  U.S.  Government  is  subject  to  restrictions set forth in a license

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  agreement  between  the  Government  and  Sybase,  Inc.  or  other  written

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  agreement  specifying  the  Government's rights to use the software and any

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  applicable FAR provisions, for example, FAR 52.227-19.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Using D:\sybase\SED\ as the 'SYBASE' environment variable, found during startup.

00:0000:00000:00000:2015/01/14 09:31:00.39 kernel  Using OCS-15_0 as the 'SYBASE_OCS' environment variable, found during startup.

00:0000:00000:00000:2015/01/14 09:31:00.41 kernel  Using ASE-15_0 as the 'SYBASE_ASE' environment variable, found during startup.

00:0000:00000:00000:2015/01/14 09:31:00.41 kernel  ASE booted on host 'SAPSED' running Windows Server 2012 build 9200 .

00:0000:00000:00000:2015/01/14 09:31:00.41 kernel  Using 'D:\sybase\SED\SED.cfg' for configuration information.

00:0000:00000:00000:2015/01/14 09:31:00.41 kernel  Logging ASE messages in file 'D:\sybase\SED\ASE-15_0\install\SED.log'.

00:0000:00000:00000:2015/01/14 09:31:00.47 kernel  Disk Controller Manager is online.

00:0000:00000:00000:2015/01/14 09:31:00.47 kernel  Network Controller Manager is online.

00:0000:00000:00000:2015/01/14 09:31:00.47 kernel  Ct-Lib Controller Manager is online.

00:0000:00000:00000:2015/01/14 09:31:00.50 kernel  Platform TCP network support seems IPv6-aware, IPv4/IPv6 are both enabled.

00:0000:00000:00000:2015/01/14 09:31:00.50 kernel  ASE booted with TCP_NODELAY enabled.

00:0000:00000:00000:2015/01/14 09:31:00.52 kernel  Network and device connection limit is 99987.

00:0000:00000:00000:2015/01/14 09:31:00.52 kernel  ASE - Dynamic Pluggable Component Interface is disabled

00:0000:00000:00000:2015/01/14 09:31:00.64 kernel  *** WARNING ******************

00:0000:00000:00000:2015/01/14 09:31:00.64 kernel  Operating system may favor the system cache when memory is at a premium.

To disable this warning, set the registry parameter 'LargeSystemCache' to 0 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.

00:0000:00000:00000:2015/01/14 09:31:00.64 kernel  Adaptive Server Enterprise NT process id is 0xfec.

00:0000:00000:00000:2015/01/14 09:31:00.64 kernel  Adaptive Server Enterprise was started as a windows service.

00:0000:00000:00000:2015/01/14 09:31:05.54 server  Number of blocks left for proc headers: 819008.

00:0000:00000:00000:2015/01/14 09:31:05.55 server  Proc header memory allocated 10237 pages for each per engine cache.

00:0000:00000:00000:2015/01/14 09:31:05.57 server  Proc header memory allocated 10237 pages for engine 0 local cache

00:0000:00000:00000:2015/01/14 09:31:05.58 kernel  Create Thread Pool 2, "syb_system_pool", type="Run To Completion", with 1 threads

00:0000:00000:00000:2015/01/14 09:31:05.58 kernel  Create Thread Pool 3, "syb_blocking_pool", type="Run To Completion", with 4 threads

00:0000:00000:00000:2015/01/14 09:31:05.58 kernel  Create Thread Pool 1, "syb_default_pool", type="Engine (Multiplexed)", with 3 threads

00:0000:00000:00000:2015/01/14 09:31:05.58 kernel  Aggressive task stealing enabled

00:0000:00000:00000:2015/01/14 09:31:05.60 server  Proc header memory allocated 10237 pages for engine 1 local cache

00:0000:00000:00000:2015/01/14 09:31:05.60 server  Proc header memory allocated 10237 pages for engine 2 local cache

00:0001:00000:00000:2015/01/14 09:31:05.88 kernel  I/O controller 2 (NetController) is running as task 544214832 on thread 1 (LWP 3584).

00:0009:00000:00000:2015/01/14 09:31:05.88 kernel  I/O controller 3 (DiskController) is running as task 544215168 on thread 9 (LWP 4100).

00:0000:00000:00000:2015/01/14 09:31:05.88 kernel  Initializing virtual device 0, 'D:\sybase\SED\sybsystem\master.dat' with dsync 'off'.

00:0000:00000:00000:2015/01/14 09:31:05.89 kernel  Virtual device 0 started using asynchronous (with DIRECTIO) i/o.

00:0000:00000:00000:2015/01/14 09:31:05.91 server  Loaded default Unilib conversion handle.

00:0000:00000:00000:2015/01/14 09:31:05.91 kernel  Either the config parameter 'use security services' is set to 0, or ASE does not support use of external security mechanisms on this platform. The Security Control Layer will not be initialized. No external security mechanisms will be supported.

00:0000:00000:00000:2015/01/14 09:31:07.87 kernel  Loaded encryption provider CSI-2.9M12-winx64-2014/06/05 20:16:32 PDT-sybcsi_openssl-OpenSSL 1.0.1h-fips 5 Jun 2014.

00:0000:00000:00000:2015/01/14 09:31:07.87 kernel  Begin processing to generate RSA keypair.

00:0000:00000:00000:2015/01/14 09:31:08.05 kernel  Completed processing to generate RSA keypair.

00:0000:00000:00000:2015/01/14 09:31:08.05 kernel  Begin processing to generate RSA keypair.

00:0000:00000:00000:2015/01/14 09:31:08.16 kernel  Completed processing to generate RSA keypair.

00:0000:00000:00000:2015/01/14 09:31:08.20 kernel  Encryption provider initialization succeeded on engine 0.

00:0011:00000:00000:2015/01/14 09:31:08.20 kernel  Sybperf helper thread is online

00:0000:00000:00000:2015/01/14 09:31:08.30 kernel  Sybperf performance monitoring subsystem is active

00:0006:00000:00000:2015/01/14 09:31:08.30 kernel  Network and device connection limit is 99987.

00:0006:00000:00000:2015/01/14 09:31:08.30 kernel  ASE - Dynamic Pluggable Component Interface is disabled

00:0006:00000:00000:2015/01/14 09:31:08.30 kernel  Thread 6 (LWP 2996) of Threadpool syb_default_pool online as engine 0

00:0006:00000:00000:2015/01/14 09:31:08.32 server  No active traceflags

00:0006:00000:00001:2015/01/14 09:31:08.40 kernel  libomni1 - Component Integration Services: using 'Sybase Client-Library/15.7/P-EBF23553 SP132/X64/BUILD1570-046/OPT/Sun Nov 02 11:18:33 2014'

00:0006:00000:00001:2015/01/14 09:31:08.41 kernel  Cannot allocate shared memory as 'max memory' limit of '3398304' pages has been reached. Please increase configuration parameter 'max memory' to allow additional shared memory allocation. Total physical memory allocated so far '3398304' pages.

00:0006:00000:00001:2015/01/14 09:31:10.98 server  Configuration of the cache (default data cache) failed since the defined cache configuration consumes more memory than is available for buffer caches.

00:0006:00000:00001:2015/01/14 09:31:10.98 server  Invalid Configuration: Unable to start Adaptive Server. The server may be started with a default configuration using the -c startserver option.

00:0006:00000:00001:2015/01/14 09:31:10.98 kernel  ueshutdown: exiting

00:0011:00000:00000:2015/01/14 09:31:10.98 kernel  Sybperf helper thread is quitting

00:0000:00000:00000:2015/01/14 09:31:10.98 kernel  Main thread performing final shutdown.

00:0007:00000:00000:2015/01/14 09:31:10.98 kernel  Network and device connection limit is 99987.

00:0007:00000:00000:2015/01/14 09:31:10.98 kernel  Encryption provider initialization succeeded on engine 1.

00:0007:00000:00000:2015/01/14 09:31:10.98 kernel  Thread 7 (LWP 2236) of Threadpool syb_default_pool online as engine 1

00:0000:00000:00000:2015/01/14 09:31:11.05 kernel  Blocking call queue shutdown.

00:0000:00000:00000:2015/01/14 09:31:12.02 kernel  SySAM: Checked in license for 4 ASE_ASM (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:31:12.02 kernel  SySAM: Checked in license for 4 ASE_CORE (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:31:12.02 kernel  SySAM: Checked in license for 4 ASE_PARTITIONS (2020.1231/permanent/100C 0F04 3F88 1821).

00:0000:00000:00000:2015/01/14 09:31:12.02 kernel  SySAM: Checked in license for 4 ASE_COMPRESSION (2020.1231/permanent/100C 0F04 3F88 1821).

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

Thanks!

Regards,

Varun

Mark_A_Parsons
Contributor
0 Kudos

From the *log file:

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

00:0006:00000:00001:2015/01/14 09:31:08.41 kernel  Cannot allocate shared memory as 'max memory' limit of '3398304' pages has been reached. Please increase configuration parameter 'max memory' to allow additional shared memory allocation. Total physical memory allocated so far '3398304' pages.

00:0006:00000:00001:2015/01/14 09:31:10.98 server  Configuration of the cache (default data cache) failed since the defined cache configuration consumes more memory than is available for buffer caches.

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

Hmmm, the number of memory pages (3398304) has not changed since your first post.


What config value are you changing in the *cfg file?  (You should be increasing 'max memory'.) Could you attach the *cfg file to your reply?

Former Member
0 Kudos

Hi Mark,

Appreciate all your help on this.

The configuration file is attached for reference (Changed the extension to .txt since it won't allow to attach)


Let me know in case you notice anything missing.

Regards,

Varun

Mark_A_Parsons
Contributor
0 Kudos

Hmmm, the attached file has max memory = 5242880, but the log file is only seeing max memory = 3398304.

Could you set aside the *cfg file you've been editing (eg, rename D:\sybase\SED\SED.cfg to D:\sybase\SED\SED.txt) and then try restarting the dataserver?  I'd like to see what the errorlog says about a) the *cfg file it chooses to use and b) the 'max memory' setting.

Former Member
0 Kudos

Hi,

Tried, but as expected, nothing is been written to SED.log... strange

Regards,

Varun

Mark_A_Parsons
Contributor
0 Kudos

Nothing showed up in the SED.log file?  Hmmmm ... very confusing ... any messages in the Windows event log?

How are you starting the dataserver? as a service? or via the runserver file (eg, SED.bat)?

If using the runserver batch file, have you made sure you first sourced the D:\sybase\SED\SYBASE.bat file?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188958
Active Contributor
0 Kudos

The error about not being able to open the errorlog is typically a permissions error.  When opening the "Command Prompt" utility, are you using the "run as administrator" option? (right click on the icon to select this option).

-bret

SybDBA
Participant
0 Kudos

Hi Bret,

Is there any command in isql(black screen) on Unix to view the history of sql commands fired???

If there is any alternative to this Kindly let me know.

Regards,

Pankaj

former_member188958
Active Contributor
0 Kudos

I don't really have any experience using the feature, but the docs say isql has a history feature.

See Command History in isql

I think the alternative sqsh tool also has a history feature.  It has a good reputation, though I haven't used it.

sqsh - Sybase isql replacement. | SourceForge.net

Former Member
0 Kudos

In Unix isql, you can type "vi" at the 1> prompt to edit the last command.

Once you are past the 1> prompt, the prior command is lost.

Cory

SybDBA
Participant
0 Kudos

thanks Bret,

I am not getting the stuff in the link Command History in isql

isql -Uguest -Ppassword -Smyase --history p1024

    --history_file myaseHistory.log <<EOF

exec sp_x_y_z

go

Help me to understand this.

Regards,

Pankaj

Former Member
0 Kudos

Pankaj,
You missed the fine print of the line above the example...
Redirected input is NOT part of command history.


The Sybooks/infocenter document says that this example does not work.

Cory

Former Member
0 Kudos

Hi Varun,

I have the same issue here and it looks like a bug to me. If you decrease the procedure cache size

you might be able to start Sybase with a particular "max memory". But if you try to increase the "default data cache" by the same amount you decrease the procedure cache before, Sybase won't come up anymore. I notices that there is an upper limit of 2.3 GB for the default data cache independent on the max memory. I used 10 GB max memory (12 GB RAM) but was not able to configure more than 2.3 GB default data cache. This makes SAP ASE 15.7 unusable on Windows for production environments. Maybe someone else faced the same issue or opened a support case at SAP ?

Regards,

Mat

0 Kudos

Hello,

you have set max memory to 5242880, this will be 10485760 KB (or 10 GB). When I check the last error log you have uploaded then I can see that the ASE isn't able to allocate the max memory:

00:0000:00000:00000:2015/01/14 09:30:58.08 kernel  Allocating a shared memory segment of size 1352794112 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.02 kernel  Allocating a shared memory segment of size 255918080 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.05 kernel  Allocating a shared memory segment of size 4295032832 bytes.

00:0000:00000:00000:2015/01/14 09:31:00.14 kernel  Allocating a shared memory segment of size 1055981568 bytes.

All together will be 6959726592 bytes (6796608 KB or 6,48 GB).

Was this configuration working in the past ? When was the last successful start of the ASE ? Check the time stamp of this start and then compare your SED.cfg with the SED.<number> file that has a similar time stamp.

Hope this will help.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Thanks for the update.

I compared the log file with previous <SID>.cfg files and the configuration with which the databsae was started successfully the last time had max memory parameter set to 3398304.

Unfortunately, ever since we updated the <SID>.cfg files manually, the <SID>.log file is not being updated. The corresponding service is not starting and displays the following error.

Any pointers?

Regards,

Varun

Former Member
0 Kudos

Hi All,

Thank you all for the valuable inputs.

I managed to fix this by stopping SAP and DB, took backup of <SID>.cfg file and renamed the <SID>.log file since nothing was been written to this file. This ensured a new log file is created during next startup.

Next, I used one of the old cfg files and bumped up max memory parameters and scaled down procedure cache size parameter to create a new <SID>.cfg files

Was then able to start the DB and application successfully.


Regards,

Varun