Take Forever To Take Database Offline

Mar 5, 2007

Hi,

I try to restore a database but it pop error said "the database is in use". So, I try to take the database offline so that I can store the database. But it takes me forever (1 hour till now). It is still showing "1 remaining". Do you have any idea why ? Thank you very much in advance!

View 4 Replies


ADVERTISEMENT

Offline Command Hangs When I Try To Take Database Offline

Apr 10, 2007

Hi, I am relative newbie to SQLServer. When I try to take a user database offline, the query "hangs," with the query processing circle spinning. The Sharepoint 7 application is running on top of the Enterprise SQL Server 2005 db with several logins sleeping and awaiting commands. No errors are generated until I kill the offline command. Anyone have any ideas? Do I need to kill all the connections?

View 2 Replies View Related

Why Does 'alter Database NorthWind SET ENABLE_BROKER' Take Forever?

Feb 2, 2008

I am trying to execute the following query , in Management Studio. But it takes forever. Can someone tell me why is this happening? I am running the query in 'NorthWind' database.The windows account  under which I am logged into WinXP (windows authentication is enabled for the SQL Server database) is the database owner for NorthWind database.
alter database NorthWind SET ENABLE_BROKER

View 3 Replies View Related

Restore Database Problem - LOADING Forever

Sep 17, 2004

I had to restore a database late this afternoon. I have the database set to FULL recovery. Database backups are performed nightly and transaction log backups are performed every other hour. I decided to perform a point-in-time restore. When I restored this way everything seems to go ok and it finishes. Then the database is grayed and says "Loading". Although I tried 4 separate times, one time allowing over an hour, the grayed out database and "Loading" never goes away.

