Showing posts with label load. Show all posts
Showing posts with label load. Show all posts

Friday, March 30, 2012

Marked "IN LOAD" messages

I do restores on a daily basis. The restores are taken from DISK backups. I
am not using backup devices.
I am noticing all these errors in the log file:
Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
When I do the restore, I am using the gui (rt click on database, select
restore).
Sometimes I need to restore over an existing DB, other times I restore to a
new database.
Any ideas? I want to make sure I am doing the restores correctly and remove
these errors
Is it possible if I do not specify "Force over existing Database" that it can
cause this error?
"Kristen" wrote:

> I do restores on a daily basis. The restores are taken from DISK backups. I
> am not using backup devices.
> I am noticing all these errors in the log file:
> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> When I do the restore, I am using the gui (rt click on database, select
> restore).
> Sometimes I need to restore over an existing DB, other times I restore to a
> new database.
> Any ideas? I want to make sure I am doing the restores correctly and remove
> these errors
|||Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
and not the Gui.
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...[vbcol=seagreen]
> Is it possible if I do not specify "Force over existing Database" that it
> can
> cause this error?
> "Kristen" wrote:
|||I tried doing it in TSQL......didn't work
RESTORE DATABASE test2
FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
WITH RECOVERY,
MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
Bypassing recovery for database 'test2' because it is marked IN LOAD.
Starting up database 'test2'.
Recovery is checkpointing database 'test2' (58)
"Immy" wrote:

> Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
> and not the Gui.
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
>
>
|||So - to clarify, you did a full backup of your database, then copy the
database to a new location and then restore it?
What happens if you restore the backup on the same server that the backup
was taken from?
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...[vbcol=seagreen]
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
|||And obviously I mean in a different DB name and not over the existing one ;)
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...[vbcol=seagreen]
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
|||"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
Why do you think these are "errors"? The sql server log file contains
messages, some of which may be errors but many of which are not. The
messages you see are standard messages that indicate a successful restore
(btw - I don't think you posted all the relevant messages since there should
be a "Database restored: Database: <dbname>, creation ..." message.
|||I want to make sure the "IN LOAD" messages that I am getting will not create
any issues in the future. Do you know of any potential problems I could face
when getting this "IN LOAD" message
"Scott Morris" wrote:

> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there should
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>
|||For this test, I took a backup, then restored it to a new database. When I
did that I got the error.
I am only working with 1 server so I did restore the backup on the same
server that the backup was taken from.
#2 - Most of the time, I need to restore a backup (from another DB) to an
existing database. I was using the GUI for this also. I think that may be
why I am having these messages in the log.
Can you give me an idea for the #2 scenario above what my RESTORE DATABASE
options should be?
Thanks for your help with this.
"Immy" wrote:

> So - to clarify, you did a full backup of your database, then copy the
> database to a new location and then restore it?
> What happens if you restore the backup on the same server that the backup
> was taken from?
>
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>
>
|||No I didn't post all the messages. The database did successfully restore. I
want to understand what I am doing wrong when restoring these databases so
the messages are not written to the log. Most of the time I am taking a
backup of 1 database and restoring it to another existing DB. Using the GUI
for the restore.
Any ideas?
"Scott Morris" wrote:

> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there should
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>

Marked "IN LOAD" messages

I do restores on a daily basis. The restores are taken from DISK backups. I
am not using backup devices.
I am noticing all these errors in the log file:
Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
When I do the restore, I am using the gui (rt click on database, select
restore).
Sometimes I need to restore over an existing DB, other times I restore to a
new database.
Any ideas? I want to make sure I am doing the restores correctly and remove
these errorsIs it possible if I do not specify "Force over existing Database" that it can
cause this error?
"Kristen" wrote:
> I do restores on a daily basis. The restores are taken from DISK backups. I
> am not using backup devices.
> I am noticing all these errors in the log file:
> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> When I do the restore, I am using the gui (rt click on database, select
> restore).
> Sometimes I need to restore over an existing DB, other times I restore to a
> new database.
> Any ideas? I want to make sure I am doing the restores correctly and remove
> these errors|||Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
and not the Gui.
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
> Is it possible if I do not specify "Force over existing Database" that it
> can
> cause this error?
> "Kristen" wrote:
>> I do restores on a daily basis. The restores are taken from DISK
>> backups. I
>> am not using backup devices.
>> I am noticing all these errors in the log file:
>> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
>> When I do the restore, I am using the gui (rt click on database, select
>> restore).
>> Sometimes I need to restore over an existing DB, other times I restore to
>> a
>> new database.
>> Any ideas? I want to make sure I am doing the restores correctly and
>> remove
>> these errors|||I tried doing it in TSQL......didn't work
RESTORE DATABASE test2
FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
WITH RECOVERY,
MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
Bypassing recovery for database 'test2' because it is marked IN LOAD.
Starting up database 'test2'.
Recovery is checkpointing database 'test2' (58)
"Immy" wrote:
> Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
> and not the Gui.
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
> > Is it possible if I do not specify "Force over existing Database" that it
> > can
> > cause this error?
> >
> > "Kristen" wrote:
> >
> >> I do restores on a daily basis. The restores are taken from DISK
> >> backups. I
> >> am not using backup devices.
> >> I am noticing all these errors in the log file:
> >> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> >> When I do the restore, I am using the gui (rt click on database, select
> >> restore).
> >> Sometimes I need to restore over an existing DB, other times I restore to
> >> a
> >> new database.
> >> Any ideas? I want to make sure I am doing the restores correctly and
> >> remove
> >> these errors
>
>|||So - to clarify, you did a full backup of your database, then copy the
database to a new location and then restore it?
What happens if you restore the backup on the same server that the backup
was taken from?
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
>> Try using the 'WITH RECOVERY' OPTION and issue the restore command via
>> TSQL
>> and not the Gui.
>> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
>> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
>> > Is it possible if I do not specify "Force over existing Database" that
>> > it
>> > can
>> > cause this error?
>> >
>> > "Kristen" wrote:
>> >
>> >> I do restores on a daily basis. The restores are taken from DISK
>> >> backups. I
>> >> am not using backup devices.
>> >> I am noticing all these errors in the log file:
>> >> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
>> >> When I do the restore, I am using the gui (rt click on database,
>> >> select
>> >> restore).
>> >> Sometimes I need to restore over an existing DB, other times I restore
>> >> to
>> >> a
>> >> new database.
>> >> Any ideas? I want to make sure I am doing the restores correctly and
>> >> remove
>> >> these errors
>>|||And obviously I mean in a different DB name and not over the existing one ;)
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
>> Try using the 'WITH RECOVERY' OPTION and issue the restore command via
>> TSQL
>> and not the Gui.
>> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
>> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
>> > Is it possible if I do not specify "Force over existing Database" that
>> > it
>> > can
>> > cause this error?
>> >
>> > "Kristen" wrote:
>> >
>> >> I do restores on a daily basis. The restores are taken from DISK
>> >> backups. I
>> >> am not using backup devices.
>> >> I am noticing all these errors in the log file:
>> >> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
>> >> When I do the restore, I am using the gui (rt click on database,
>> >> select
>> >> restore).
>> >> Sometimes I need to restore over an existing DB, other times I restore
>> >> to
>> >> a
>> >> new database.
>> >> Any ideas? I want to make sure I am doing the restores correctly and
>> >> remove
>> >> these errors
>>|||"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
Why do you think these are "errors"? The sql server log file contains
messages, some of which may be errors but many of which are not. The
messages you see are standard messages that indicate a successful restore
(btw - I don't think you posted all the relevant messages since there should
be a "Database restored: Database: <dbname>, creation ..." message.|||I want to make sure the "IN LOAD" messages that I am getting will not create
any issues in the future. Do you know of any potential problems I could face
when getting this "IN LOAD" message
"Scott Morris" wrote:
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> >I tried doing it in TSQL......didn't work
> >
> > RESTORE DATABASE test2
> > FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> > WITH RECOVERY,
> > MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> > MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> >
> > Bypassing recovery for database 'test2' because it is marked IN LOAD.
> > Starting up database 'test2'.
> > Recovery is checkpointing database 'test2' (58)
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there should
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>|||For this test, I took a backup, then restored it to a new database. When I
did that I got the error.
I am only working with 1 server so I did restore the backup on the same
server that the backup was taken from.
#2 - Most of the time, I need to restore a backup (from another DB) to an
existing database. I was using the GUI for this also. I think that may be
why I am having these messages in the log.
Can you give me an idea for the #2 scenario above what my RESTORE DATABASE
options should be?
Thanks for your help with this.
"Immy" wrote:
> So - to clarify, you did a full backup of your database, then copy the
> database to a new location and then restore it?
> What happens if you restore the backup on the same server that the backup
> was taken from?
>
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> >I tried doing it in TSQL......didn't work
> >
> > RESTORE DATABASE test2
> > FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> > WITH RECOVERY,
> > MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> > MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> >
> > Bypassing recovery for database 'test2' because it is marked IN LOAD.
> > Starting up database 'test2'.
> > Recovery is checkpointing database 'test2' (58)
> >
> >
> > "Immy" wrote:
> >
> >> Try using the 'WITH RECOVERY' OPTION and issue the restore command via
> >> TSQL
> >> and not the Gui.
> >>
> >> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> >> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
> >> > Is it possible if I do not specify "Force over existing Database" that
> >> > it
> >> > can
> >> > cause this error?
> >> >
> >> > "Kristen" wrote:
> >> >
> >> >> I do restores on a daily basis. The restores are taken from DISK
> >> >> backups. I
> >> >> am not using backup devices.
> >> >> I am noticing all these errors in the log file:
> >> >> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> >> >> When I do the restore, I am using the gui (rt click on database,
> >> >> select
> >> >> restore).
> >> >> Sometimes I need to restore over an existing DB, other times I restore
> >> >> to
> >> >> a
> >> >> new database.
> >> >> Any ideas? I want to make sure I am doing the restores correctly and
> >> >> remove
> >> >> these errors
> >>
> >>
> >>
>
>|||No I didn't post all the messages. The database did successfully restore. I
want to understand what I am doing wrong when restoring these databases so
the messages are not written to the log. Most of the time I am taking a
backup of 1 database and restoring it to another existing DB. Using the GUI
for the restore.
Any ideas?
"Scott Morris" wrote:
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> >I tried doing it in TSQL......didn't work
> >
> > RESTORE DATABASE test2
> > FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> > WITH RECOVERY,
> > MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> > MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> >
> > Bypassing recovery for database 'test2' because it is marked IN LOAD.
> > Starting up database 'test2'.
> > Recovery is checkpointing database 'test2' (58)
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there should
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>|||If I do RESTORE DATABASE test WITH RECOVERY
it doesn't actually do a restore from a backup...it just sets the RECOVERY
option correct?
"Immy" wrote:
> Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
> and not the Gui.
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
> > Is it possible if I do not specify "Force over existing Database" that it
> > can
> > cause this error?
> >
> > "Kristen" wrote:
> >
> >> I do restores on a daily basis. The restores are taken from DISK
> >> backups. I
> >> am not using backup devices.
> >> I am noticing all these errors in the log file:
> >> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> >> When I do the restore, I am using the gui (rt click on database, select
> >> restore).
> >> Sometimes I need to restore over an existing DB, other times I restore to
> >> a
> >> new database.
> >> Any ideas? I want to make sure I am doing the restores correctly and
> >> remove
> >> these errors
>
>|||"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:D9C48AE9-91FC-4752-94CB-0428A569F826@.microsoft.com...
> No I didn't post all the messages. The database did successfully restore.
> I
> want to understand what I am doing wrong when restoring these databases so
> the messages are not written to the log. Most of the time I am taking a
> backup of 1 database and restoring it to another existing DB. Using the
> GUI
> for the restore.
> Any ideas?
There isn't anything wrong and you can't directly control these messages.
These messages are not errors. Again, not everything written to the log is
an error.

Marked "IN LOAD" messages

I do restores on a daily basis. The restores are taken from DISK backups.
I
am not using backup devices.
I am noticing all these errors in the log file:
Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
When I do the restore, I am using the gui (rt click on database, select
restore).
Sometimes I need to restore over an existing DB, other times I restore to a
new database.
Any ideas? I want to make sure I am doing the restores correctly and remove
these errorsIs it possible if I do not specify "Force over existing Database" that it ca
n
cause this error?
"Kristen" wrote:

> I do restores on a daily basis. The restores are taken from DISK backups.
I
> am not using backup devices.
> I am noticing all these errors in the log file:
> Bypassing recovery for database 'xxxxx' because it is marked IN LOAD.
> When I do the restore, I am using the gui (rt click on database, select
> restore).
> Sometimes I need to restore over an existing DB, other times I restore to
a
> new database.
> Any ideas? I want to make sure I am doing the restores correctly and remo
ve
> these errors|||Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQL
and not the Gui.
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...[vbcol=seagreen]
> Is it possible if I do not specify "Force over existing Database" that it
> can
> cause this error?
> "Kristen" wrote:
>|||I tried doing it in TSQL......didn't work
RESTORE DATABASE test2
FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
WITH RECOVERY,
MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
Bypassing recovery for database 'test2' because it is marked IN LOAD.
Starting up database 'test2'.
Recovery is checkpointing database 'test2' (58)
"Immy" wrote:

> Try using the 'WITH RECOVERY' OPTION and issue the restore command via TSQ
L
> and not the Gui.
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:9FE4EEAE-6332-4F67-BA23-6D1AA00878D3@.microsoft.com...
>
>|||So - to clarify, you did a full backup of your database, then copy the
database to a new location and then restore it?
What happens if you restore the backup on the same server that the backup
was taken from?
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...[vbcol=seagreen]
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
>|||And obviously I mean in a different DB name and not over the existing one ;)
"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...[vbcol=seagreen]
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
>
> "Immy" wrote:
>|||"Kristen" <Kristen@.discussions.microsoft.com> wrote in message
news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>I tried doing it in TSQL......didn't work
> RESTORE DATABASE test2
> FROM DISK = 'E:\MSSQL\Backup\LVTS_Min_03122007.bak'
> WITH RECOVERY,
> MOVE 'LVTS_Min_Data' TO 'E:\MSSQL\Backup\test2_data.mdf',
> MOVE 'LVTS_Min_Log' TO 'E:\MSSQL\Backup\test2_log.ldf'
> Bypassing recovery for database 'test2' because it is marked IN LOAD.
> Starting up database 'test2'.
> Recovery is checkpointing database 'test2' (58)
Why do you think these are "errors"? The sql server log file contains
messages, some of which may be errors but many of which are not. The
messages you see are standard messages that indicate a successful restore
(btw - I don't think you posted all the relevant messages since there should
be a "Database restored: Database: <dbname>, creation ..." message.|||I want to make sure the "IN LOAD" messages that I am getting will not create
any issues in the future. Do you know of any potential problems I could fac
e
when getting this "IN LOAD" message
"Scott Morris" wrote:

> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there shou
ld
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>|||For this test, I took a backup, then restored it to a new database. When I
did that I got the error.
I am only working with 1 server so I did restore the backup on the same
server that the backup was taken from.
#2 - Most of the time, I need to restore a backup (from another DB) to an
existing database. I was using the GUI for this also. I think that may be
why I am having these messages in the log.
Can you give me an idea for the #2 scenario above what my RESTORE DATABASE
options should be?
Thanks for your help with this.
"Immy" wrote:

> So - to clarify, you did a full backup of your database, then copy the
> database to a new location and then restore it?
> What happens if you restore the backup on the same server that the backup
> was taken from?
>
> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
>
>|||No I didn't post all the messages. The database did successfully restore.
I
want to understand what I am doing wrong when restoring these databases so
the messages are not written to the log. Most of the time I am taking a
backup of 1 database and restoring it to another existing DB. Using the GUI
for the restore.
Any ideas?
"Scott Morris" wrote:

> "Kristen" <Kristen@.discussions.microsoft.com> wrote in message
> news:5365DC0E-0F94-4109-A028-E775E00E8A10@.microsoft.com...
> Why do you think these are "errors"? The sql server log file contains
> messages, some of which may be errors but many of which are not. The
> messages you see are standard messages that indicate a successful restore
> (btw - I don't think you posted all the relevant messages since there shou
ld
> be a "Database restored: Database: <dbname>, creation ..." message.
>
>

Mapping schema for GoogleBase XSD

I want to load into a SQL Server table with SQLXMLBulkload an xml file that
is formatted with google base xsd (http://base.google.com/base/base.xsd). I
need a mapping schema for that, correct? To map the elements of the xml to
my table. Does anyone have a mapping schema for this?
Steve
Hi Steve
The mapping depends on the database tables to which you want to map it to.
Best regards
Michael
"Steve Mc" <stevemc@.zillow.com> wrote in message
news:OGEN6NOiHHA.5052@.TK2MSFTNGP05.phx.gbl...
>I want to load into a SQL Server table with SQLXMLBulkload an xml file that
>is formatted with google base xsd (http://base.google.com/base/base.xsd).
>I need a mapping schema for that, correct? To map the elements of the xml
>to my table. Does anyone have a mapping schema for this?
> Steve
>
|||Hello,
Please take a look at http://msdn2.microsoft.com/en-us/library/ms172649.aspx
to understand how annotations work.
Let me know if you need further assistance.
Regards,
Monica Frintu
"Steve Mc" wrote:

> I want to load into a SQL Server table with SQLXMLBulkload an xml file that
> is formatted with google base xsd (http://base.google.com/base/base.xsd). I
> need a mapping schema for that, correct? To map the elements of the xml to
> my table. Does anyone have a mapping schema for this?
> Steve
>
>

Mapping schema for GoogleBase XSD

I want to load into a SQL Server table with SQLXMLBulkload an xml file that
is formatted with google base xsd (http://base.google.com/base/base.xsd). I
need a mapping schema for that, correct? To map the elements of the xml to
my table. Does anyone have a mapping schema for this?
SteveHi Steve
The mapping depends on the database tables to which you want to map it to.
Best regards
Michael
"Steve Mc" <stevemc@.zillow.com> wrote in message
news:OGEN6NOiHHA.5052@.TK2MSFTNGP05.phx.gbl...
>I want to load into a SQL Server table with SQLXMLBulkload an xml file that
>is formatted with google base xsd (http://base.google.com/base/base.xsd).
>I need a mapping schema for that, correct? To map the elements of the xml
>to my table. Does anyone have a mapping schema for this?
> Steve
>|||Hello,
Please take a look at http://msdn2.microsoft.com/en-us/library/ms172649.aspx
to understand how annotations work.
Let me know if you need further assistance.
Regards,
--
Monica Frintu
"Steve Mc" wrote:

> I want to load into a SQL Server table with SQLXMLBulkload an xml file tha
t
> is formatted with google base xsd (http://base.google.com/base/base.xsd).
I
> need a mapping schema for that, correct? To map the elements of the xml t
o
> my table. Does anyone have a mapping schema for this?
> Steve
>
>sql

Wednesday, March 28, 2012

Mapping multiple elements to the same table

I have a huge 1+GB xml file that I'd like to bulk load into a single staging
table in SQL Server. The xml file has subelements that need to be loaded
into the same table as the parent element. For example:
<Customer>
<Address>
</Address>
<ContactInfo>
</ContactInfo>
</Customer>
I cannot seem to get an XSD that will load all the data into 1 table. Also
because of the size of the XML file, performing an XSLT transformation on the
file is not possible. What are my options? Is it possible to map
subelements to the same table as the containing element?
Could you map them to two different views of the same table?
Note also, that the mapping kind of expects that you give a relationship
annotation when you map parents and children. What is the error message or
behaviour that you are getting?
Best regards
Michael
"Mark Weber" <Mark Weber@.discussions.microsoft.com> wrote in message
news:14D8B400-733C-4080-8888-BD3551C6AD09@.microsoft.com...
>I have a huge 1+GB xml file that I'd like to bulk load into a single
>staging
> table in SQL Server. The xml file has subelements that need to be loaded
> into the same table as the parent element. For example:
> <Customer>
> <Address>
> </Address>
> <ContactInfo>
> </ContactInfo>
> </Customer>
> I cannot seem to get an XSD that will load all the data into 1 table.
> Also
> because of the size of the XML file, performing an XSLT transformation on
> the
> file is not possible. What are my options? Is it possible to map
> subelements to the same table as the containing element?

Mapping multiple elements to the same table

I have a huge 1+GB xml file that I'd like to bulk load into a single staging
table in SQL Server. The xml file has subelements that need to be loaded
into the same table as the parent element. For example:
<Customer>
<Address>
</Address>
<ContactInfo>
</ContactInfo>
</Customer>
I cannot seem to get an XSD that will load all the data into 1 table. Also
because of the size of the XML file, performing an XSLT transformation on th
e
file is not possible. What are my options? Is it possible to map
subelements to the same table as the containing element?Could you map them to two different views of the same table?
Note also, that the mapping kind of expects that you give a relationship
annotation when you map parents and children. What is the error message or
behaviour that you are getting?
Best regards
Michael
"Mark Weber" <Mark Weber@.discussions.microsoft.com> wrote in message
news:14D8B400-733C-4080-8888-BD3551C6AD09@.microsoft.com...
>I have a huge 1+GB xml file that I'd like to bulk load into a single
>staging
> table in SQL Server. The xml file has subelements that need to be loaded
> into the same table as the parent element. For example:
> <Customer>
> <Address>
> </Address>
> <ContactInfo>
> </ContactInfo>
> </Customer>
> I cannot seem to get an XSD that will load all the data into 1 table.
> Also
> because of the size of the XML file, performing an XSLT transformation on
> the
> file is not possible. What are my options? Is it possible to map
> subelements to the same table as the containing element?sql

Monday, February 20, 2012

Management Studio: connect again to load each SQL file

On Management Studio, can we choose to open any SQL files in the same Query window?

Right now, whenever we open a SQL file, we always have to "Connect to Database Engine" each time. In the new Query window, we have to select a database each time. For example, if we want to run 3 SQL scripts in the database "DB1", we have to do the following steps:
1. Click "Open File" to load the SQL file "S1.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;
2. Click "Open File" to load the SQL file "S2.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;
3. Click "Open File" to load the SQL file "S3.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;

Is there any easier way to run a few SQL files in the same database without signing on and selecting the database so many times?

Thanks,
Tony

You can use the sqlcmd.exe/osql.exe command line tool to run your files.

i.e.

sqlcmd.exe -E -S%computername% -dpubs -ifile1.sql
sqlcmd.exe -E -S%computername% -dpubs -ifile2.sql
sqlcmd.exe -E -S%computername% -dpubs -ifile3.sql|||Thanks, Greg.
As a DBA, I use "SQL Server 2000 Enterprise Manager" and "Query Analyzer" daily to administer and run SQL scripts among a lot of database servers. I do use your suggested commands to run a few fix scripts by SQL jobs or Task schedulers. But for some ad hoc SQL scripts, query analyzer gives me a nice way to load and run any SQL script file in any database.
Some users also logged a suggestion on MSDN product feedback center to request this for SQL Server 2005. According to Microsoft:


Resolved as By Design by Microsoft on 2005-05-24 at 09:19:03
Hi,
This will significantly improve with the June CTP. The New Query command is more aware of where you are in the UI to guess your connection. If the connection can't be established within 5 seconds, we will then display the connection dialog to allow you to Cancel the connection.
Thank you,
Bill Ramos


We are using the June CTP. The "New Query" command works great. But the "Open File" command is still awkward. Hope Microsoft can improve the "Open File" command also. There is a workaround though. I can use "notepad" to open all SQL script files. Then copy and paste to the same query window to run them one at a time. It is ironic by doing so in this next-generation SQL Server. But at least, this workaround is better than logging on and selecting a database for each "Open File" command.|||

I dug around a bit, and found a solution that may/may not work for you. Here's what I did:

In SQL Enterprise Manager:
- create a new Project.
- Add all your SQL Files to your project in "Queries"
- Create a new connection ( or multiple connections if you have multiple servers to connect to) in "Connections". Make sure to set a default database.

Once this is done, every time you double-click on your file in "Queries", it will open it in the server and database entry specified in "Connections".

As far as doing the same thing in "Open File", my guess is we'd need a whole new icon to do this, similar to how we have "New Query", which opens a new window based on the existing connection, and "Database Engine Query", which opens a new window and prompts for a new connection, regardless what connections you have open.

|||I logged a suggestion with Microsoft to add a "Load SQL Script" command within the current existing query window. See the details:
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=8098e484-1019-4331-aaba-1d11828d887a

They will take it under consideration for the next release. At meantime, they also suggested to use "Project" to hold connections and queries. I tried it. The only thing I do not like is that we cannot change its "Associated Connection" in the query properties. That means I cannot run the same query in another server. I have to save a copy of the same query for each different connection.|||Thanks to Erland Sommarskog for his post on my suggestion, we can use "Edit -> Insert File as Text". It is perfect.|||

Not quite perfect. I'd like to be able to select several files in Windows Explorer at once, hit "Enter", and have them open with my current cnxn or prompt me once for the cnxn to be used for all files.

Even better:
1. If I'm opening several files at once, and I am not currently connected to a server or the tab/window that has focus isn't connected, prompt me for the first file's cnxn and ask if I want to apply that cnxn to the subsequent files.
2. If I am connected then presume I want to use the existing cnxn of the tab/window I have focus on (in the case I have several tabs open with different cnxns).

Management Studio: connect again to load each SQL file

On Management Studio, can we choose to open any SQL files in the same Query window?

Right now, whenever we open a SQL file, we always have to "Connect to Database Engine" each time. In the new Query window, we have to select a database each time. For example, if we want to run 3 SQL scripts in the database "DB1", we have to do the following steps:
1. Click "Open File" to load the SQL file "S1.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;
2. Click "Open File" to load the SQL file "S2.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;
3. Click "Open File" to load the SQL file "S3.sql"; Connect to Database Engine; On the new Query window, select the database "DB1"; Execute;

Is there any easier way to run a few SQL files in the same database without signing on and selecting the database so many times?

Thanks,
Tony

You can use the sqlcmd.exe/osql.exe command line tool to run your files.

i.e.

sqlcmd.exe -E -S%computername% -dpubs -ifile1.sql
sqlcmd.exe -E -S%computername% -dpubs -ifile2.sql
sqlcmd.exe -E -S%computername% -dpubs -ifile3.sql
|||Thanks, Greg.
As a DBA, I use "SQL Server 2000 Enterprise Manager" and "Query Analyzer" daily to administer and run SQL scripts among a lot of database servers. I do use your suggested commands to run a few fix scripts by SQL jobs or Task schedulers. But for some ad hoc SQL scripts, query analyzer gives me a nice way to load and run any SQL script file in any database.
Some users also logged a suggestion on MSDN product feedback center to request this for SQL Server 2005. According to Microsoft:


Resolved as By Design by Microsoft on 2005-05-24 at 09:19:03
Hi,
This will significantly improve with the June CTP. The New Query command is more aware of where you are in the UI to guess your connection. If the connection can't be established within 5 seconds, we will then display the connection dialog to allow you to Cancel the connection.
Thank you,
Bill Ramos


We are using the June CTP. The "New Query" command works great. But the "Open File" command is still awkward. Hope Microsoft can improve the "Open File" command also. There is a workaround though. I can use "notepad" to open all SQL script files. Then copy and paste to the same query window to run them one at a time. It is ironic by doing so in this next-generation SQL Server. But at least, this workaround is better than logging on and selecting a database for each "Open File" command.|||

I dug around a bit, and found a solution that may/may not work for you. Here's what I did:

In SQL Enterprise Manager:
- create a new Project.
- Add all your SQL Files to your project in "Queries"
- Create a new connection ( or multiple connections if you have multiple servers to connect to) in "Connections". Make sure to set a default database.

Once this is done, every time you double-click on your file in "Queries", it will open it in the server and database entry specified in "Connections".

As far as doing the same thing in "Open File", my guess is we'd need a whole new icon to do this, similar to how we have "New Query", which opens a new window based on the existing connection, and "Database Engine Query", which opens a new window and prompts for a new connection, regardless what connections you have open.

|||I logged a suggestion with Microsoft to add a "Load SQL Script" command within the current existing query window. See the details:
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=8098e484-1019-4331-aaba-1d11828d887a

They will take it under consideration for the next release. At meantime, they also suggested to use "Project" to hold connections and queries. I tried it. The only thing I do not like is that we cannot change its "Associated Connection" in the query properties. That means I cannot run the same query in another server. I have to save a copy of the same query for each different connection.|||Thanks to Erland Sommarskog for his post on my suggestion, we can use "Edit -> Insert File as Text". It is perfect.

|||

Not quite perfect. I'd like to be able to select several files in Windows Explorer at once, hit "Enter", and have them open with my current cnxn or prompt me once for the cnxn to be used for all files.

Even better:
1. If I'm opening several files at once, and I am not currently connected to a server or the tab/window that has focus isn't connected, prompt me for the first file's cnxn and ask if I want to apply that cnxn to the subsequent files.
2. If I am connected then presume I want to use the existing cnxn of the tab/window I have focus on (in the case I have several tabs open with different cnxns).