Quantcast
Channel: SCN : Unanswered Discussions - SAP Applications on SAP Adaptive Server Enterprise (SAP ASE)
Viewing all 809 articles
Browse latest View live

Question on restore Sybase database

$
0
0
Suppose I have a ASE database. the actual size of data is 1 GB. but someone create a device as 5 GB.
Then I backup this db and want to restore it on another place. I only create device with 2 GB and assign this device to the database.
Is it possible to restore this db with different Device/segment size from orginal bakcup?
Also is it possible to reduce device/segment size if its initial size it too big? any performance for this case?

Truncate log and device/segment size

$
0
0

If I have a ASE database, it's log is never be truncated, the log become very large. I do have backup every day, but backup did not reduce the size of log.

If I turncate the log today. the space on device for log  will be released. Is it possible to reduce the size of the device for log on live production?

Also if log never be truncated, does it impact the ASE performance?

[ASE Error SQL4939]ALTER TABLE 'saptools..DBH_MSG_LOG' failed

$
0
0

Hello Community,

 

We are in the process of configuring managed system configuration in solution manager 7.1 SPS8.

 

1. Under automatic configuration where the "database extractor setup" is configured. We have the following error.

 

 

NOTE*** SYBASE ASE 15.7,

Adaptive Server Enterprise/15.7/EBF 21521 SMP SP102 /P/x86_64/Enterprise Linux/

         ase157sp101/3445/64-bit/FBO/Sat Jul 13 02:28:53 2013

 

What tried so far:-

 

1. implement collective note 0001558958 SYB: DBA Cockpit Correction Collection SAP Basis 7.02 / 7.30

2. SAPSA is working fine. Checked both from sapgui-> dbacockpit-> switch gui-> select system-> test-> connection established-

3. isql -Usapsa -PXXXXX -SSID is also working fine.

 

 

ERROR:-

 

[ASE Error SQL4939]ALTER TABLE 'saptools..DBH_MSG_LOG' failed. You cannot drop column 'SOURCE_HOSTNAME' because it is being used by an index. Drop the index 'DBH_MSG_LOG~1' before dropping this column.

Exception CX_DBA_ADBC in program RAGS_SISE_ACTIVITY_JOB line 0
Kernel Error ID:
WP ID: 13
WP PID: 31439
SYSID: B1D
SY-SUBRC: 0
SQL statement: ALTER TABLE saptools..DBH_MSG_LOG DROP "SOURCE_HOSTNAME" WITH NO DATACOPY
Database: B1D
caused by
Exception CX_SQL_EXCEPTION in class CL_SYB_RDI_QUERY
Kernel Error ID:
DB Error: Yes
SQL Code: 4939
SQL Message: [ASE Error SQL4939]ALTER TABLE 'saptools..DBH_MSG_LOG' failed. You cannot drop column 'SOURCE_HOSTNAME' because it is being used by an index. Drop the index 'DBH_MSG_LOG~1' before dropping this column.

DB Object Exists: No
Duplicated Key: No
Internal Error: 1
Invalid Cursor: No
Unknown Connection: No
Connection Closed: No

 

Appreciated if you can help.

 

Thanks & regards,

Sree

how to calcuate buffer size and config buffer number?

$
0
0

Based on Sybase Administration guide, suppose my sybase has 2K logical pages, 8MB are allocated to the default data cache. This constitutes approximately 2048 buffers. so it means the buffer number is 8*1204K/(2K*2) = 2048. this means buffer size is 4K or 2*page size.

Is it right?

 

Also if data cache is configured as above said 8M, then "Number of sort buffers" should be set at least as 2048, right?

waht's the common practice to allocate memory to sybase?

$
0
0

Suppose I have a dedicated server(Redhat Linux) for Sybase ASE 15.2. On this box, there are 10G memory available. How many RAM I can assign to Max Memory to Sybase with common practice? for example, if 80% of total physical RAM is proper portion?

How can I using Java Socket in Sybase ASE?

$
0
0

I am a engineer for develop network with real-time service, wihch can sending message to another remote applications.

First, I know Sybase have TIBCO-EMS System to achieving my requirement but TIBCO was not free software, thus I want it to do myself.

