Quantcast
Channel: SCN : All Content - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all 757 articles
Browse latest View live

Problem with NULL values using Sybase ODBC driver in Linux

$
0
0

Hi,

 

I am accessing a Sybase ASE 15.7 database using Sybase ASE 16.0 ODBC driver on Ubuntu 14.04.

 

I have a strange problem with fetching NULL values. At first I noticed the problem with a Python script,

but the problem remains the same when using the isql command line tool that comes with unixodbc

package. The isql command line tool can be used to access the Sybase ASE database via ODBC driver

and test if the ODBC driver configuration is valid.

 

The problem can be tested with a simple select statement with a column which does not have a value

i.e. is NULL.

 

As you can see the ISNULL function is used here to make sure the column customer_segment is NULL:

 

SQL> select ISNULL(customer_segment, 'has no value') from test_table where id = 50

+-------------+

|             |

+-------------+

| has no value|

+-------------+

SQLRowCount returns -1

1 rows fetched

 

 

SQL> select language, customer_segment from test_table where id = 50

+---------+-----------------+

| language| customer_segment|

+---------+-----------------+

| FI      | FI              |

+---------+-----------------+

SQLRowCount returns -1

1 rows fetched

SQL>

 

Has anyone of you seen this before? Is this a known problem?

 

Any help would be appreciated.

 

Thanks is advance,

Kari


backup server

$
0
0

I have a question in backup server i try to get the problem but i could not solve it.

 

Why a bad performance when i load database although i have another instance on the same machine and same file system and no problem in loading .the loading takes a double time than other instance

I increase shared memory of backup at this instance .what else could i do to get solve this problem.

 

Thanks

adaptive server was shutdown

$
0
0

Dear Sirs,

 

Could you please look at timeslice errorlog and

suggest the solution.

where adaptive server went down?

 

error log:

 

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR23: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR24: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR25: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR26: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR27: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR28: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  FR29: -2.000003

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  **** end of signal context ****

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  timeslice error: spid 992 exhausted its 'time slice' of 1000 milliseconds and additional 'cpu grace time' of 500 ticks (50000 milliseconds). It has been marked for termination.

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  This Adaptive Server process has had 3 major and 496 minor page faults since boot.

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  ************************************

00:0007:00000:00012:2016/02/09 14:09:10.23 server  SQL Text: [no text]

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  curdb = 31516 tempdb = 2 pstat = 0x200 p2stat = 0x100000

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  p3stat = 0x400800 p4stat = 0x0 p5stat = 0x0 p6stat = 0x0 p7stat = 0x10000

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  lasterror = 0 preverror = 0 transtate = 0

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  curcmd = 0 program =                              

00:0007:00000:00012:2016/02/09 14:09:10.23 kernel  extended error information: hostname:  login:

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  Spinlocks held by  kpid 474809261

 

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  Spinlock default data cache at address c000000102c77300 owned by 474809261

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  ************************************

00:0002:00000:00011:2016/02/09 14:09:10.23 server  SQL Text: [no text]

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  curdb = 1 tempdb = 2 pstat = 0x200 p2stat = 0x100100

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  p3stat = 0x800 p4stat = 0x2 p5stat = 0x0 p6stat = 0x400 p7stat = 0x10000

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  lasterror = 0 preverror = 0 transtate = 1

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  curcmd = 0 program =                              

00:0002:00000:00011:2016/02/09 14:09:10.23 kernel  extended error information: hostname:  login:

00:0005:00000:00992:2016/02/09 14:09:10.23 kernel  End of spinlock display.

00:0007:00000:00012:2016/02/09 14:09:10.24 kernel  pc: 0x4000000005bf81a0 pcstkwalk+0xf0(0x00000000007d003f, 0x0000000000000002, 0x000000000000270f, 0x0000000000000000, 0x0000000000000000)

00:0002:00000:00011:2016/02/09 14:09:10.25 kernel  pc: 0x4000000005bf81a0 pcstkwalk+0xf0(0x00000000007b003e, 0x0000000000000002, 0x000000000000270f, 0x0000000000000000, 0x0000000000000000)

00:0005:00000:00992:2016/02/09 14:09:10.26 kernel  pc: 0x4000000005bf81a0 pcstkwalk+0xf0(0x000000001c4d03ad, 0x0000000000000002, 0x000000000000270f, 0x0000000000000000, 0x0000000000000000)

00:0007:00000:00012:2016/02/09 14:09:10.26 kernel  pc: 0x4000000005bf7030 ucstkgentrace+0xb70(0x00000000007d003f, 0x0000000000000001, 0x6000000000668138, 0xc000000000000918, 0x4000000003302330)

00:0007:00000:00012:2016/02/09 14:09:10.26 kernel  pc: 0x4000000005bf0680 ucbacktrace+0x140(0x0000000000000000, 0xffffffffffffffff, 0x6000000000668138, 0xc000000000000591, 0x4000000005c93b00)

00:0007:00000:00012:2016/02/09 14:09:10.26 kernel  pc: 0x4000000003302330 $cold_terminate_process+0x1de0(0xc00000026f2dbd18, 0xc000000000000187, 0xc0000001c100c000, 0x6000000000668138, 0xe00000013af97420)

00:0005:00000:00992:2016/02/09 14:09:10.26 kernel  pc: 0x4000000005bf7030 ucstkgentrace+0xb70(0x000000001c4d03ad, 0x0000000000000001, 0x6000000000668138, 0xc000000000000b9f, 0x4000000003300730)

00:0002:00000:00011:2016/02/09 14:09:10.27 kernel  pc: 0x4000000005bf7030 ucstkgentrace+0xb70(0x00000000007b003e, 0x0000000000000001, 0x6000000000668138, 0xc000000000000918, 0x4000000003302330

Dump database failing for read only database after enabled 'enable dump history'

$
0
0

Before  configuring  new feature ''enable dump history'' for database  backup (which is  read only )  was working perfectly fine .

 

After enable enable dump history .  dump for read only database failing in 3rd phase wuth error as below :

 

Attempt to BEGIN TRANSACTION in database 'LynxSPv15' failed because database is READ ONLY.

 

sp_configure 'enable dump history',1

 

Backup Server: 4.188.1.1: Database LynxSPv15: 1384144 kilobytes (100%) DUMPED.

Backup Server: 3.43.1.1: Dump phase number 1 completed.

Backup Server: 3.43.1.1: Dump phase number 2 completed.

Msg 3906, Level 16, State 1:

Server 'DS_CTO', Line 1:

Attempt to BEGIN TRANSACTION in database 'LynxSPv15' failed because database is READ ONLY.

 

 

 

ASE version :

Adaptive Server Enterprise/16.0 SP02 PL02/EBF 25318 SMP/P/RS6000/AIX 7.1/ase160sp02plx/2492/64-bit/FBO/Sun Nov 22 18:44:08 2015

 

Appreciate your help ..

How to Establish an SSL Client Connection for jConnect

$
0
0

jConnect has built-in support to connect to SAP ASE using SSL sockets in jConnect. To establish an SSL client connection, use either the ENABLE_SSL or SSL_TRUST_ALL_CERTS property.

Using the ENABLE_SSL Property

Setting the ENABLE_SSL property to TRUE enables jConnect to use the default JDBC Secure Sockets Layer (SSL) implemented under the com.sybase.jdbc.jdbc4.SybaseSSLSocketFactory.java jConnect extension interface.


Before you can set the ENABLE_SSL property to true, the Java Virtual Machine key store needs an authorized certificate for the client JVM.

To add an authorized certificate to the JVM key store, follow these steps:

  1. Copy the trusted roots certificate files to the client.
    The trusted roots
    certificate file contains certificates for other servers that the local server treats as trusted when added to the system. Share the certificate file (servername.txt) with the client by copying the files to the client's shared location. The trusted roots certificate files are located here:
    Linux: $SYBASE/$SYBASE_ASE/certificates/servername.txt
    Windows: %SYBASE%\%SYBASE_ASE%\certificate
    s\servername.txt
  2. Use either the command line or programmatic method of the Java keytool utility to import the roots certificate into the JVM key store. See the "Importing the Roots Certificate."

  3. Once your have imported the root certificate into the JVM key store, enable the SSL session-based security on the client by setting the ENABLE_SSL to true. For example:
    ENABLE_SSL=TRUE


Importing the Roots Certificate


Using the Command Prompt

a) Execute the command:
%JAVA_HOME%\jre\bin\keytool  -import -trustcacerts -file <absolute path of servername.txt> -alias root -keystore %JAVA_HOME%\jre\lib\security\cacerts

b) Enter the keystore password. The default password is changeit.

c) When prompted for confirmation to trust the certificate, enter Yes to complete the operation.


Using the Programmatic Method


Use the following function to import the roots certificate into the JVM trust store programically:

private static final String CACERTS_PATH = "/lib/security/cacerts";
private static final File CACERTS_FILE = new File(System.getProperty("java.home") + CACERTS_PATH);
private static final String CACERTS_PASSWORD = "changeit";
private static final String CERTIFICATE_ALIAS = "root";

// certificateFileLocation: will be absolute path of servername.txt
private void loadCertificate(String certificateFileLocation)
throws ClassNotFoundException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException

{

System.out.println("\tJava CACerts path: " + CACERTS_FILE.getAbsolutePath());
// load cacerts keystore
FileInputStream cacertsInputStream = new FileInputStream(CACERTS_FILE);
final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(cacertsInputStream, CACERTS_PASSWORD.toCharArray());
cacertsInputStream.close();     System.out.println("\tCA Certificate loaded");

     // load certificate from input stream
FileInputStream certInputStream = new FileInputStream(new File(certificateFileLocation));
final CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
final Certificate certificate = certFactory.generateCertificate(certInputStream);
certInputStream.close();
  System.out.println("\tCertificate generated");

     // check if cacerts contains the certificate
if (keyStore.getCertificateAlias(certificate) == null)
{
//cacerts doesn't contain the certificate, add it
  keyStore.setCertificateEntry(CERTIFICATE_ALIAS, certificate);
//write the updated cacerts keystore
FileOutputStream cacertsOutputStream = new FileOutputStream(CACERTS_FILE);
  keyStore.store(cacertsOutputStream, CACERTS_PASSWORD.toCharArray());
cacertsOutputStream.close();
  System.out.println("\tCertificate added in cacerts");
}
else
{
  System.out.println("\tCertificate already present in KeyStore");
}
}



Using the SSL_TRUST_ALL_CERTS Property

 
Setting the SSL_TRUST_ALL_CERTS property to true allows jConnect to trust any certificate that is not in the client trust list, or in the trusted list under the client’s specification. With SSL_TRUST_ALL_CERTS set to TRUE, you need not provide trust store information.


SAP and ISUG-TECH host SAP ASE Meet-ups in a city near you

$
0
0

SAP and ISUG-TECH host SAP ASE Meet-ups in a city near you

Register now


SAP and ISUG-TECH have teamed up, and we're hitting the road this spring to meet you in person and share the latest innovations and insights on SAP ASE. Join us for the unique opportunity to:


  • Learn how SAP ASE is helping businesses improve performance, reliability, and efficiency
  • See what's new and improved about SAP ASE
  • Discuss solution best practices
  • Connect, socialize, and share ideas with your peers


You don’t want to miss this insightful event. Register nowto join us. 

 

Slide1.JPG

load database xx with listonly=create_sql giving wrong ddl for database

$
0
0

Database size increased by 7.5 MB . alter with non whole number ( like 7.5 MB) in my case .

 

When we use new feature to generate database schema using lisonly=create_sql .  It takes floar value and suggest to alter database size by 7 MB.

but if we generate ddl from sybase central or ddlegen then it suggest to alter database by 8 MB .--> Which looks correct .

 

As target DB size should be same size or bigger size to load database .

 

My Case :

 

sp_helpdb xx   --> See care fully xxx_data04 --7.5 MB

=========

xxx_data01            500.0 MB data only Jun 19 2009 12:25PM               30

xxx_log01             100.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data01           3000.0 MB data only Jun 19 2009 12:25PM               56

xxx_log01            1000.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data01           2000.0 MB data only Jun 19 2009 12:25PM               14

xxx_log01            2000.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data02           4000.0 MB data only Jun 19 2009 12:25PM              168

xxx_data01           2000.0 MB data only Jun 19 2009 12:25PM               28

