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
ADVERTISEMENT
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
Jul 11, 2014
Having just archived quite a bit of data from the main Production DB, I now have around 15% free, reclaimable space sat in the data file.
I'm reluctant to run DBCC SHRINKFILE as that apparently causes a lot of Index fragmentation which will cause issues for performance - how else can the space be allocated back to the OS?
View 4 Replies
View Related
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
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
Oct 30, 2015
I have a set of data spread across a number of tables regarding stock market data. An example of this follows:
Market Capitalization...
Date CompA CompB
01/01/11 100 5
02/01/11 102 4
Share Price....
Date CompA CompB
01/01/11 100 100
02/01/11 101 99
Event Data...
Date Company
01/01/11 CompA
02/01/11 CompB
Pretty simply, I need a way to retrieve the market capitalisation and share price data based on the event data. So for instance I say 'oh, there is an event on the 01/01/11 involving company A, the market capitalisation on this day was 100, then for the next event it was 4 for company B.
I can also transpose the data so that the company name is in the rows and the dates in the columns for the market cap and share price tables, but this leads to the issue that when I try and get the data, I don't know how to query the correct company for that date.
For instance:
SELECT Event.Date, Event.Company
FROM Event
how do I now say.....
SELECT MarketCapitalisation.Column
WHERE Column = Event.Company
AND MarketCapitalisation.Date = Event.Date.
I have played around with a few basic joins, but I am having issue with the principle of that second to last line of SQL (so only getting the correct column).
I still have a copy of the data in excel so can flip things around as needed, but that would only mean that I would have the issue of WHERE Column = Event.Date instead of Event.Company.
View 1 Replies
View Related
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
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
Nov 4, 2006
Dear friends
I need to report the amount of free space in each datafile of a database.
I have tried sys.dm_db_file_space_usage , but the documentation says that it only works for the TempDB.
Please help.
Regards
Parviz
View 5 Replies
View Related
Jun 23, 2015
i am setting up a process for the dataload, external windows service insert a record to dbo.dataload table with a status as 'Ready'
create table dbo.dataload
(Xmlcol xml
,Loadstatus varchar(15)
,Starttime datetime
,completedtime datetime)
now i use a SQL job to check the status column, pick xml and load to appropriate tables. instead of SQL job can i use a trigger whenever there is a insert it fires sp to load data would there be any disadvantage.
View 5 Replies
View Related
Aug 13, 2014
I have a tempdb split into 4 files (5 if you include the log).
Autogrowth is disabled on the mdf/ndf files so that they can be used round robin (1 file per logical CPU).
Is there a way to be alerted when there is x% of free space left?
I know hwo to check the free space via t-sql but want to be able to be alerted. I could run a sql job that reports the free space and send a database mail message if under x% but wondered if there was a built in (or better) method?
I also have SQL Sentry.
SQL 2012 Standard
View 9 Replies
View Related
Feb 12, 2015
What is the use of running DBCC FREESESSIONCACHE.
How frequently can we do this on all the databases.
What happens if we schedule to run it every 1min.
Are there any advantages/disadvantages of running this on all databases.
View 5 Replies
View Related
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
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
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
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
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
Jul 9, 2015
I am facing a strange problem in executing stored procedure. Basically my sproc will take a values from Java application and create a Insert statement. see stored procedure below.Just to give some more background- I am re writing the procedure which was written in oracle already.
Problem I am facing now is with the statement below . When I execute the procedure for first time it works fine however when I execute for second time onwards it is setting to empty. Not sure what is the problem with my declaration and setting up with values. For reference I have pasted my complete stored procedure code below.
select @L_STMT= 'INSERT INTO '+ @l_table_name + '(' + LTRIM(RTRIM((substring (@L_INS_STMT,2,len(@L_INS_STMT))))) + ') VALUES (' + LTRIM(RTRIM((substring (@L_INS_STMT1,2,len(@L_INS_STMT1))))) +')';
ALTER PROCEDURE [dbo].[PKG_OBJ_API$CREATE_OBJ]
(
@P_TYPE VARCHAR(4000),
@P_SCOPE VARCHAR(4000),
@Arrlist varchar(max),
[code]....
View 3 Replies
View Related
Aug 13, 2014
Recently maintenance was done removing some tables from the original filegroup in one drive of our SQL Server 2012 Standard Edition 64bits to another created on a separate physical drive. I was expecting the full amount of data moved to the secondary filegroup to show up as unused on the primary filegroup but that doesn't seem to be the case. Do I have to do anything after the move to release that space, not to disk, but to the database as unused?
View 2 Replies
View Related
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
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
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
View Related
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
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
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
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
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
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
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
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
Feb 4, 2008
Hi all
Iam working in Prodcution ENV,Please help how make space
The log file for database 'Home_alone' is full. Back up the transaction log for the database to free up some log space.
View 10 Replies
View Related
Feb 23, 1999
Hi,
There has been a lot of discussion about moving single databases or devices in same server. Can someone suggest the most simplest method to set up a identical server with all the logins, permissions and password etc?
Building a new server with sp_help_revdatabase and dumps/loads is relatively easy but moving the master is confusing to me. I should run the new server and databases for a little testing period (with diffrent server name, of course) and then go live by dropping the old and by adding the new. I remember someone said that this would be as easy as copying master.dat to new machine (when servers are identical), any experience or other suggestions?
TIA,
Al
View 2 Replies
View Related
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