Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to rename database objects such as tables, stored-procedures, etc, during a restore of a .BAK file to a new database?

share|improve this question

migrated from Jan 18 '12 at 1:21

This question came from our site for professional and enthusiast programmers.

As in during the restore process? – Kev Jan 18 '12 at 1:20
up vote 3 down vote accepted

You will be able to do this after the restoration process, when the database is in NORECOVERY mode. Concurrently? No, there isn't a way.

share|improve this answer
I will just rename the objects once the restore is done. Thanks! – ban-G Jan 18 '12 at 16:03

No you can not change an object name (other than the actual database) when you restore the database. You'll have to wait for the database to be restored and brought online (WITH RECOVERY) before you can change object names. If the object was renamed in the source database and you are rolling the logs forward the object will automatically be renamed as the logs are rolled forward.

share|improve this answer
thanks mrdenny. – ban-G Jan 18 '12 at 16:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.