xxx_data03           4000.0 MB data only Mar  1 2010  4:22PM                0

xxx_data04              7.5 MB data only Jul  7 2011 10:28AM                0

xxx_data05           4000.0 MB data only Jul  7 2011 10:31AM                0

xxx_data06           4000.0 MB data only Jun 29 2012  1:26PM                0

xxx_data01            500.0 MB data only Mar 12 2014 10:09AM                0

xxx_data07           4000.0 MB data only May  9 2014 11:57AM                0

xxx_data08           4000.0 MB data only Jan 26 2015 10:31AM                0

xxx_data09           4000.0 MB data only Jun 29 2015  5:12AM          3132118

 

load database xxx with listonly=create_sql  -->> See care fully   , xxx_data04 = '7M' --> it should be 7.5 MB

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

 

CREATE  DATABASE xxx

  ON xxx_data01 = '500M'

  LOG ON xxx_log01 = '100M'

go

ALTER  DATABASE xxx

  ON xxx_data01 = '3000M'

  LOG ON xxx_log01 = '1000M'

go

ALTER  DATABASE xxx

  ON xxx_data01 = '2000M'

  LOG ON xxx_log01 = '2000M'

go

ALTER  DATABASE xxx

  ON xxx_data02 = '4000M'

  , xxx_data01 = '2000M'

  , xxx_data03 = '4000M'

  , xxx_data04 = '7M'

  , xxx_data05 = '4000M'

  , xxx_data06 = '4000M'

  , xxx_data01 = '500M'

  , xxx_data07 = '4000M'

  , xxx_data08 = '4000M'

  , xxx_data09 = '4000M'

go

 

==== DDLGEN /Sybase Central

 

Every thing same except :

 

ALTER DATABASE bat

     ON bat_data04 = '8M' -- 3840 pages

go

 

Appreciate your suggestion ...

In place upgrade 15.0.3 to 15.7

$
0
0

Hello Everyone,

 

We are in the progress of upgrading our SYBASE  databases from 15.0.3 to 15.7 version ( In place upgrade ) .

 

Please let us know which option we have to select in SySAM License step during the installation :

 

Options setup.bin prompts "SySAM License":

1) specify license keys

2) use previously deployed license server

3) continue installation without a license key

 

 

if i have to

 

go with option 1 :  Do i need to feed any info to that ? . if so what kind of info i have to pass and from which location i can get the information which needs to be passed in this step

 

go with option 2 : What is the prerequisite to choose this option?

 

go with option3 : we did installation with option as "3".  after up gradation server started in DEVELOPER EDITION . to fix the issue , we changed the lic file and license property file and re started the SYBASE DB server and it got converted to "Enterprise Edition" now . But we are getting below error message :

 

00:0000:00000:00000:2016/03/25 14:40:21.94 kernel  SySAM: Failed to obtain license(s) for ASE_CORE feature from license file(s) or server(s).

00:0000:00000:00000:2016/03/25 14:40:21.94 kernel  SySAM: License file does not support this version. ASE requires a license version of 2015.0625 or greater but only licenses for previous releases are available. If you are entitled to use this version of ASE then check for updates at the Sybase Product Download Center and regenerate and deploy your license updates.

00:0000:00000:00000:2016/03/25 14:40:21.94 kernel  SySAM: License feature name:  ASE_CORE

 

 

How to fix the above issue and let us know which option we have to select during the installation . So that we will be free from above errors

 

 

I have attached the screen shot of above mentioned step for your reference. Please advise on this. Thanks in advance


Date-time Adjustment for Workload Replay in SAP ASE 16.0 SP02 PL03

$
0
0

SAP ASE 16.0 SP02 PL03 introduces date and time adjustment for workload replay (workload analyzer option). You can now configure the SAP ASE cockpit so that when the replay begins, the date and time of the replay SAP ASE server are set to the time at which the capture originally started.

 

By default, the date and time on the replay SAP ASE server is the actual date and time at which the replay occurs. To reset the server time, in the Replay Wizard, check the following box on the "Options" page:

image1.png

The choice will be reflected on the "Summary" page and in the "Replay Settings":

 

image2.png

image3.png

See user documentation at  http://help.sap.com/saphelp_ase1602/helpdata/en/88/6af0ec2f7344499a0946cc022c9969/content.htm?frameset=/en/30/c1b3ab4dff4b5a985cc5262e8d804f/frameset.htm&current_toc=/en/1a/f592d6ac631014a7878b4f7b67c2cc/plain.htm&node_id=525.

ASE Cockpit Problems on Linux

$
0
0

Anyone out there able to start ASE Cockpit using:

 

Adaptive Server Enterprise/16.0 SP02 GA/EBF 24951 SMP/P/x86_64/Enterprise Linux/asecorona/2424/64-bit/FBO/Tue Aug 11 05:28:54 2015

 

I can't get an instance started, getting this (partial) output in the agent.log

 

