Tag Info

Hot answers tagged

4

Yes you would: The original source database is overwritten by the reverted database, so any updates to the database since the snapshot's creation are lost. and The metadata of a reverted database is the same as the metadata at the time of the snapshot. Quotes from Revert a Database to a Database Snapshot in the MSDN Library.


3

There is no Run As proxy for T-SQL Job steps in SQL Server Agent. You could upvote this with the chance that one day it will be filled: https://connect.microsoft.com/SQLServer/feedback/details/632955/enable-sql-agent-proxies-to-run-t-sql-job-steps The current way to get a T-SQL command to run with a proxy is to run it as an Operating System Command ...


3

Does the ALTER DATABASE XYZ SET RECOVERY FULL imply that you are normally running in SIMPLE recovery model? If so, the logs from the SIMPLE mode period are discarded once they are no longer needed. There is no time machine to go back and recover the logs that were not saved. So, to interpret your script: ALTER DATABASE XYZ SET RECOVERY FULL; -- Begin ...


2

If your DBs reside on a SAN or other shared storage that platform may have logs you can reference. For local storage I know of nothing held by default. A couple of years ago we started tracking DB size and disk free/used space. It has proved very valuable. A couple of Powershell scripts, a scheduled task and a small table has helped us avoid several ...


2

You don't need to change database to Full recovery or backup and restore the transaction log for the scenario you are describing. If your database is always in Simple recovery then the transaction log is "cleared" as soon as a transaction is complete. Your transaction log on production is 7GB because at one time you had a transaction that used 7GB of ...


1

Further to Sporri's answer - you can check this if you are using SSMS. To view a database snapshot on a server: In Object Explorer, connect to the instance of the Microsoft SQL Server >Database Engine and then expand that instance. Expand Databases. Expand Database Snapshots, and select the snapshot you want to view. When you do this, ...


1

There can be several causes for this error: The backup is corrupted as it has not been transferred in binary mode If you are using FTP to transfer the backup, make sure the file is transferred in binary mode The version of your backup is different than the SQL Server instance you are trying to restore it to. You can try to restore to a SQL server instance ...


1

Put EXECUTE AS ... at the start of your script, to impersonate the appropriate login.


1

So if I understand correctly, you want the latest status and be able to filter on it. I don't know what version of SQL Server you're using but APPLY has been out since 2005 so try this out: SELECT DISTINCT TagNo, TruckNo, CA.VerifiedDateTime, CA.Status FROM yourTable A CROSS APPLY ( SELECT TOP 1 VerifiedDateTime,Status ...


1

Have you tried running a full backup followed by another transaction log backup? What error messages are you getting? We know the logs backup fails, but if it's in simple recovery mode and the database is backed up but the log back up fails would I be able to recover the database? By recover lets get this straight, I'm talking about getting the ...


1

A two-tier fact table is usually more trouble than it's worth. That's your OLTP instinct to normalize kicking in - fight it! It took me several months to get my head around the warehouse/star schema paradigm. All that invoice header information can be tucked into a couple of extra dimensions. This will just add a couple of INT columns to your fact table, ...



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