ASE 16.0 SP02
'load database ... with listonly=create_sql' generates DDL ('create database' statement) from a dump file.
When generating 'create database' statement from a shrinked database dump, it carries unnecessary line including 'unknown device'.
*** How to reproduce the issue ***
1. Create a database having data and log devices
1> create database db1 on datadev=200 log on logdev=100
2> go
2. Set "single user" option true to enable database shrinking
1> sp_dboption db1, "single", true
2> go
3. Make database size smaller by shrinking data device
1> alter database db1 off datadev=100
2> go
4. Dump database
1> dump database db1 to "db1.dmp"
2> go
5. Generate 'create database' statement by 'load database ... with listonly=create_sql'
1> load database db1 from "db1.dmp" with listonly=create_sql
2> go
DISK INIT
name = 'datadev'
, physname = '/export/home/ase16/data/datadev.dat'
, size = '200M'
, directio = true
go
DISK INIT
name = 'logdev'
, physname = '/export/home/ase16/data/logdev.dat'
, size = '100M'
, directio = true
go
CREATE DATABASE db1
ON datadev = '100M'
, unknown_device = '100M' ----> This line should be removed.
LOG ON logdev = '100M'
go
I believe the line including ' unknown_device =' is unnecessary and should be removed.
Any plan to fix this behavior in future releases?
Regards,
Kazuo Otani
Request clarification before answering.
1> create database db1 on datadev=200 log on logdev=100
2> go
1> alter database db1 off datadev=100
2> go
1> select dbid,segmap,lstart,size,vstart from sysusages where dbid=db_id("db1")
2> go
dbid segmap lstart size vstart
------ ----------- ---------- --------- -----------
8 3 0 51200 0
8 0 51200 51200 51200
8 4 102400 51200 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.