Tag Info

Hot answers tagged

4

I asked for something built in back in 2007, but this was rejected for the 2008 release, and subsequently ignored. Feel free to vote and, more importantly, comment about your business need. In the meantime, for SQL Server 2005 and 2008, you should be able to pull this information from the default trace: DECLARE @FileName VARCHAR(MAX) SELECT @FileName = ...


4

There can be many things to address. Below is an outline of things to check before jumping on any conclusions : First, your sequence of POST restore steps will mess up all the work you did. Never shrink your database and that too especially after doing Index maintenance. Read up - Why you should not shrink your data files by Paul Randal. Below are my ...


3

You can't restore a 2008 backup on SQL Server 2005. Simply not possible. You'll need to either: (a) Restore it on 2008, then use Import/Export wizard, Generate Scripts Wizard, Copy Database Wizard, SSIS, 3rd party tools like SQL Compare, etc. to move the structure and data to the 2005 instance, or (b) Upgrade. Developer Edition is $50 or so.


3

Is there some table in MS SQL 2005 that tracks how much data has been imported or bytes sent and received? So I can try and monitor this or check how this is going? The simplest way to do this is the query the management views associated with the currently-executing request, the session, or the connection: sys.dm_exec_requests sys.dm_exec_sessions ...


3

Here's a query that should get you started on finding out the information you're looking for: select top 10 tsu.session_id, tsu.request_id, r.command, s.login_name, s.host_name, s.program_name, total_objects_alloc_page_count = tsu.user_objects_alloc_page_count + tsu.internal_objects_alloc_page_count, ...


2

You could probably have just set the database owner to [sa] (or any valid login really) rather than detach / re-attach. ALTER AUTHORIZATION ON DATABASE::dbname TO [sa]; This probably happened because the login responsible for creating, attaching or restoring the database initially no longer exists. The UI isn't smart enough to fail gracefully when there ...


2

The example below uses a CTE to find the gaps in your TimeScheduleId sequence. The field HasPreviousItem identifies if a row is the first in a sequence and RowNum is used to number all of the records. To find the start dates/times select for records where HasPreviousItem = 0. The Duration assumes that each record is a 15 minute block of time. The ...


2

What I usually do with our 15-minute log shipping secondary servers is just wait until the last log is copied over and restored. Then you can reboot the secondary server (assuming that by server you mean a separate physical server). As soon as the secondary comes back up, it will copy over the missing transaction log file and restore them. We restore our ...


1

It is certainly possible to use a Maintenance Plan to handle the fragmentation issues. However, many people use the free scripts at: http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html I am part of the 'many people'. These scripts by default implement the suggested standards for reducing the fragmentation of indexes. So, if you ...


1

If you really care to know which databases are in use, you have to use dmv's (log that data to a table as they get flushed out when server is restarted) or profiler (server side trace) and just filter out the logins and program names connecting to those databases. once you have that info for your complete business cycle, you will be able to figure out what ...



Only top voted, non community-wiki answers of a minimum length are eligible