Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Backup and restore
Tue, Dec 19 2006 9:06 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Tim,

I don't know if you can give me an answer at this moment, but anyway, here
it goes.
Please consider the following scenario:
I have a database named "DB1" and created the user A.
Then I granted some privileges to user A on "DB1" and did a complete backup
of DB1.
After that I drooped the database "DB1" and since user A is no longer used
in any other of my databases I drooped that user too. Some time after that,
I need the database "DB1" again, and want to restore it from the backup.

1st question:
How to restore the database?
Create a new empty database with the same name and then restore from backup?
I suppose I must have the same configuration file in my system, or the
backup will be completely useless...

2nd Question
What is going to happen to the privileges granted to user A, that no longer
exists in the system?

Best regards

--
Fernando Dias

Wed, Dec 20 2006 8:58 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fernando,

<< I don't know if you can give me an answer at this moment, but anyway,
here it goes.
Please consider the following scenario:
I have a database named "DB1" and created the user A.
Then I granted some privileges to user A on "DB1" and did a complete backup
of DB1.
After that I drooped the database "DB1" and since user A is no longer used
in any other of my databases I drooped that user too. Some time after that,
I need the database "DB1" again, and want to restore it from the backup.

1st question:
How to restore the database?

Create a new empty database with the same name and then restore from
backup? >>

I would recommend that you use a new database for the restore in such a case
since the catalog has changed and you don't want to overwrite the new
catalog.

<< I suppose I must have the same configuration file in my system, or the
backup will be completely useless... >>

This is a current bug that I mentioned, i.e. the catalog ID is getting reset
to the old catalog ID during the restore.  No, the restore will use the
existing database catalog ID.

If the database wasn't dropped (the most common case), then it's simply a
matter of restoring the database and catalog completely.

<< What is going to happen to the privileges granted to user A, that no
longer exists in the system? >>

They will simply be ignored.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Dec 21 2006 10:49 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Tim,

> I would recommend that you use a new database for the restore in such a
> case since the catalog has changed and you don't want to overwrite the new
> catalog.

I'm not sure I understand...
The catalogue didn't change - it was deleted, because the database was
dropped.
By "use a new database" you mean create a DB with the same name, as I did?

> << What is going to happen to the privileges granted to user A, that no
> longer exists in the system? >>
>
> They will simply be ignored.

The same will happen with roles, I suppose ... ?
And adding user A again is not going to make it work,
because the internal ID for user A is not the same it was originally,
correct?
(Based on the answer you gave to Michael Baytalski).


--
Fernando Dias


Thu, Dec 21 2006 3:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fernando,

<< I'm not sure I understand... The catalogue didn't change - it was
deleted, because the database was dropped. >>

Yes, but you will create a new database in which to restore the old one.
The new one will have a new, empty catalog.

<< By "use a new database" you mean create a DB with the same name, as I
did? >>

Yes.

<< The same will happen with roles, I suppose ... ? >>

Yes.

<< And adding user A again is not going to make it work, because the
internal ID for user A is not the same it was originally, correct? >>

Correct.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image