2015-09-30 17:39:16,043 [INFO ] [repository.RepositoryService                 ] [main] - Starting repository database repository
2015-09-30 17:39:18,367 [INFO ] [upgrade.UpgradeManager                       ] [main] - Checking if repository upgrade is required.
2015-09-30 17:39:18,447 [INFO ] [upgrade.UpgradeManager                       ] [main] - Cockpit Version: 4.0.10.5826.
2015-09-30 17:39:18,447 [INFO ] [upgrade.UpgradeManager                       ] [main] - Repository Version: 4.0.10.5826
2015-09-30 17:39:18,448 [INFO ] [repository.Repository                        ] [main] - Repository upgrade is not required.
2015-09-30 17:39:23,878 [INFO ] [messaging.MessagingService                   ] [main] - Starting Messaging Service...
2015-09-30 17:39:23,878 [INFO ] [messaging.MessagingService                   ] [main] - About to start the queueing system.
2015-09-30 17:39:23,878 [INFO ] [messaging.MessagingService                   ] [main] - Checking for which provider to use.
2015-09-30 17:39:24,573 [WARN ] [activemq.ActiveMQMessagingProvider           ] [main] - Adjusting messaging provider Main:temp spac
e usage to 75% of available space on /opt/ase160_sp02/COCKPIT-4/services/Messaging/activemq-data/COCKPIT-4993/tmp_storage partition
(15801 MB).
2015-09-30 17:39:24,574 [WARN ] [activemq.ActiveMQMessagingProvider           ] [main] - Adjusting messaging provider Main:store spa
ce usage to 75% of available space on /opt/ase160_sp02/COCKPIT-4/services/Messaging/activemq-data partition (15801 MB).
2015-09-30 17:39:27,241 [INFO ] [messaging.MessagingService                   ] [main] - Queueing system has been started.
2015-09-30 17:39:27,269 [INFO ] [alert.AlertService                           ] [main] - Starting Alert Service...
2015-09-30 17:39:27,269 [INFO ] [alert.AlertService                           ] [main] - AlertService cannonical name AgentService:n
ame=AlertService
2015-09-30 17:39:27,316 [INFO ] [alert.AlertService                           ] [main] - Loading Alert Server Configuration.
2015-09-30 17:39:27,336 [INFO ] [alert.AlertService                           ] [main] - Starting message senders.
2015-09-30 17:39:27,574 [ERROR] [alert.AlertService                           ] [main] - Failed to start MessageSender: Failed to ac
quire JMS Session
2015-09-30 17:39:27,574 [ERROR] [alert.AlertService                           ] [main] - com.sybase.ua.service.AgentServiceException
: Failed to start MessageSender. com.sybase.alert.message.api.ConnectionException: Failed to acquire JMS Session
2015-09-30 17:39:27,576 [ERROR] [services.Agent                               ] [main] - Failed to successfully start agent: Failed
to start AlertService. Failed to start MessageSender. com.sybase.alert.message.api.ConnectionException: Failed to acquire JMS Sessio
n com.sybase.ua.service.AgentServiceException: Failed to start MessageSender. com.sybase.alert.message.api.ConnectionException: Fail
ed to acquire JMS Session
com.sybase.ua.service.AgentServiceException: Failed to start AlertService. Failed to start MessageSender. com.sybase.alert.message.a
pi.ConnectionException: Failed to acquire JMS Session com.sybase.ua.service.AgentServiceException: Failed to start MessageSender. co
m.sybase.alert.message.api.ConnectionException: Failed to acquire JMS Session        at com.sybase.ua.services.AgentLifecycleManager.startService(Unknown Source)        at com.sybase.ua.services.AgentLifecycleManager.startServices(Unknown Source)        at com.sybase.ua.services.AgentLifecycleManager.startAgent(Unknown Source)        at com.sybase.ua.services.Agent.doStart(Unknown Source)        at com.sybase.ua.service.AgentServiceBase.start(Unknown Source)        at com.sybase.ua.services.Agent.startAgent(Unknown Source)        at com.sybase.ua.startup.Main.startAgent(Unknown Source)        at com.sybase.ua.startup.Main.start(Unknown Source)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:606)        at com.sybase.ua.startup.Startup.doLoadMainClass(Unknown Source)        at com.sybase.ua.startup.Startup.start(Unknown Source)        at com.sybase.ua.startup.Startup.main(Unknown Source)
Caused by: com.sybase.ua.service.AgentServiceException: Failed to start MessageSender. com.sybase.alert.message.api.ConnectionExcept
ion: Failed to acquire JMS Session        at com.sybase.ua.services.alert.AlertService.doRunning(Unknown Source)        at com.sybase.ua.services.alert.AlertService.doStart(Unknown Source)        at com.sybase.ua.service.AgentServiceBase.start(Unknown Source)        ... 15 more

The Cockpit failed to start while installing Sybase ASE 16 developer edition in ubantu

$
0
0

The Cockpit failed to start while installing Sybase ASE 16 developer edition in ubantu

 

Failed to start Cockpit

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

 

The Cockpit failed to start. Please check the error log in

/opt/sybase/COCKPIT-4/log for detail and consult SAP Customer Support at

http://service.sap.com.

 

 

i checked the log and could find the following error in the cockpit logs

 

VM Process ID      19687@SanjeevUbantu
VM Arguments:      -Xms128m, -XX:MaxPermSize=128m, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/opt/sybase/COCKPIT-4/log, -Dcom.sybase.home=/opt/sybase, -Dcom.sybase.ua.toplevel=/opt/sybase/COCKPIT-4, -Dcom.sybase.ua.home=/opt/sybase/COCKPIT-4, -Dcom.sybase.platform=linux, -Djava.library.path=/opt/sybase/COCKPIT-4/rtlib:/opt/sybase/COCKPIT-4/bin/sa16/linux64/lib64, -Djava.security.policy=/opt/sybase/COCKPIT-4/conf/java.policy, -Djava.util.logging.manager=com.sybase.ua.util.logging.bridge.JavaToLog4jLogManager, -Dcom.sybase.security.BootstrapConfigurationURL=file:////opt/sybase/COCKPIT-4/conf/csibootstrap.properties

Failed to start agent: Failed to start AlertService. Failed to start MessageSender. com.sybase.alert.message.api.ConnectionException: Failed to acquire JMS Session com.sybase.ua.service.AgentServiceException: Failed to start MessageSender. com.sybase.alert.message.api.ConnectionException: Failed to acquire JMS Session

 

and the ASE_Suite.log says

 

DEBUG>>> 03-27-16 01:25:00 : SybaseConfigServerSummary(): $CHOSEN_FEATURE_LIST$=fase_srv,fopen_client,fdblib,fjconnect160,fdbisql,fqptune,fsysam_util,fase_cagent,fodbcl,fconn_python,fconn_perl,fconn_php,fscc_server,fasecmap

DEBUG>>> 03-27-16 01:25:00 : SybaseConfigServerSummary.isFeatureInstalled(): featureID =fasecmap

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.readIAVariables(): CHECK_WEB_SERVER_URL=http://:4282/cockpit

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.readIAVariables(): CHECK_WEB_SERVER_TIMEOUT=420

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.readIAVariables(): CHECK_WEB_SERVER_STATUS_VAR=CHECK_PORT_STATUS_PORT_STATUS

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.readIAVariables(): Set $CHECK_PORT_STATUS_PORT_STATUS$=false

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.doCheck(): Checking http://:4282/cockpit

DEBUG>>> 03-27-16 01:32:08 : CheckWebServerStatus.doCheck(): check timeout.

DEBUG>>> 03-27-16 01:34:46 : LastScreen.init(): install status is SUCCESS

DEBUG>>> 03-27-16 01:34:46 : LastScreen.init(): false

ERROR>>> 03-27-16 01:34:47 : The product configuration failed.

 

there is something wrong for which it is not able to capture the hostname in

DEBUG>>> 03-27-16 01:25:08 : CheckWebServerStatus.doCheck(): Checking http://:4282/cockpit

 

 

Please help

 

My etc/hosts file entries

 

root@SanjeevUbantu:/opt/sybase/log# cat /etc/hosts

127.0.0.1    localhost

127.0.1.1    SanjeevUbantu

 

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

sp_extrapwdchecks causing corruption in syslogins

$
0
0

sp_extrapwdchecks is causing corruption is syslogins but cant figure out why , below is the corruption message and store procedure.

The error is not consistent , we just drop the procedure and then everything seems to be fine .

Code looks ok not sure how it can cause corruption or under what scenhowever if some one can suggest better way to handle it as we need the historical password check feature from the proc

 

 

logs

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

06:00000:00724:2015/10/28 13:07:26.31 kernel  [Handler pc: 0x00000001006b97b0 s_handle+0x0 installed by the following function:-]

06:00000:00724:2015/10/28 13:07:26.31 kernel  pc: 0x00000001004dcfd4 sequencer+0x234()

06:00000:00724:2015/10/28 13:07:26.32 kernel  pc: 0x00000001005662a8 tdsrecv_language+0xb8()

06:00000:00724:2015/10/28 13:07:26.32 kernel  [Handler pc: 0x00000001006ae9bc ut_handle+0x0 installed by the following function:-]

06:00000:00724:2015/10/28 13:07:26.32 kernel  pc: 0x00000001004df48c conn_hdlr__fdpr_6+0x3c()

06:00000:00724:2015/10/28 13:07:26.32 kernel  end of stack trace, spid 724, kpid 6422915, suid 20862

06:00000:00724:2015/10/28 13:07:26.32 server  Error: 644, Severity: 21, State: 5

06:00000:00724:2015/10/28 13:07:26.32 server  Index row entry for data row id (409, 17) is missing from index page 1465 of index id 2 of table 'syslogins' in database 'master'. Xactid is (113623,19). Drop and re-create the index.

*** Completed showing top 100 lines from output ***

 

 

Proc sp_extrapwdchecks

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

 

use master

go

 

create proc sp_extrapwdchecks

(

@caller_password varchar(30), -- the current password of caller

@new_password    varchar(30), -- the new password of the target acct

@loginame        varchar(30)  -- user to change password on

)

as

 

 

begin

declare @errno         int,

        @pwdlen        int,

        @min_length    int,

        @name          varchar(30),

        @c             int,

        @lastchar      int,

        @run           int,

        @msg           varchar(1024),

        @defdb         varchar(30),             /* default db for the new user */

        @deflanguage   varchar(30),             /* default language for the new user */

        @fullname      varchar(30),             /* account owner's full name */

        @passwdexp     int,                     /* value of password expiration */

        @minpwdlen     int,                     /* value of minimum password length */

        @maxfailedlogins int                    /* value of maximum failed logins */

 

 

select @errno = 0

 

 

if @loginame is NULL

        select  @name = suser_name()

else

        select  @name = @loginame

 

 

declare @changing_my_own char(1)

 

 

if @loginame is NULL or @loginame = suser_name()

        select  @changing_my_own = "Y"

else

        select  @changing_my_own = "N"

 

 

declare @new_id_flag   char(1)

select @new_id_flag = "N"

 

 

if not exists (select 1 from security.dbo.logins

               where name = @name)

   and @changing_my_own = "N"

begin

        insert  security..logins

        select  suid,           /* server user id */

                name,           /* account name */

                getdate(),      /* crdate */

                suser_name(),   /* creator */

                NULL,           /* last_login */

                NULL,           /* lock_date */

                NULL,           /* unlock_date */

                "N",            /* pw_changed_by_user */

                0,              /* failed_login_count */

                "N",            /* lock_account flag */

                0               /* lock reason */

        from    master.dbo.syslogins

        where   name = @name

 

 

        select @new_id_flag = "Y"  /* Bugfix 9680 */

 

 

        select @defdb           = dbname,

               @deflanguage     = language,

               @fullname        = fullname

        from master.dbo.syslogins

        where name = @name

 

 

        select @passwdexp = int_value

        from master.dbo.sysattributes

        where class = 14

        and   attribute = 0

        and   object_type = "PS"

        and   object_cinfo = "login"

        and   object = suser_id(@name)

 

 

        select @minpwdlen = int_value

        from master.dbo.sysattributes

        where class = 14

        and   attribute = 1

        and   object_type = "PS"

        and   object_cinfo = "login"

        and   object = suser_id(@name)

 

 

        select @maxfailedlogins = int_value

        from master.dbo.sysattributes

        where class = 14

        and   attribute = 2

        and   object_type = "PS"

        and   object_cinfo = "login"

        and   object = suser_id(@name)

 

 

        select  @msg =  "SMS Add Login: "

                        + rtrim(@loginame)

                        + ", defaultdb: "

                        + rtrim(@defdb)

        if @deflanguage is not null

                select @msg =   @msg

                                + ", defaultlang: "

                                + rtrim(@deflanguage)

        if @fullname is not null

                select @msg =   @msg

                                + ", full name: "

                                + rtrim(@fullname)

        if @passwdexp is not null

                select @msg =   @msg

                                + ", pwd exp: "

                                + rtrim(convert(varchar,@passwdexp))

        if @minpwdlen is not null

                select @msg =   @msg

                                + ", pwd len: "

                                + rtrim(convert(varchar,@minpwdlen))

        if @maxfailedlogins is not null

                select @msg =   @msg

                                + ", max failed logins: "

                                + rtrim(convert(varchar,@maxfailedlogins))

 

 

        execute sp_addauditrecord @text = @msg

end

 

 

 

 

if @changing_my_own = "Y" and suser_name() != "sa"

    and exists (select 1 from security.dbo.logins

                where name = @name

                and pw_changed_by_user = 'Y')

begin

        if exists

        (select 1

        from    master.dbo.syslogins

        where   datediff(hour,pwdate,getdate()) < 24

        and             name = @name)

        begin

                select  @errno = 30001,

                        @msg  = "You have already changed your password in the last 24 hours."

                goto FAIL

        end

end

 

 

/* must not have leading or trailing spaces */

 

 

if @new_password != ltrim(@new_password) or

        ascii(substring(@new_password,datalength(@new_password),1)) = 32

begin

        select  @errno = 30002,

                @msg  = "Password must not have leading or trailing spaces."

        goto FAIL

end

 

 

/* must not be same as name or reverse of name */

 

 

select  @pwdlen = datalength(@new_password)

 

 

if @loginame is NULL

        select  @name = suser_name()

else

        select  @name = @loginame

 

 

if upper(@new_password) = upper(substring(@name,1,@pwdlen))

        or upper(@new_password) = upper(substring(reverse(@name),1,@pwdlen))

begin

        select  @errno = 30003,

                @msg  = "Password cannot be same as login name."

        goto FAIL

end

 

 

/* password must not be in history for this user */

 

 

if exists

(select 1

from    security.dbo.password_history

where   name = @name

and     password = internal_encrypt(@new_password))

begin

        select  @errno = 30005,

                @msg  = "Password exists in history file"

        goto FAIL

end

 

 

/* password must not be in exclusions list */

 

 

if exists

(select 1

from    security.dbo.password_exclusions

where   password = lower(@new_password))

begin

        select  @errno = 30006,

                @msg  = "Password disallowed."

        goto FAIL

end

 

 

/* must not have any repeating char sequences > 2 */

 

 

select  @c      = 2,

        @lastchar = ascii(substring(@new_password,1,1)),

        @run    = 1

 

 

while (@c <= datalength(@new_password))

begin

        if ascii(substring(@new_password,@c,1)) = @lastchar

        begin

                select @run = @run + 1

                if @run > 2

                begin

                        select  @errno = 30007,

                                @msg  = "Password contains prohibited repeating character sequence."

                        goto FAIL

                end

        end

        else

                select @run = 1

 

 

        select  @lastchar = ascii(substring(@new_password,@c,1)),

                @c = @c + 1

end

 

 

/* must not have any ascending sequences > 3 chars */

 

 

select  @c      = 2,

        @lastchar = ascii(substring(@new_password,1,1)),

        @run    = 1

 

 

while (@c <= datalength(@new_password))

begin

        if ascii(substring(@new_password,@c,1)) = @lastchar+1

        begin

                select @run = @run + 1

                if @run > 3

                begin

                        select  @errno = 30007,

                                @msg  = "Password contains prohibited ascending character sequence."

                        goto FAIL

                end

        end

        else

                select @run = 1

 

 

        select  @lastchar = ascii(substring(@new_password,@c,1)),

                @c = @c + 1

end

 

 

/* must not have any descending sequences > 3 chars */

 

 

select  @c      = 2,

        @lastchar = ascii(substring(@new_password,1,1)),

        @run    = 1

 

 

while (@c <= datalength(@new_password))

begin

        if ascii(substring(@new_password,@c,1)) = @lastchar-1

        begin

                select @run = @run + 1

                if @run > 3

                begin

                        select  @errno = 30008,

                                @msg  = "Password contains prohibited descending character sequence."

                        goto FAIL

                end

        end

        else

                select @run = 1

 

 

        select  @lastchar = ascii(substring(@new_password,@c,1)),

                @c = @c + 1

end

 

 

/*

** now update password_history list in security IF we have the old

** password.  We don't have it if the password is being reset for the user by

** sa or sso, in which case there's a hole in the history.  We can't do anything

** about this until Sybase enhance the encryption to make it available to T-SQL

*/

 

 

if @changing_my_own = "Y"

begin

        /*

        ** make an entry in the password history table

        */

 

 

        insert  security.dbo.password_history

        values  (@name,         /* name - account name being modified */

                 0,             /* password_version - will be corrected by trigger */

                 isnull(internal_encrypt(@caller_password),"NULL"), /* previous password */

                 getdate(),     /* change_date */

                 suser_name())  /* changed_by - who changed the password */

 

 

        /*

        ** update security logins table to show user changed his own password

        */

 

 

        update  security.dbo.logins

        set     pw_changed_by_user = "Y"

        where   name = @name

end

else

begin

        /*

        ** password is being changed for user by sa or other, so just make entry in

        ** in history if password is unknown.

        */

 

 

        insert  security.dbo.password_history

        select  @name,          /* name - account name being modified */

                0,              /* password_version - will be corrected by trigger */

                isnull(password, internal_encrypt("[UNKNOWN]")),        /* previous password */

                getdate(),      /* change_date */

                suser_name()    /* changed_by - who changed the password */

        from master.dbo.syslogins

        where name = @name

 

 

        /*

        ** update security logins table to show user had password changed for him by sso/sa

        ** and reset login failure indicators

        */

 

 

        update  security.dbo.logins

        set     pw_changed_by_user = "N",

                failed_login_count = 0

        where   name = @name

 

 

        /*

        ** if the account is locked, might as well unlock it

        */

 

 

        if exists

        (select 1

        from    master.dbo.syslogins

        where   name = @name

        and     status & 2 = 2)

        begin

                execute sp_locklogin @name, 'unlock'

        end

end

 

 

select @errno = @@ERROR

if @errno > 0

        goto FAIL

 

 

/*

** check if we need to expire the password straight away

**

** we need to expire password if this is called from sp_addlogin, or an sso

** is changing somebody's password for them.  In either case @loginame is NOT NULL

** and is not equal to the current user.  However, this feature does not happen

** to "sa" activity

*/

 

 

-- this update does not seem to work in sp_extrapwdchecks, logic to use pw_changed_by_user

-- from security.dbo.logins used in above 24-hour check.

--if @changing_my_own = "N"

--      update  master.dbo.syslogins

--      set     pwdate = "Jan 1 1990"   /* should cover even the most lax regime */

--      where   name = @loginame

 

 

if @changing_my_own = "N"               /* only audit sso changing other people's pwds */

begin

        select  @msg = "SMS Password Change: " + rtrim(@loginame)

        execute sp_addauditrecord       @text = @msg

end

 

 

return (0)

 

 

/*

** The raiserror must be at end of the procedure, else it does not seem to return a non-zero value to the

** set_password function in sp_password.

** Do NOT add a "return (@errno)" after raiserror.

** Conjecture: In 12.5.4, set_password calls sp_extrapwdchecks and then looks for @@error from raiserror.

** A return statement after raiserror, resets @@error to 0, so set_password thinks it's okay (???).

*/

 

 

FAIL:

 

 

        if @errno != 0 and @errno != 30021 /* 30021 = warning from password_history trigger */

        begin

             /** Begin Modification 9680 - rollback the newly inserted ID from security.dbo.logins**/

             if exists (select 1 from security.dbo.logins

                        where name = @name )

             and @changing_my_own = "N"

             and @new_id_flag = "Y"

             begin

                   delete security.dbo.logins

                   where name = @name

             end

             /** End Modification 9680 **/

 

 

             raiserror @errno @msg   /* do NOT have a return after this raiserror for 12.5.4 */

        end

        else

        begin

                return (0)

        end

end

 

 

go

 

 

grant execute on sp_extrapwdchecks to public

go

ASE will shutdown on Fri 08 Apr 2016 02:55: unless a suitable ASE_CORE license is obtained before that date.

$
0
0

Hi All,

 

We have installed BO 4.1 Sybase and getting below license error in the log file.

 

Error Log:

 

Error: 131274, Severity: 17, State: 1

 

2016/03/30 07:04:55.31 kernel  SySAM: WARNING: ASE will shutdown on Fri 08 Apr 2016 02:55:17 PM GST, unless a suitable ASE_CORE license is obtained before that date.

 

Please advice.

 

Regards,

Karthik

How can I get the start date & end date of given week number or month

$
0
0

Hi Everyone,

 

I'm working on a procedure that is used to calculate data in weekly and monthly, currently I can use datepart function to extract the week number/month from given date (as the SQL below). The week number/month, extracted from previous step, will be put into a loop for calculating purpose. And we need to determine the start date and end date of specific week/month, could you please share me how get those date from given week number or month ?

 

SELECT @min_date_time = min(my_date) FROM my_table

   

--Minimum year in database

SELECT @min_year = datepart(yy,min(my_date)) FROM my_table

 

--Minimum month in database

SELECT @min_month = datepart(mm,min(my_date)) FROM my_table

 

--Minimum week in database

SELECT @min_week = datepart(wk,min(my_date)) FROM my_table

 

 

SELECT @curr_date_time = getdate()

 

--Current year

SELECT @curr_year = datepart(yy, @curr_date_time)

 

--Current month

SELECT @curr_month = datepart(mm, @curr_date_time)

 

--Current week

SELECT @curr_week = datepart(wk, @curr_date_time)

 

WHILE @min_week <= @curr_week

BEGIN

 

@start_date_of_week = ???

@end_date_of_week = ???

 

/*Do Some Logic*/

 

SELECT @min_week = @min_week + 1

 

END

 

WHILE @min_month <= @curr_month

BEGIN

 

@start_date_of_month = ???

@end_date_of_month = ???

 

/*Do Some Logic*/

 

 

SELECT @min_month = @min_month + 1

END

 

P/S: I also have similar logic for Oracle too, and I haven't found a solution yet. If you can help me on that, I really appreciate

 

Thanks

Khoa Tran

Error on XML Parser when referencing external DTD

$
0
0

Hi,

 

I was trying to replicate some examples I found on the "XML Services" guide. In particular, I'm having troubles to make the parser download an external DTD definition. According to the manual "There are no restrictions on the use of URIs as href attributes or document text, and XML Services resolves external reference URIs that specify http URIs."

 

But when I execute this query:

 

insert into text_docs values (xmlvalidate('<!DOCTYPE emp_name PUBLIC "prueba" "http://xx.xx.xx.xx/dtd_emp.dtd"><emp_name>John Doe</emp_name>',option 'dtdvalidate=yes'))

 

I get this exception:

 

XMLVALIDATE(): XML parser fatal error <<An exception occurred!

Type:NetAccessorException, Message:Could not create the socket for URL '{0}'.

Error={1}>> at line 1, offset 71.

 

Using google I found people who got the same error, but I haven't found any solution.

 

Any help would be appreciated

 

Thanks

 

Leandro


Database failed to load : Version 15.7 SP52

$
0
0

Steps we performed In all the below cases we didn't see any process in destination database (sysprocesses ) and we checked in master..syslocks table in locked state and no zombie process )

 

1) Killed all the connections from DB server ==> After that we kick started the load . It got failed with DB error message as "DATABASE IN USE"

2) Recycled the backup server ===> After that we kick started the load . It got failed with DB error message as "DATABASE IN USE"

3) Recycled the DB server along with backup server ==> After that we kick started the load . It got failed with DB error message as "DATABASE IN USE"

 

Later we noticed the transaction in "master..systransactions" table .

 

1> select * from master..systransactions

2> go

xactkey                        starttime                       failover    type        coordinator state       connection  status      status2     spid   masterdbid loid        namelen xactname                                                                                                                                                                                                                                                        srvname                        nodeid

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

0x09112810001500005d89d4c40006             Mar 29 2016  7:05PM           0           3           3       65540           2     8388740    16777216      0          6        6785     182 000007D6_bj4Sej8MczAUczdvbj4McPAQd30RdP5vc5YMnSpBrCBzsRZFrn1LsDhdu4RcbjsQeiQNnRZvnM000000000003_bj8MdzcMcjsMdj1vbj4Md3oMcP0MdPBvnRZv00000000000000000000000000000000000000000000000003                                                                          NULL                             NULL

 

(1 row affected)

1> sp_transactions

2> go

xactkey                        type        coordinator starttime            state             connection dbid   spid   loid        failover                   srvname                        namelen xactname                             

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

0x09112810001500005d89d4c40006 External    XA          Mar 29 2016  7:05PM  Prepared-Detached Detached        6      0        6785 Resident Tx                NULL                               182 000007D6_bj4Sej8MczAUczdvbj4McPAQd30RdP5vc5YMnSpBrCBzsRZFrn1LsDhdu4RcbjsQeiQNnRZvnM000000000003_bj8MdzcMcjsMdj1vbj4Md3oMcP0MdPBvnRZv00000000000000000000000000000000000000000000000003

 

(1 row affected)

 

 

 

