Skip to Content
0

ASE database owner changes after UNMOUNT followed by MOUNT

Oct 13, 2016 at 09:52 PM

36

avatar image

Hello,

We are testing with ASE 15.7 SP132 and have noticed that after unmounting and remounting the database, it loses the ownership (it reverts back to the person performing the mount). Is this expected behavior?

First I change the owner of my database:

1> use Vhaight_0D7
2> go
1> sp_changedbowner billy, true
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
Database owner changed.
(return status = 0)

I confirm the owner has changed:

1> sp_helpdb
2> go | grep Vhaight
 Vhaight_0D7        2248.0 MB billy    11 Oct 13, 2016 full                 0        0 abort tran on log full, mixed log and data 

Then I UNMOUNT and MOUNT the database:

1> UNMOUNT DATABASE Vhaight_0D7 to "/tmp/Vhaight.manifest" WITH OVERRIDE                                                                       
2> go

1> MOUNT DATABASE Vhaight_0D7 from "/tmp/Vhaight.manifest" WITH LISTONLY
2> go
[database]
Vhaight_0D7
[device]
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxuP91vfxI9vrrvX5cvYr3_0.dat' = 'dxuP91vfxI9vrrvX5cvYr3_0_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxvrx2du33kvzvvf3wtnfb_1.dat' = 'dxvrx2du33kvzvvf3wtnfb_1_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxtX1LXb260xvxuxnfugvp_2.dat' = 'dxtX1LXb260xvxuxnfugvp_2_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxhnf5pRcu38zv57p29bME_3.dat' = 'dxhnf5pRcu38zv57p29bME_3_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxvmtf38ZIslrxvL7Z3Xgv_4.dat' = 'dxvmtf38ZIslrxvL7Z3Xgv_4_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxf8o1ry88Dtt3bv7aUn37_5.dat' = 'dxf8o1ry88Dtt3bv7aUn37_5_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dx6a9v737bv8oenrv2dvzc_6.dat' = 'dx6a9v737bv8oenrv2dvzc_6_dat'
'/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dx7L9u71td78Uo8X372Yzf_7.dat' = 'dx7L9u71td78Uo8X372Yzf_7_dat'

1> MOUNT DATABASE Vhaight_0D7 AS Vhaight_0D7 FROM "/tmp/Vhaight.manifest" USING
2> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxuP91vfxI9vrrvX5cvYr3_0.dat' = 'dxuP91vfxI9vrrvX5cvYr3_0_dat',
3> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxvrx2du33kvzvvf3wtnfb_1.dat' = 'dxvrx2du33kvzvvf3wtnfb_1_dat',
4> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxtX1LXb260xvxuxnfugvp_2.dat' = 'dxtX1LXb260xvxuxnfugvp_2_dat',
5> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxhnf5pRcu38zv57p29bME_3.dat' = 'dxhnf5pRcu38zv57p29bME_3_dat',
6> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxvmtf38ZIslrxvL7Z3Xgv_4.dat' = 'dxvmtf38ZIslrxvL7Z3Xgv_4_dat',
7> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dxf8o1ry88Dtt3bv7aUn37_5.dat' = 'dxf8o1ry88Dtt3bv7aUn37_5_dat',
8> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dx6a9v737bv8oenrv2dvzc_6.dat' = 'dx6a9v737bv8oenrv2dvzc_6_dat',
9> '/export/home/sybase/toolkit2/564d5bfd-187c-ff17-14af-7e77caead436-vdb-89/datafile/dx7L9u71td78Uo8X372Yzf_7.dat' = 'dx7L9u71td78Uo8X372Yzf_7_dat'
10> go
Started estimating recovery log boundaries for database 'Vhaight_0D7'.
Database 'Vhaight_0D7', checkpoint=(262262, 43), first=(262262, 43), last=(262262, 43).
Completed estimating recovery log boundaries for database 'Vhaight_0D7'.
Started ANALYSIS pass for database 'Vhaight_0D7'.
Completed ANALYSIS pass for database 'Vhaight_0D7'.
Started REDO pass for database 'Vhaight_0D7'. The total number of log records to process is 1.
Completed REDO pass for database 'Vhaight_0D7'.
Recovery of database 'Vhaight_0D7' will undo incomplete nested top actions.
Started recovery checkpoint for database 'Vhaight_0D7'.
Completed recovery checkpoint for database 'Vhaight_0D7'.
Started filling free space info for database 'Vhaight_0D7'.
Completed filling free space info for database 'Vhaight_0D7'.
Started cleaning up the default data cache for database 'Vhaight_0D7'.
Completed cleaning up the default data cache for database 'Vhaight_0D7'.
MOUNT DATABASE: Completed recovery of mounted database 'Vhaight_0D7'.
1> online database Vhaight_0D7
2> go
Database 'Vhaight_0D7' is now online.

Now I check and see that the ownership of the database has reverted to the login executing the MOUNT command:

1> sp_helpdb
2> go | grep Vhaight_0D7
 Vhaight_0D7        2248.0 MB sa       11 Oct 13, 2016 full                 0        0 abort tran on log full, mixed log and data 

I don't see anything in the documentation about the database ownership being preserved in the "mount" database documentation.

Also, the documentation doesn't seem to mention anything about whether database options will be preserved but my limited testing show they are.

Should one expect both the database owner and options be preserved when unmounting and mounting a database?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers