Wednesday, March 21, 2012

Restore database creates <null>

Hi - I am using sql 2000 - and Enterprise Manager.
When restoring a backup, some ntext (4000) fields are being left as
<null> although there is clearly some text in the original database
fields.
I've been supplied a .bak file of a live database, in order to use it
locally to do some reporting.
I used Enterprise Manager/All Tasks/Restore Database...
1) Created a database
2) Ent-Mgr/Right click over new database (1), Restore Database/General
Tab - restore as database set to my new database (1)
3) Clicked From Device, then Select Devices
4) Clicked Add, then in the Filename field, navigated to the .bak file
on my drive
5) Only restore from media... is unchecked - clicked ok
6) On the Restore Database/Options Tab, Force restore over existing
database is checked, Leave database operational is selected
7) clicked ok, and the database was restored to my new database (1)
When I checked the field, which should contain some text, some records
do, and some just contain <Null> - I have no access to the live server.
Is it likely this is being caused by some other flag I have not
checked/unchecked in Enterprise Manager, or is there something else
anyone can suggest?
Thanks for your help,
Mark
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!A restored database is exactly like the original. The only differences are
(optionally) the database and file names.
If the restored data is not as expected, check to see if the backup file
contains multiple backup sets. You can do this by clicking the 'View
Contents' button on the EM restore dialog. Unless specified otherwise, only
the first (oldest) backup is restored. There is no need to create the
database beforehand because RESTORE will create the database during the
restore process.

> When I checked the field, which should contain some text, some records
> do, and some just contain <Null> - I have no access to the live server.
How can you say for certain that the data is not NULL in the source if you
have no access to the live server?
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark" <anonymous@.devdex.com> wrote in message
news:eFEymhkSEHA.1168@.TK2MSFTNGP11.phx.gbl...
> Hi - I am using sql 2000 - and Enterprise Manager.
> When restoring a backup, some ntext (4000) fields are being left as
> <null> although there is clearly some text in the original database
> fields.
> I've been supplied a .bak file of a live database, in order to use it
> locally to do some reporting.
> I used Enterprise Manager/All Tasks/Restore Database...
> 1) Created a database
> 2) Ent-Mgr/Right click over new database (1), Restore Database/General
> Tab - restore as database set to my new database (1)
> 3) Clicked From Device, then Select Devices
> 4) Clicked Add, then in the Filename field, navigated to the .bak file
> on my drive
> 5) Only restore from media... is unchecked - clicked ok
> 6) On the Restore Database/Options Tab, Force restore over existing
> database is checked, Leave database operational is selected
> 7) clicked ok, and the database was restored to my new database (1)
> When I checked the field, which should contain some text, some records
> do, and some just contain <Null> - I have no access to the live server.
> Is it likely this is being caused by some other flag I have not
> checked/unchecked in Enterprise Manager, or is there something else
> anyone can suggest?
> Thanks for your help,
> Mark
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi Dan - thanks for the pointers - I'll try those when I get back on
Monday.
I know the live server has data, as I can query specific tables and
fields through a web interface.
Cheers, Mark
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hi - there is only one backup showing when I check View Contents.
Is there any other reason this may have failed? (different settings on
the install of SQL Server etc?)
Thanks, Mark
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||I can't really think of anything that would cause this, assuming the backup
date is as expected. A database restore is all-or-nothing so the databases
should be in sync after the restore.
Have you tried issuing the same queries against both databases via Query
Analyzer? If this yields different results, you might try another
backup/restore.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark" <anonymous@.devdex.com> wrote in message
news:%23BBodLGTEHA.3872@.TK2MSFTNGP10.phx.gbl...
> Hi - there is only one backup showing when I check View Contents.
> Is there any other reason this may have failed? (different settings on
> the install of SQL Server etc?)
> Thanks, Mark
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!sql

No comments:

Post a Comment