cancel
Showing results for 
Search instead for 
Did you mean: 

db_execute create snapshot with comment

martin_vombruch4
Explorer
0 Kudos

Hi @all,

1. as I read in manual in MaxDB 7.7.06.10 is it possible to create mora than 1 snapshot. How can I do this with db_execute?

2 Questionsdbmcli -d MB3 -U c db_execute create snapshot 'test'

ERR

-24988,ERR_SQL: SQL error

-3014,Invalid end of SQL statement

Operating System in Linux SLES 10SP2 and I use the csh

2. Is it planned to restore the oldestest snapshot without delete newer snapshot?

I think that was a good feature for SAP Consultancy who developed SAP Software

KG

Martin

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

> 1. as I read in manual in MaxDB 7.7.06.10 is it possible to create mora than 1 snapshot. How can I do this with db_execute?

dbmcli -U c 
dbmcli on db77>db_state
OK
State
OFFLINE

---
dbmcli on db77>db_online
OK

---
dbmcli on db77>db_execute select * from snapshots
ERR
-24988,ERR_SQL: SQL error
100,Row not found

---
dbmcli on db77>db_execute create snapshot 'first one'
OK

---
dbmcli on db77>db_execute select * from snapshots
OK
END
298;'20090824230236000000';0;38120;'YES';'first one'

---
dbmcli on db77>db_execute create snapshot 'second one'
OK

---
dbmcli on db77>db_execute select * from snapshots
OK
END
299;'20090824230408000000';0;38136;'YES';'second one'
298;'20090824230236000000';240;38120;'YES';'first one'

---
dbmcli on db77>db_execute create snapshot 'third one'
OK

---
dbmcli on db77>db_execute select * from snapshots
OK
END
300;'20090824230430000000';0;38152;'YES';'third one'
299;'20090824230408000000';208;38136;'YES';'second one'
298;'20090824230236000000';240;38120;'YES';'first one'

NOTE: to make the snapshots possible I changed some data between the single snapshots in a second SQL session.

> 2 Questionsdbmcli -d MB3 -U c db_execute create snapshot 'test'

> ERR

> -24988,ERR_SQL: SQL error

> -3014,Invalid end of SQL statement

> Operating System in Linux SLES 10SP2 and I use the csh

In that case how about

dbmcli -U c db_execute "create snapshot 'test'" ?

> 2. Is it planned to restore the oldestest snapshot without delete newer snapshot?

> I think that was a good feature for SAP Consultancy who developed SAP Software

Hmm... honesly I don't know whether there are plans to implement such a feature.

But based on the current implementation of snapshot (each snapshot x consists of snapshot x-1 + delta) I'd say that this would rather not be easy and would not 'fall into place' concerning the development.

regards,

Lars

Former Member
0 Kudos

Hi Lars and thx for your qualified answer.

dbmcli --- db_execute "create snapshot 'test'" works fine but how drop i the snapshot? A drop snapshot 'test' brings an Missing integer error.

How can I see in the Database Manager 7.7 which command he execute when i drop an snapshot? Then I can see what he does

KG

Martin

lbreddemann
Active Contributor
0 Kudos

> dbmcli --- db_execute "create snapshot 'test'" works fine but how drop i the snapshot? A drop snapshot 'test' brings an Missing integer error.

No wonder - the drop snapshot command is defined (but not documented!) as:

drop snapshot [snapshot id]

So to delete a snapshot you need to know the snapshot id:

dbmcli -d db770 -u control,control
dbmcli on db770>db_online
OK

---
dbmcli on db770>db_executenice select * from snapshots
ERR
-24988,ERR_SQL: SQL error
100,Row not found

---
dbmcli on db770>db_execute create snapshot 'first one'
OK

---
dbmcli on db770>db_executenice select * from snapshots
OK

ID                             = 461
CREATEDATE                     = '20090825124330000000'
USEDSIZE                       = 0
MAXNEEDEDSIZE                  = 27312
TRANSACTIONCONSISTENT          = 'YES'
COMMENT                        = 'first one'

---
dbmcli on db770>db_execute drop snapshot 461
OK

---
dbmcli on db770>db_executenice select * from snapshots
ERR
-24988,ERR_SQL: SQL error
100,Row not found

---

> How can I see in the Database Manager 7.7 which command he execute when i drop an snapshot? Then I can see what he does

To to that you may set the logging level of the DM-component to TRACE and open/refresh the event log viewer list.

There you will see the drop snapshot command.

However, the command is explicitly not documented.

It's not supported to use this without the DBM tools.

regards,

Lars

martin_vombruch4
Explorer
0 Kudos

Hi Lars,

Thanks for your help. The answer are very helpfully. I need this for a script to revert a specially snapshot

KG

Martin

Answers (0)