Ok, In my requirement, I find the Java Service in Sybase ASE and I followings with user guide:

  1. enable pci 1
  2. enable java 1
  3. install java class that include socket client.
  4. I use setp 3 of java socket connect to remote server(java Server Socket) and sending message.

My question is: Seem's Sybase ASE can't using socket directly ?

While I used socket, Sybase throws the exception:

There was an error reading the results of the SQL statement.

The displayed results may be incorrect or incomplete.

 

 

Unhandled Java Exception:

java.lang.ExceptionInInitializerError

  at

java.net.Socket.setImpl(Socket.java:493)

  at java.net.Socket.<init>

(Socket.java:414)

  at java.net.Socket.<init>(Socket.java:208)

  at org.

gms.client.ClientTest.send(ClientTest.java:13)

Caused by: java.lang.

SecurityException: Properties can not be inspected

  at sybase.aseutils.

PCAJvmSecurityManager.checkPropertiesAccess(PCAJvmSecurityManager.java:

173)

  at java.lang.System.getProperties(System.java:622)

  at.

Sybase error code=10707

 

 

 

 

There was an error reading the results of the SQL statement.

The displayed results may be incorrect or incomplete.

Unhandled Java Exception:

java.lang.ExceptionInInitializerError

  at

java.net.Socket.setImpl(Socket.java:493)

  at java.net.Socket.<init>

(Socket.java:85)

Caused by: java.lang.SecurityException: Properties can

not be inspected

  at sybase.aseutils.PCAJvmSecurityManager.

checkPropertiesAccess(PCAJvmSecurityManager.java:173)

  at java.lang.

System.getProperties(System.java:622)

  at java.net.PlainSocketImpl$1.

run(PlainSocketImpl.java:62)

  at java.security.AccessController.

doPrivile.

Sybase error code=10707

 

 

Can anyone help me? Thank so much~!

what's the best client isql tool on windows?

$
0
0

Not sure what's the best UI tool for isql on windows XP?

I have ASE 12.5.4 on Linux. Sybase Central  v6.0 and Interactive SQL on Windows XP

Sybase Central has many errors when I try it connect to Server. Interactive SQL is not convenience to use and it is easy to crash when try to trieve large amount of data.

 

Any better client tools for developer? like MS SQL Server Management Studio?

Problem with Sybase IQ 15.4 settings

$
0
0

So I have a problem with Sybase IQ 15.4, I need to be able to change the RecursiveIterations settings and RecursiveIterationsNested setting they are set to a incorrect value. How can I change this setting if IQ dosnt let me? Please help thanks


how to setup a query plan in effective at any time for SP or SQL query?

$
0
0

I have a SP which include a group by SQL statement. It retrieve data from a couple of tables which are over 1G size,

 

When I run this SP at first time, it take more than 5 minutes to get the result. then I run it again and again, Finally, it become very quick, I can get the result within second.

 

Not sure why. I guess it is because of query plan.

 

How to make it running at first time to get result within second? How to force a better best query plan in effective at first time to run the query?

If the engine has better plan in memory, could it be lost at some point? because I have the complain from end user said some times it is fast, sometime it is very slow.

 

How to resolve this problem?

Automatic expansion for SAP ASE

$
0
0

Hi experts,

 

I'm curious to know that when the database is configured for automatic expansion (during SAP installation), does it include all other databases like master, saptools, sybsystem etc?

or is it only configured for the SAP data device (sapdata_n)?

 

Is it possible to use isql command tool to check the "growby size" and "free space threshold" configured during the installation?

 

Also, during the installation, we have to specify the "growby size of database" and "growby size" of each sapdata_n.
Is there any rule of thumb on specifying the value, for example, the growby size of database has to be be  n * growby size of each sapdata_n?

 


Thanks,
Henry

how to find out ASE backup server?

$
0
0

As backup server is a separate service. how to find out if ASE engine has backup server or not?

Or how to get into backup server and find out what ASE this backup server is working for?

What is the better way to join table for ASE 12.5?

$
0
0

To join table with T-SQL, there are 2 options:

select * from tab1 a join tab2 b on a.id = b.id where x=y

select * from tab1a, tab2 b where a.id = b.id and x=y

this is only a syntax difference or there is a performance difference? which one is better for performance?

Any problem for different named data cache binding to same object?

$
0
0

A couple of question about data cache:

1. Suppose I have 2 named data cache: cache1 and cache2. if same table mytab is bound to both cache, what problem could happen?

2. Cache1 is bound to database mydb and cache2 bound to a table mytab in mydb, any problem?

3. If total cahce size exceed max memory, any problem?

4. What overhead means for cache?


Sybase ASE 15.7.103 ODBC Driver invalid descriptor index

$
0
0

Hey guys,

 

after migration from oracle nuc to sybase ase 15.7.101 unicode and implementation of sapnote 1558958 (dbacockpit collection for NW 702) there were everything which was in dbacockpit displayed ok.

 

After upgrade to patch 103 theres a problem in the dbacockpit. I will show in the register Database SID - Space - Tables and Indices - Tables.

After I select this. There comes follwing error: ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index.

In error details I see SQLCode 30013

 

The Database ist open and there are no other kown problems with connection. SAP could establish connection to sybase ase database and users can work normally.

 

In the dbacockpit Database SID - Space - Devices and Databases are shown without problems.

 

message details:

Exception CX_DBA_ADBC in class CL_SYB_RDI_QUERY method GET_TABLES_SPACE line 217
Kernel Error ID:
WP ID: 4
WP PID: 4272
SYSID: SE1
SY-SUBRC: 0
SQL statement: SELECT TOP 50 DBNAME, USER_NAME AS TABOWNER, TAB_NAME AS TABNAME, ' ' AS PARTITIONNAME, 0 AS ID, 0 AS PARTITIONID, ' ' AS SNAPSHOT_TIMESTAMP, ' ' AS TIMESTAMP_FROM, ' ' AS TIMESTAMP_TO, SUM(TIME_PERIOD) AS TIME_PERIOD, AVG(ROW_COUNT) AS ROW_COUNT, MAX(ROW_COUNT) AS ROW_COUNT_MAX, AVG(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, MAX(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB_MAX, AVG(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, MAX(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB_MAX, AVG(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, MAX(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB_MAX, AVG(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, MAX(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB_MAX, AVG(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO, MIN(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO_MIN, AVG(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF, MIN(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF_MIN, AVG(DATACHANGE) AS DATACHANGE, MAX(DATACHANGE) AS DATACHANGE_MAX, AVG(forwrowcnt) AS forwrowcnt, MAX(forwrowcnt) AS forwrowcnt_MAX, AVG(delrowcnt) AS delrowcnt, MAX(delrowcnt) AS delrowcnt_MAX, AVG(extent0pgcnt) AS extent0pgcnt, MAX(extent0pgcnt) AS extent0pgcnt_MAX, AVG(oamapgcnt) AS oamapgcnt, MAX(oamapgcnt) AS oamapgcnt_MAX, AVG(oampagecnt) AS oampagecnt, MAX(oampagecnt) AS oampagecnt_MAX, MAX(str_replace(str_replace(str_replace(convert(VARCHAR(19),statmoddate,23),':',NULL),'-',NULL),'T',NULL)) AS statmoddate, AVG(datarowsize) AS datarowsize, MAX(datarowsize) AS datarowsize_MAX, AVG(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB, MAX(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB_MAX, AVG(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB, MAX(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB_MAX, AVG(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB, MAX(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB_MAX, AVG(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB, MAX(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB_MAX, AVG(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB, MAX(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB_MAX FROM ( SELECT DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP AS SNAPSHOT_TIMESTAMP, SUM(TIME_PERIOD) AS TIME_PERIOD, SUM(ROW_COUNT) AS ROW_COUNT, SUM(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, SUM(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, SUM(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, SUM(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_DATAPGCLRATIO) / SUM(ROW_COUNT) ELSE 1 END AS TAB_DATAPGCLRATIO, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_LRGIOEFF) / SUM(ROW_COUNT) ELSE 1 END AS TAB_LRGIOEFF, CASE WHEN SUM(ROW_COUNT+delrowcnt) > 0 THEN SUM((ROW_COUNT+delrowcnt)*DATACHANGE) / SUM(ROW_COUNT+delrowcnt) ELSE 0 END AS DATACHANGE, SUM(forwrowcnt) AS forwrowcnt, SUM(delrowcnt) AS delrowcnt, SUM(extent0pgcnt) AS extent0pgcnt, SUM(oamapgcnt) AS oamapgcnt, SUM(oampagecnt) AS oampagecnt, MAX(statmoddate) AS statmoddate, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*datarowsize) / SUM(ROW_COUNT) ELSE 0 END AS datarowsize, SUM(TAB_DATA_KB+TAB_DATA_LOB_KB) AS TAB_DATA_TOTAL_KB, SUM(TAB_DATA_UTL_KB+TAB_DATA_LOB_KB) AS TAB_DATA_UTL_TOTAL_KB, SUM(TAB_USED_KB+TAB_USED_LOB_KB) AS TAB_USED_TOTAL_KB, SUM(TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) AS TAB_RESERVED_TOTAL_KB, SUM((TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) - (TAB_USED_KB+TAB_USED_LOB_KB)) AS TAB_UNUSED_TOTAL_KB FROM saptools..DBH_STG_TABLES WHERE SNAPSHOT_TIMESTAMP >= dateadd(ss,TIME_PERIOD,?) AND SNAPSHOT_TIMESTAMP <= dateadd(ss,5,?) AND BDOP = 1 AND BDOI = 0 GROUP BY DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP ) AS STD_AGGR GROUP BY DBNAME, USER_NAME, TAB_NAME ORDER BY TAB_RESERVED_TOTAL_KB DESC AT ISOLATION READ UNCOMMITTED
Database: +++SYBADM
caused by
Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
Kernel Error ID:
DB Error: Yes
SQL Code: 30013
SQL Message: [ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index
DB Object Exists: No
Duplicated Key: No
Internal Error: 1
Invalid Cursor: No
Unknown Connection: No
Connection Closed: No

how to remove partition on a table?

$
0
0

Suppose I try to setup partition for a large table. because I don't know which way is the better way. So I want to try all of them:

  • Range partitioning
  • Hash partitioning
  • List partitioning
  • Round

for my case, with my knowledge, I want to try List and Range firstly, then try Round Robin or Hash.

Looks like if I try list firstly, then I can change partition type to range.

 

but if I want Round Robin firstly as below:

alter table MyTab partition 4

go

 

then I try to remove the partition with following way:

alter table MyTab unpartition

go

 

but there still has one partition remain on MyTab. The partition ID like MyTab_592002109.

 

How can I remove it completely? then I can try List or Range partition?


how to check the information in a backup device?

$
0
0

for example, if I have a disk dump device, then I use this device for backup, maybe full backup, maybe log backup, maybe incremental backup or even backup different database to this dump device.

 

Then I can I extract the information about how many different type of backup in this device? any command can list the all backup info?

How to identity segment when to setup partition for large table?

$
0
0

I have a table with size is about 3G. There is a code column in this table with distinguish 20 value. I am try to create list partition on this column.  How can I assign segment for different value for this partition?In my database, only less than 10 segments available. If I want the better performance, each partition should be on different segment or different device? Sould each sement have enough size to hold all data? what happen if the segment is smaller? for example, if I honly have 4 sgements each with 500M?

 

If I remove or change the strategy of partition, for example, change the type to range, if the system can release the partitions on segment automatically?

How to find out the last time login for a locked login account?

$
0
0

In ASE 15.4,there are many login account show as locked and unlocked. How to find out the last login time for those locked login account?

how to create partition for this case?

$
0
0

Suppose I have a large table mytab on Segment: Myseg. This segment is across 3 devices: mydev1,  mydev2, mydev3.  Those devices is fully allocated for the segment.  What's the best way create partition for this case? Need to create new segments?

If I don't assigm segment when creat partition, any possible performeance improvement?

Question Isolation level on performance

$
0
0

If I have a question for report, and this report is not really realtime necessary(for example, munites delay is fine). in order to improve performance for report, allow query to get dirty data even there is a transaction lock on on table. So if change isolation level from 3 to 1 or 0, any big performace gain?

Viewing all 809 articles
Browse latest View live


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