Freaking out I deleted the "Loading" database (didn't delete logs and backup files) and tried a manual restore from the previous night's backup file. It attached and restored properly and was ready to go in 2 minutes.

Of course I wanted to get the transaction log files restored too, since it had work from earlier today. So I tried another restore via point-in-time and got the same old messages. Currently, the database is running with the previous night's backup restored but the users aren't too keen on having to do 5 hours worth of work to catch up to the previous transaction log backup come Monday morning.

Any suggestions?

Thanks,
JB

View 2 Replies View Related

Database Offline

Jan 10, 2001

hi
i executed sp_dboption,'my_db','offline','true'
and my_db went offline ok but when i cheked in enterprise manager list of db's i found my_db marked as (suspect/offline), i refresh the window and a got the same result but wen i close the enterprise manager and open it again my_db was not in the list of db's.Now i want to bring back my_db to online by executing sp_dboption 'My_db','offline','false' i was not able to do this and the command exist with this error the database is not in the list use sp_helpdb.
Please can anyone help me on this
Best Regards
Mamzy

View 1 Replies View Related

Database Offline

Aug 28, 2002

I have a customer who's database was marked Suspect due to a drive failure that left a torn page. Before trying to reset the Suspect flag they took the database offline, and now we cannot get the database back online. Any ideas?

View 1 Replies View Related

Database Offline

Nov 27, 1998

Hi all,

We have a serious problem.
The database in SQL Server 6.5 is marked offline
and the error log displayed the following messages :
udopen : file 'F:Filename.DAT' is incorrect size (614400 bytes, should be 537600)

udactivate (primary) : failed to open device 'F:Filename.DAT' for vdn 131

The entries for the device exists in sysusages and sysdevices.

Anyone encountered this before?
Please help if you know how we can get the database online, again.

Many Thanks.

View 1 Replies View Related

Database Taken Offline

Feb 28, 2006

Over the weekend I had one of my databases taken offline. To my knowledge no one explicitly took this database offline. This isn't to say that someone did and is refusing to speak up. I'm just trying to find some answers.

I do know that our IT dept. did maintenance to a number of our servers and they swear nothing was done to this one. So my question is, "Is there any SQL process that can take a database offline."

I've checked the log files but there isn't anything that directly points to that database being taken offline.

Running Windows 2000 Advanced Server SP4, SQL 2000 SP3 on a NT INTEL X86 platform.

Any ideas or comments are appreciated!

View 9 Replies View Related

Database Offline

Mar 12, 2007

What exactly is database offline? I tried to google it but didn't get what I was looking for.

One of my environments has few users. They attach databases and run an application to produce the results. Sometimes they forget to detach databases after their use and these databases remain in SQL Server. Sometimes they leave the database to use it in future.

At the moment there are about 900 databases attached. I believe these attached databases are using the servers resources and therefore, decrease performance. Is this correct?

I was thinking to force the users to detach databases that they do not need and attach when they need. Then thought why shouldn't just set the database to offline and take it back online when they need. Does this increase performance? Does this save server's resources?

Thanks,

Canada DBA

View 1 Replies View Related

Offline|Online Database

Dec 21, 2005

Hi,

Is there any method to get an historical log where appears the database status (Online|offline) ?

Regards.

View 1 Replies View Related

Check SQL Database Offline

Jul 20, 2005

Hello,I am trying to check the integrity of SQL database. The 'problem' withSQL server is that it's fixing the DB automatically after restore so Ineed a way to do it offline, much like using eseutil on Exchangedatabases.Thanks in advance.

View 1 Replies View Related

Database Offline Errors

Oct 31, 2007

I currently have a very long script that I need to run on several servers through an SSIS package. The issue stems from servers that have one or two databases offline. This causes the script to fail. Is there an easy way to get the script to either run on offline databases or skip those that are offline? Thanks
-Kyle

View 5 Replies View Related

Copying Database Offline

May 19, 2008

I'm going overseas this summer with my laptop and I have to continue working on a project. Unfortunately that laptop only has Windows Vista Home Premium. I can't afford to get the upgrade but am in the position of having to copy a database from the server to my laptop so I can continue working on it. What I need to do is find a way to copy the database over but in the case where the two computers aren't connected over a network. Is this possible? I tried to simply copy the .mdb, but there were permissions errors (of course). Is there a way to do this? It's pretty important that I get it on the laptop one way or another. Thank you!

View 3 Replies View Related

Cannot Put Database In Offline Mode Because Lock Could Not Be Placed On Database

Sep 12, 2011

One annoying problem has occurred....I want to put database in offline mode....but it is giving me some error...

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

View 7 Replies View Related

Help - Script That Checks For OFFLINE Database

Sep 21, 2006

Hello ,

I have got a script which checks for the databases that are offline. and mails the dba when any of the database is offline.

When I schedule the job , for every hour , it gives me an blank mail only with the subject ' status of database on testsql' even though no databases are offline.

So how can I change the script , so that it mails the dba only when a database is offline even though its scheduled every hour or half an hour.

The script is:

Set NoCount on
DECLARE @dbname VARCHAR(100)
deCLARE @Status varchar(100)
Declare @Message VARCHAR(8000)
DECLARE @date varchar(100)
set @date = convert(varchar(100), getdate(),109)
set @Message = ''DECLARE dbname_cursor
CURSOR FOR SELECT [name], CONVERT(varchar(30),DATABASEPROPERTYEX(name,'Statu s'))
as [Status] FROM master..sysdatabases WHERE CONVERT(varchar(30),DATABASEPROPERTYEX(name,'Statu s')) = 'OFFLINE'
order by name
OPEN dbname_cursor
FETCH NEXT FROM dbname_cursor INTO @dbname, @Status
WHILE
@@FETCH_STATUS = 0
BEGIN select @message = @message + @@Servername + '-' + @dbname + ' - ' + @Status + Char(13)+ ‘- ‘ + @date
FETCH NEXT FROM dbname_cursor INTO @dbname, @Status
END
CLOSE dbname_cursor
DEALLOCATE dbname_cursor

print @message
EXEC master.dbo.xp_smtp_sendmail
@FROM = N'testsql2000@is.depaul.edu',
@TO = N'dvaddi@depaul.edu',
@server = N'smtp.depaul.edu',
@subject = N'Status of the Database on Testsqlserver!',
@type = N'text/html',
@message = @message


Thanks

View 8 Replies View Related

SQL 2012 :: Restore Database If It Is Offline

May 29, 2015

1.can we restore the db if it is offline?
2.restore information stores in table 'msdb..restorehistory' if we restore the db when the db is offline?

View 1 Replies View Related

Backup, Restore Database Online And Offline

Feb 13, 2004

Hi all,
I have an application running on internet, it uses SQL server datatase.
I have an question want to as: can i backup database and update database online or offline?
Thanks.
TungNT

View 1 Replies View Related

Backup Of Database Doesn't Take Source DB Offline

Jul 16, 2014

I'm using 2014 SE.I know a backup of a database doesn't take the source DB offline, but then I need to move this DB to another server (for intensive reporting work). At present we restore the DB, but that means putting the DB in single user mode, kicking everyone off, and completing the restore.

I see from 2014 EE notes that "online restore" is possible. EE is of course, mightily expensive.Or perhaps it's possible to configure things to speed up the restore process somehow, so there is less downtime?, the resource impact in creating the backup is quite high, perhaps there's a way to (apart from playing with backup compression) reduce the impact on the source server here?

View 8 Replies View Related

SP2 Maintenance Backup Fails On Offline Database.

May 29, 2007

I have a maintenance plan step to perform transaction log backups. There are a few databases that are offline. The backup seems to fail because it tries to backup the offline databases. The backup step is by itself as one of three subplans, although it also fails when it is the only step in a plan with only one subplan.

I have another server that is only on SP1 and it does not have problems handling the offline databases.

Is this an issue with SP2(9.0.3054)?

View 4 Replies View Related

DB Engine :: Cannot Put Database Offline Or In Multi User

Mar 22, 2012

I am trying to place a database offline.

When I right in Microsoft SQL Server Management Studio on the database > Take Offline

Set offline failed for Database 'OperationsManagerAC'.

Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 1205)

