Showing posts with label online. Show all posts
Showing posts with label online. Show all posts

Thursday, February 16, 2012

Bringing Standby server online when in "no recovery mode"

Hi,

I am trying to set up Log Shipping. Though I have the following problem...
I want to set up LS without any user being able to connect. As I understand, this means I have to select the "No recovery mode" in the "Add Destination Database" window when creating the Log Shipping Maintenance Plan.
This all works fine. I set this up, no user can connect to the database (it shows status: (Loading) ), perfect.

However, the problem I encounter is when I want to bring the Standby server online.
I run the 'sp_change_primary_role' SP on the primary server... works fine.
I run the 'sp_change_secondary_role' on the standby server... errors:

Server: Msg 927, Level 14, State 2, Line 1
Database 'Northwind' cannot be opened. It is in the middle of a restore.
Server: Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Server: Msg 14440, Level 16, State 1, Procedure sp_change_secondary_role, Line 49
Could not set single user mode.

So what am I doing wrong? Am I forgetting something? I think i must do. The only way to get the secondary (standby) online is to do a "detach - attach", as far as I know.
I can not check its Properties or do a restore or backup of this database either.

Any help would be very much appreciated.

Thanks in advance and kind regards,

Jan V.Run the following command, to open the database:

restore database (name of database) with recovery

This will trigger a recovery of the database, and reset the database to "open" from "loading"

Bringing a DB online

Hi all,
I have tried to search for answers to this, but couldn't find anything specific. I have taken a database Offline, I can't get it to come back online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error message. User must be in the Master da
tabase. I am using osql with the -E command. Do I need to use something else?
Justin,
try using
osql -E -d master
ALTER DATABASE dbname SET ONLINE
go
Alternatively you can reset the default database for your windows login, and
then miss out the -d master argument.
HTH,
Paul Ibison
|||Hi;
Execute the below command from command prompt
OSQL -E -S server (enter)
1>use master
2>go
1>Alter database dbname set online
2>go
Thanks
Hari
MCDBA
"Justin Cook" <anonymous@.discussions.microsoft.com> wrote in message
news:6BEB437E-CDB1-4F8D-927A-EB1E2D140AC6@.microsoft.com...
> Hi all,
> I have tried to search for answers to this, but couldn't find anything
specific. I have taken a database Offline, I can't get it to come back
online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error
message. User must be in the Master database. I am using osql with the -E
command. Do I need to use something else?
>
|||THANK YOU THANK YOU

Bringing a DB online

Hi all
I have tried to search for answers to this, but couldn't find anything specific. I have taken a database Offline, I can't get it to come back online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error message. User must be in the Master database. I am using osql with the -E command. Do I need to use something elseJustin,
try using
osql -E -d master
ALTER DATABASE dbname SET ONLINE
go
Alternatively you can reset the default database for your windows login, and
then miss out the -d master argument.
HTH,
Paul Ibison|||Hi;
Execute the below command from command prompt
OSQL -E -S server (enter)
1>use master
2>go
1>Alter database dbname set online
2>go
Thanks
Hari
MCDBA
"Justin Cook" <anonymous@.discussions.microsoft.com> wrote in message
news:6BEB437E-CDB1-4F8D-927A-EB1E2D140AC6@.microsoft.com...
> Hi all,
> I have tried to search for answers to this, but couldn't find anything
specific. I have taken a database Offline, I can't get it to come back
online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error
message. User must be in the Master database. I am using osql with the -E
command. Do I need to use something else?
>|||THANK YOU THANK YOU :)

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,
Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>
|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
last
>
|||Can you post that exact RESTORE command you are executing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> last
>
|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
4326,[vbcol=seagreen]
is[vbcol=seagreen]
includes[vbcol=seagreen]
again[vbcol=seagreen]
|||If you just want to make the database accessible (fail over), try executing (as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> 4326,
> is
> includes
> again
>

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
last[vbcol=seagreen]
>|||Can you post that exact RESTORE command you are executing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[v
bcol=seagreen]
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326
,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> last
>[/vbcol]|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
4326,[vbcol=seagreen]
is[vbcol=seagreen]
includes[vbcol=seagreen]
again[vbcol=seagreen]|||If you just want to make the database accessible (fail over), try executing
(as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...[v
bcol=seagreen]
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> 4326,
> is
> includes
> again
>[/vbcol]

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > How do I bring up the standby server online in sql2k by restoring the
last
> > log backup(backed up with noinit).
> > This log file has been restored with standby clause. can I restore again
> > with recovery?
> >
> > Thanks,
> >
> >
>|||Can you post that exact RESTORE command you are executing?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
>> Hi
>> Yes.
>> RESTORE <dbname> WITH RECOVERY
>> will bring the DB into a usable state.
>> --
>> --
>> Mike Epprecht, Microsoft SQL Server MVP
>> Zurich, Switzerland
>> IM: mike@.epprecht.net
>> MVP Program: http://www.microsoft.com/mvp
>> Blog: http://www.msmvps.com/epprecht/
>> "mecn" <mecn2002@.yahoo.com> wrote in message
>> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
>> > Hi,
>> >
>> > How do I bring up the standby server online in sql2k by restoring the
> last
>> > log backup(backed up with noinit).
>> > This log file has been restored with standby clause. can I restore again
>> > with recovery?
>> >
>> > Thanks,
>> >
>> >
>>
>|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> > Thanks,
> > But when I doing restore with recovery give me error says Server: Msg
4326,
> > Level 16, State 1, Line 11
> > The log in this backup set terminates at LSN 6791000023918900001, which
is
> > too early to apply to the database. A more recent log backup that
includes
> > LSN 6794000015810000001 can be restored.
> >
> > I don't know why?
> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> > news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> >> Hi
> >>
> >> Yes.
> >>
> >> RESTORE <dbname> WITH RECOVERY
> >> will bring the DB into a usable state.
> >>
> >> --
> >> --
> >> Mike Epprecht, Microsoft SQL Server MVP
> >> Zurich, Switzerland
> >>
> >> IM: mike@.epprecht.net
> >>
> >> MVP Program: http://www.microsoft.com/mvp
> >>
> >> Blog: http://www.msmvps.com/epprecht/
> >>
> >> "mecn" <mecn2002@.yahoo.com> wrote in message
> >> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> >> > Hi,
> >> >
> >> > How do I bring up the standby server online in sql2k by restoring the
> > last
> >> > log backup(backed up with noinit).
> >> > This log file has been restored with standby clause. can I restore
again
> >> > with recovery?
> >> >
> >> > Thanks,
> >> >
> >> >
> >>
> >>
> >
> >|||If you just want to make the database accessible (fail over), try executing (as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
>> Can you post that exact RESTORE command you are executing?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
>> > Thanks,
>> > But when I doing restore with recovery give me error says Server: Msg
> 4326,
>> > Level 16, State 1, Line 11
>> > The log in this backup set terminates at LSN 6791000023918900001, which
> is
>> > too early to apply to the database. A more recent log backup that
> includes
>> > LSN 6794000015810000001 can be restored.
>> >
>> > I don't know why?
>> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
>> > news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
>> >> Hi
>> >>
>> >> Yes.
>> >>
>> >> RESTORE <dbname> WITH RECOVERY
>> >> will bring the DB into a usable state.
>> >>
>> >> --
>> >> --
>> >> Mike Epprecht, Microsoft SQL Server MVP
>> >> Zurich, Switzerland
>> >>
>> >> IM: mike@.epprecht.net
>> >>
>> >> MVP Program: http://www.microsoft.com/mvp
>> >>
>> >> Blog: http://www.msmvps.com/epprecht/
>> >>
>> >> "mecn" <mecn2002@.yahoo.com> wrote in message
>> >> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
>> >> > Hi,
>> >> >
>> >> > How do I bring up the standby server online in sql2k by restoring the
>> > last
>> >> > log backup(backed up with noinit).
>> >> > This log file has been restored with standby clause. can I restore
> again
>> >> > with recovery?
>> >> >
>> >> > Thanks,
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>

Bring Online (Missing Transaction Log)

I cant bring my database online since the LDF is missing. However, the MDF
is fine. If I try to bring it online I get an error 5181 due to the missing
file.
Is there anyway to get the database going again without the transaction log?
Cheers,
elzikoHi,
Start the database in Emergency mode. So that Database will be started with
out transaction log. After that you can use DTS to transfer the data
and objects to a new database.
How to start the database in Emergency Mode:
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768
where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
Note:
Setting the database status to emergency mode tells SQL Server to skip
automatic recovery and
lets you access the data.
Thanks
Hari
MCDBA
"elziko" <elziko@.NOTSPAMMINGyahoo.co.uk> wrote in message
news:u6nrn1kEEHA.1368@.TK2MSFTNGP11.phx.gbl...
> I cant bring my database online since the LDF is missing. However, the MDF
> is fine. If I try to bring it online I get an error 5181 due to the
missing
> file.
> Is there anyway to get the database going again without the transaction
log?
> --
> Cheers,
> elziko
>

bring online - any restrictions?

Hiya,
Are there any conditions under which a database administrator is not able to
bring a database back online when it is (Suspect\offline)? The System Admin
istrator had no problem bringing it back online but the usual dba got a perm
issions error.
Thanks!I have had that occur a few times for no apparent reason. I think it is rela
ted to the reason that it went offline in the first place.|||Just verify that this dba has the necessary perimissions to this database.
If this dba is the dbo of the database or is a member of the sysadmin role
there should be no problem.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Bring Log File (LDF) Online

Hi,
I have a server with two separate paritions running SQL 2005. One partition
with the data (mdf) files failed entirely and all data was lost. The second
partition with the log (ldf) files remained entact.
One of the failed databases was restored from tape, but it's not recent
enough. I want to make the database "see" the log file. How can I make a
SQL database recongize a more recent log file?
Once the database/log file are both online, then I can hopefully analyze the
log file using third party tools (ie: Apex or Lumigent) to retrieve data.
Thanks in advance.Hi Dennis
You can't see the log as such, the restored database would have it's own log
file. If your database is in full recovery mode and you have log backups,
they could be rolled forward
http://msdn2.microsoft.com/en-us/library/ms189596.aspx although if you have
not backed up the tail log it will not be up to the point of failure
http://msdn2.microsoft.com/en-us/library/ms179314.aspx
John
"Dennis Grecu" <Dennis Grecu@.discussions.microsoft.com> wrote in message
news:728FC0C4-B069-40F6-A874-96265D0FF4FE@.microsoft.com...
> Hi,
> I have a server with two separate paritions running SQL 2005. One
> partition
> with the data (mdf) files failed entirely and all data was lost. The
> second
> partition with the log (ldf) files remained entact.
> One of the failed databases was restored from tape, but it's not recent
> enough. I want to make the database "see" the log file. How can I make a
> SQL database recongize a more recent log file?
> Once the database/log file are both online, then I can hopefully analyze
> the
> log file using third party tools (ie: Apex or Lumigent) to retrieve data.
> Thanks in advance.
>

Bring Log File (LDF) Online

Hi,
I have a server with two separate paritions running SQL 2005. One partition
with the data (mdf) files failed entirely and all data was lost. The second
partition with the log (ldf) files remained entact.
One of the failed databases was restored from tape, but it's not recent
enough. I want to make the database "see" the log file. How can I make a
SQL database recongize a more recent log file?
Once the database/log file are both online, then I can hopefully analyze the
log file using third party tools (ie: Apex or Lumigent) to retrieve data.
Thanks in advance.Hi Dennis
You can't see the log as such, the restored database would have it's own log
file. If your database is in full recovery mode and you have log backups,
they could be rolled forward
http://msdn2.microsoft.com/en-us/library/ms189596.aspx although if you have
not backed up the tail log it will not be up to the point of failure
http://msdn2.microsoft.com/en-us/library/ms179314.aspx
John
"Dennis Grecu" <Dennis Grecu@.discussions.microsoft.com> wrote in message
news:728FC0C4-B069-40F6-A874-96265D0FF4FE@.microsoft.com...
> Hi,
> I have a server with two separate paritions running SQL 2005. One
> partition
> with the data (mdf) files failed entirely and all data was lost. The
> second
> partition with the log (ldf) files remained entact.
> One of the failed databases was restored from tape, but it's not recent
> enough. I want to make the database "see" the log file. How can I make a
> SQL database recongize a more recent log file?
> Once the database/log file are both online, then I can hopefully analyze
> the
> log file using third party tools (ie: Apex or Lumigent) to retrieve data.
> Thanks in advance.
>

Bring db online/offline

Hello there,

I have a user who can bring offline a database but he cannot bring the
database back online.

The error which pops up is:

Error5011: User does not have permission to alter database dbname
ALTER DATABASE statement failed.
sp_dboption command failed.

Any ideas?

ThanksI would guess that only sysadmins can bring a database online, because
if the database is not readable, there's no way to know who has
db_owner permissions. This behaviour is documented for RESTORE - a
db_owner can backup a database but not restore it - and it seems likely
that the same logic applies in the case of ALTER DATABASE, even if it
isn't documented.

Depending on what you're trying to achieve, setting the database to
RESTRICTED_USER might be a possibility.

Simon

Bring Database Online/Offline

In SQL Server 2005, I tried to take a database offline by selecting "take offline." My computer had a problem during this now I get the following error...

ALTER DATABASE failed because a lock could not be placed on database 'CJISData'. Try again later.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5061)

I can't bring the database online or take it offline. I am not sure where to go from here. Any help will be appreciated. Thanks.

Bernie

Make sure you drop all connections on the database first or use the WITH ROLLBACK IMMEDIATE.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

Bring Database Online

Hi,

One of our database size 90 Gb was backed up and restored on a standyby server with NoRecovery option .A Stored Procedure was written to do production Database transaction log Backup every 15 min and restore the Tlog File on Standby server.

Once the last transaction log file is restored on standby server the tlog file is deleted.

Now due to some reason the restore tlog job failed but the tlog file got deleted.

Now till we will not restore the last database backup we will not be able to start the restore tlog job.

Now the database is in restoring mode.Is there any methord to get that database online without any transactionlog.

Regards

Sufian

Inorder to bring the db online try the following,

Restore database DBName with Recovery....just let me know if the db has come online.......

|||You could just bring it online, however, a better option may be to perform a differential backup and restore that backup with norecovery. This will include all of the transactions since the last backup, and should allow you to resume your trans log backups once it has been applied.
Tim

Bring database online

I have seen a db_option that would take the database offline , but how do
you bring it online again ?
Is offline similar to detaching the database ? Using SQL 2000
ThanksALTER DATABASE pubs SET OFFLINE
go
ALTER DATABASE pubs SET ONLINE
go
SQLVarad(MCDBA-1999,MCSE-1999)
>--Original Message--
>I have seen a db_option that would take the database
offline , but how do
>you bring it online again ?
>Is offline similar to detaching the database ? Using SQL
2000
>Thanks
>
>.
>|||SP_dboption is provided only for backward compatibility and this system
procedure may not be there in next version.
So as "Vyas" suggested you can use ALTER database command to set the
set/reset database options.
FYI, the command used to set the database online using db_option:-
sp_dboption <dbname>,'offline',false
Thanks
Hari
MCDBA
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:edPvvTWpDHA.372@.TK2MSFTNGP11.phx.gbl...
> I have seen a db_option that would take the database offline , but how do
> you bring it online again ?
> Is offline similar to detaching the database ? Using SQL 2000
> Thanks
>