So we have cleared using

commands :

 

dbcc complete_xact("000007D6_bj4Sej8MczAUczdvbj4McPAQd30RdP5vc5YMnSpBrCBzsRZFrn1LsDhdu4RcbjsQeiQNnRZvnM000000000003_bj8MdzcMcjsMdj1vbj4Md3oMcP0MdPBvnRZv00000000000000000000000000000000000000000000000003","commit","1pc")

dbcc forget_xact("000007D6_bj4Sej8MczAUczdvbj4McPAQd30RdP5vc5YMnSpBrCBzsRZFrn1LsDhdu4RcbjsQeiQNnRZvnM000000000003_bj8MdzcMcjsMdj1vbj4Md3oMcP0MdPBvnRZv00000000000000000000000000000000000000000000000003")

 

 

After that we loaded the database it went to success.

 

 

Please let us know we reboot of our UAT machine didn't help to resolve the issue ??

 

and

when the transaction will be loaded into systransactions table and when entry from this table will get failed to get released ??

 

 

Is there any other way to recover the database other the above DBCC commands ???

SAP ASE INSTALLATION

$
0
0

Hi gurus,

 

I'm new in SAP ASE environment, i used to work around sap bobj platform.

I would like to know is SAP Ase able to run in Windows platform?

Is there any trick/special trick in installation?

 

I also now looking for the installation guidance especially in sap forum. Hopefully can find it out.

 

 

Thanks lot.

Setiawan Ang

Wrong Password in ASE Cockpit

$
0
0

Hi,

 

after installing ASE 16.0 SP02 PL03 over the existing 16.0 SP02 PL02 it is not possible to enter ASE Cockpit. The Cockpit Server starts fine on his https://dimotion:4283/cockpit/ webpage the ASE name (DIMOTION) appears and I enter "sa" and the not changed password. The answer is allways "Login failed.".

 

I droped the $SYBASE/COCKPIT-4/plugins/DIMOTION directory and copy the existing $SYBASE/COCKPIT-4/templates/com.sybase.ase into a new

$SYBASE/COCKPIT-4/plugins/DIMOTION directory. Using the same existing agent-plugin.xml file I used for the 16.0 SP02 PL02 installation I generate a new agent. But after entering the "sa" password I also got "Login failed.".

 

I modified the existing agent-plugin.xml file three times to set a new encrypted password into the <set-property property="ase.password" value="<passwd>" /> line but the answer is allways the same "Login failed."...

 

Attached is the used agent-plugin.xml I used for creating a new agent.

 

Many thanks


Robert

feedback about a document on data storage and how to track space allocation

$
0
0

Hi community,

 

I just came accross this document on the Web:

http://www.softwaregems.com.au/Documents/Sybase%20GEM%20Documents/Sybase%20Data%20Storage%20&%20Fragmentation.pdf

 

I helped me understanding how data are stored but I didn't get all the points.

 

Have you ever read it? and do you have any comments about the content?

 

Based on it, I'd like to 'see by myself' how data are physically stored depending on the objects ( APL / DOL tables ; CI / NCI ; LOB...).

 

Could you tell me the command I should use if I want to see, for a 'structure' (table / index / lob...) the allocation unit / oam / page-chain?

 

i found 'dbcc listoam' but I believe there are others.

 

Thanks in advance.

 

 

Simon

load database xx with listonly=create_sql giving wrong ddl for database

$
0
0

Database size increased by 7.5 MB . alter with non whole number ( like 7.5 MB) in my case .

 

When we use new feature to generate database schema using lisonly=create_sql .  It takes floar value and suggest to alter database size by 7 MB.

but if we generate ddl from sybase central or ddlegen then it suggest to alter database by 8 MB .--> Which looks correct .

 

As target DB size should be same size or bigger size to load database .

 

My Case :

 

sp_helpdb xx   --> See care fully xxx_data04 --7.5 MB

=========

xxx_data01            500.0 MB data only Jun 19 2009 12:25PM               30

xxx_log01             100.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data01           3000.0 MB data only Jun 19 2009 12:25PM               56

xxx_log01            1000.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data01           2000.0 MB data only Jun 19 2009 12:25PM               14

xxx_log01            2000.0 MB log only  Jun 19 2009 12:25PM not applicable  

xxx_data02           4000.0 MB data only Jun 19 2009 12:25PM              168

xxx_data01           2000.0 MB data only Jun 19 2009 12:25PM               28

xxx_data03           4000.0 MB data only Mar  1 2010  4:22PM                0

xxx_data04              7.5 MB data only Jul  7 2011 10:28AM                0

xxx_data05           4000.0 MB data only Jul  7 2011 10:31AM                0

xxx_data06           4000.0 MB data only Jun 29 2012  1:26PM                0

xxx_data01            500.0 MB data only Mar 12 2014 10:09AM                0

xxx_data07           4000.0 MB data only May  9 2014 11:57AM                0

xxx_data08           4000.0 MB data only Jan 26 2015 10:31AM                0

xxx_data09           4000.0 MB data only Jun 29 2015  5:12AM          3132118

 

load database xxx with listonly=create_sql  -->> See care fully   , xxx_data04 = '7M' --> it should be 7.5 MB

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

 

CREATE  DATABASE xxx

  ON xxx_data01 = '500M'

  LOG ON xxx_log01 = '100M'

go

ALTER  DATABASE xxx

  ON xxx_data01 = '3000M'

  LOG ON xxx_log01 = '1000M'

go

ALTER  DATABASE xxx

  ON xxx_data01 = '2000M'

  LOG ON xxx_log01 = '2000M'

go

ALTER  DATABASE xxx

  ON xxx_data02 = '4000M'

  , xxx_data01 = '2000M'

  , xxx_data03 = '4000M'

  , xxx_data04 = '7M'

  , xxx_data05 = '4000M'

  , xxx_data06 = '4000M'

  , xxx_data01 = '500M'

  , xxx_data07 = '4000M'

  , xxx_data08 = '4000M'

  , xxx_data09 = '4000M'

go

 

==== DDLGEN /Sybase Central

 

Every thing same except :

 

ALTER DATABASE bat

     ON bat_data04 = '8M' -- 3840 pages

go

 

Appreciate your suggestion ...

Viewing all 757 articles
Browse latest View live


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