So I am trying with some queries to pass the database from Single user to multi user but it fails

USE [master]
GO
ALTER DATABASE OperationsManagerAC SET MULTI_USER GO
Msg 1205, Level 13, State 68, Line 1</p><p>Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.

I tried also

alter DATABASE OperationsManagerAC SET OFFLINE WITH ROLLBACK IMMEDIATE

IT FAILS AS WELL... with the same error... how to run the SQL Statements without using

How to proceed next?

View 12 Replies View Related

Does Offline Database Come Back Online When Server Is Restarted?

Jun 9, 2006

If you take a database offline to prevent users from accessing it, and then restart the server, will the database be back online when the server starts up?

If so, is there an option to prevent this from happening so that a database taken offline will remain offline until it is manually put online again by an administrator?

View 1 Replies View Related

MSDE Database Is Offline, How Do I Bring It Back Online?

Nov 29, 2007



Dear All,

One of my users created a MSDE database and did not realise that the limit is 2GB. I can not access the database. Is there anyway I can recover it?

They do not have a backup.

Could I create a new database in Standard Edition and then attach the Data and log files from the MSDE database?
Would that work?

View 4 Replies View Related

How To Backup Tr. Log When Database Is OFFLINE And Mdf File Is Remote My Mistake?

Sep 21, 2006

I €˜d like to discus with you the following REAL enough disaster scenario:
1. The TEST database is in the FULL backup mode.
2. WE have a full TEST DB backup and all tr. log backups.
3. DBA moved TEST database OFFLINE for maintenance operations.
4. MDF file for TEST DB was removed by mistake.
5. TRANSACTION LOG (LDF) file is OK.
6. DBA want to recover database to the point of failure.
According with MS SQL Server 2000 documentation it is possible.
We need to backup the transaction log , BUT I CANNOT DO THIS.
PLEASE, HELP.
In the same time, I can make LDF backup and recover database to the point of failure, if database is online and I stop/start SQL Server to remove MDF file.

View 4 Replies View Related

How Do I Make An MSSQL 2000 Server Database Go Offline/Online Using VB 6

Jun 21, 2001

Does anyone know how to do this? I am in the middle of writing a server side program, and this is one thing that I cannot do without.

Also, if anyone can answer that, how do I do the same with an Exchange 5.5 Email account?

Thanks ahead of time!
Cash Coleman

View 1 Replies View Related

SQL 2012 :: Does Setting A Database Offline Free Up Resources On The Server

Jun 25, 2015

I have about 50 databases that are only accessed once a month and on a predictable schedule. Would it free up resources on the server if they were kept offline and brought online only when needed ?

View 8 Replies View Related

Default Database Brought Offline SQL Server Agent Job Fails!!!

Apr 5, 2007

Hi All,

There is this SQL Server agent job that was calling a SSIS package (uses windows authentication) which was executing fine till the default database for the user was brought ofline, and now the job fails citing authentication failure for the user as the reason.

I have tried pointing master as the Default database for the user and now able to connect to SSMS using the users authentication, but the SQL Agent job wont succeed.

Any pointers ?

View 3 Replies View Related

Can Profiler Run Forever?

Jan 9, 2008

I created a profiler to run on a remote server in local. Then I logout. After two hours, I login again. The profiler was closed. I don't know when and why. Did someone have same problem? Is this normal?

Thanks

ZYT

View 8 Replies View Related

SQL Query Taking Forever

Mar 1, 2006

I have the below query which returns thousands of records. can I optimize the returned result set faster without changing the structure of the database?
SELECT     dbo.tblComponent.ComponentID, dbo.tblComponent.ComponentName, dbo.tblErrorLog.ShortErrorMessage, dbo.tblErrorLog.LongErrorMessage,                       dbo.tblErrorLog.LogDate, dbo.tblErrorLevel.Description,dbo.tblErrorLog.ErrorLogIDFROM         dbo.tblErrorLevel INNER JOIN                      dbo.tblErrorLog ON dbo.tblErrorLevel.ErrorLevelID = dbo.tblErrorLog.ErrorLevelID INNER JOIN                      dbo.tblComponent ON dbo.tblErrorLog.ComponentID = dbo.tblComponent.ComponentID
Thanks.

View 2 Replies View Related

Sysprocesses Says: Wait Forever

Sep 30, 2004

I'm doing an update on a table with about 113m rows, the update-statement is fairly simple: update tab set col = null where col is not null.
The col column is mostly null.

Sysprocesses shows three rows for this statement: 1 CXPACKET (its a dual processor, 2000 box with sp3 installed), 2 PAGEIOLATCH_SH (waitresource is filled). My guess would be that the where-clause is executed in a seperate process blocking the update.

I changed the statement into update [...] set col = null; sysprocesses shows one row with PAGEIOLATCH_SH. Executing forever.

I checked other processes including those outside sqlserver but none are using the db, let alone accessing the table involved. Even restarted sqlserver to be sure there's no dead process blocking the update. Didn't help.

So I added a search condition to the where-clause, involving a clustered index in order to reduce the rowcount. The execution plan shows a 97% hit on the clustered index, but sysprocesses shows the three rows again...

So far the profiler didn't help me out either: there's a SP: CacheInsert on the update-statement... then nothing.

What should I do?

View 6 Replies View Related

SQL Server Job Running Forever

Dec 9, 2004

I have a job that is running for 2 days straight and the status reads: Performing Completion action.

I have tried to disable/Stop the job, but can't.

I have also tried to start the job which it won't because it is still running.

Is there a table that I can manual delete the schedule # or something along those lines to start all over again.

Thanks

Oh the normal time for the job to run is only 7 seconds.

Lystra

View 2 Replies View Related

Shrinkdatabase Taking Forever...

Mar 17, 2008

Hi all,

2 weeks ago I deleted about 200GB of data from a 300GB+ database. It's a custom DB we want to use to test few things. We wanted a smaller size DB for our testing and since we didn't have any we grabbed a production backup, removed sensitive data and ran a large archiving script on it... Anyway so far so good but our data file was still the same size as before.

So we started a shrinkdatabase... it has been running for 2 weeks now! After about 1 week I interrupted the shrinkdatabase process and ran a
dbcc shrinkdatabase('DB', truncateonly)
just to see if the data file will get reduced a bit or not. It did get reduced by about 20GB. I assume that
dbcc shrinkdatabase('DB', 0)
has free up enough pages at the end of the data file so a truncateonly was able to free up some space... Anyway after this we started the
dbcc shrinkdatabase('DB', truncateonly)
again... still running...

The database was never shrank before and every index is highly fragmented... Is that why it's taking so long? Am I actually going to have to wait for another few weeks before that thing finishes??

Anyone has experience running shrink on large DBs?


thanks!

View 14 Replies View Related

Cte Query Taking Forever

May 14, 2008

I have following common table expression query which is taking like 15 hours to run. would someone suggest what can I do to speed this thing up..

; with
a as (select proj_id, proj_start_dt,proj_end_dt, case when charindex('.', Proj_ID) > 0 then left(Proj_ID, len(Proj_ID) - charindex('.', reverse(Proj_ID))) end as Parent_Proj_ID from ods32.dbo.Proj a), --add Parent_Proj_ID column
b as (select proj_id, proj_start_dt,proj_end_dt,Parent_Proj_ID from a where PROJ_START_DT is not null and PROJ_END_DT is not null --get all valid rows
union all
select a.Proj_Id, b.PROJ_START_DT, b.PROJ_END_DT, a.Parent_Proj_ID from b inner join a on b.Proj_Id = a.Parent_Proj_ID where a.PROJ_START_DT is null or a.PROJ_END_DT is null) --get all invalid children of valid rows and give them the dates of their parents
update a set PROJ_START_DT = b.PROJ_START_DT, PROJ_END_DT = b.PROJ_END_DT
from WPData a left outer join b on a.Proj_ID = b.Proj_ID -- join up and update



thanks

View 8 Replies View Related

Help A Newbie And Live Forever... Maybe

Feb 22, 2006

Hi, sorry if this has been asked before but I'm pretty strapped for time...

I have two tables: [photos] and [photoFolders]

[photoFolders] contains information about photo albums on the site im creating. The information in [photos] lists information about all photos along with which [photoFolder] they belong. When the user logs in, I want to present a list of all 'folders' in their name along with the TOP image with the corresponding folderId...

[photos]
photoId
photoName
folderId
photoDescription
cUserId

[photoFolders]
folderId
folderName
eventDate
cUserId

Any help would be GREATLY appreciated

We're all going to hell... I guess I'll see you there!

View 15 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved