You are on page 1of 5

Microsoft SQL Server: Logshipping

Page 1 of 5




Next Blog»

Create Blog

Sign In

Microsoft SQL Server
About SQL Server
Showing posts with label Logshipping. Show all posts
Wednesday, May 30, 2012

Welcome This blog is a diary, which helps me as well as others while surfing about SQL Server. Some articles are written by me some were taken as reference from others websites.

Tail Log Backups in SQL Server
What is Tail-Log Backup?

A tail-log backup captures the log records that have not been backed up since the recent last log backup to current point in time before restore. Generally we generate a tail log to make database into NoRecovery mode (Inaccessible). The tail log backup can be generated from FULL / BULK-LOGGED Recovery model databases. Unlike other log backups, this tail log backup can be generated even if database is damaged. The tail log backup is also generated using backup log command only with two options a) NoRecovery and b) continue_after_error

Search This Blog

Blog Archive
NoRecovery – We need to use this option when database is online, After issuing this command it ensures Database is not changed after tail-log backup, it makes database in restoring state, if database is in restoring state, users requests will not processed. Backup log database_name to disk =’path of tlog file’ with norecovery No_Truncate / Continue_after_error – Using one of this options we can generate a tail-log backup on a damaged database. a) Create a database and table in it b) Insert few records into the table c) Offline the database and rename data file d) Try to bring the database online, it wont allow because, it wont find the data file At that time we can use the below command to generate tail log file from a damaged database. Backup log damaged_dbname to disk=’path of tlog file’ with no_truncate Using No_Truncate option, the current active transaction log can be backedup when the data files are inaccessible or damaged or missing and log file is undamaged. Backup log damaged_dbname to disk=’path of tlog file’ with continue_after_error Posted by Kalyan Akula at 5/30/2012 09:02:00 AM
Recommend this on Google

► 2010 (34) ▼ 2012 (170) ► March (17) ► April (29) ▼ May (25) Moving System Databases What is SQL Azure? Xlib: connect to ":0.0" refused by server not able... Installating 32bit SQL Server on Windows 64bit Mac... SQL Server 2012 Startup Parameters Contained Databases - SQL Server 2012 Backup / Restore Progress Paging Option in SQL Server 2012 Fix - The login is from an untrusted domain and ca... Attach Adventure Works Sample Databases SQL 2008, ... Saving Changes is not permitted, the changed you h... SQL Server 2012 : Choose Function, IIF Function SQL Server 2012 : Format, Concat Function HEAP Table / Clustered Table Msg 3723, Level 16, State 5, Line 1 An explicit DR...

No comments:

Labels: Logshipping Reactions:

Saturday, May 26, 2012

What is Server Core Moving Tables Between File Groups FileStream In SQL Server 2008 Script to display indexes

Logshipping Tables
The below are few tables provides the essential information about the logshipping databases. For more information Browse BOL for "Log Shipping Tables and Stored Procedures" All these tables are stored in MSDB database. log_shipping_primary_databases -- Displays configuration information for primary databases on the server.

Logshipping Tables BCP Examples Memory Management Full Text Index in SQL Server

log_shipping_primary_secondaries -- Displays mapping information between primary databases to secondary databases. log_shipping_secondary -- Displays secondary server database details along with Primary server database information. log_shipping_secondary_databases -- Displays configuration information for secondary databases on the server.(Run command from Logshipping Secondary Server)

Tail Log Backups in SQL Server SQLCMD Mode in Query Editor (!! for SQL CMD) ► June (19) ► July (16) ► August (15)


ndf'.. State: 1 LogShipping The log shipping primary database %s. It is being used by database 'PrimaryDB'. backup destination directory etc.ndf'. Steps 1) I created two databases called PrimaryDB and Secondary DB 2) Configured Logshipping between primarydb and secondarydb (Secondary in Readonly Mode) 3) Ensure Logshipping is configured and running smooth between the servers 4) Stop the logshipping and disable logshipping jobs 5) Add data file (ndf) to primaryDB 6) Run the LSBackup manually 7) Run the copy job manually (ensure the file copied to target server) 8) Run the below command to verify whether this trn file consists additional data file or not Restore filelistonly from disk='C:\temp\PrimaryDBLogs\PrimaryDB_20120419115948. This message generally occured when the differnce between t-log backup and the current time on the monitor server is the greater than the time is set for backup threshold. June 1.sysfiles 11) Enable the backup.trn' to secondary database 'SecondaryDB'.MSSQLSERVER\MSSQL\Backup\ROLLBACK_UNDO_SecondaryDB.MSSQLSERVER\MSSQL\DATA\Secondary_File. Severity: 16. And this message mostly occur when monitor server is configured. April 24. Posted by Kalyan Kumar at 5/26/2012 09:02:00 AM Recommend this on Google ► September (7) ► October (20) ► November (11) ► December (11) ► 2013 (20) No comments: Labels: Logshipping Reactions: Labels Tuesday. 2012 Excel VBA (8) Interview Questions (4) Logshipping (4) Misc (3) MySQL (1) Oracle (2) Adding File To Logshipping Database -.blogspot. Check agent log and log shipping monitor information. Disclaimer Translate Select Language Powered by This is my personal blog.ndf' cannot be 3/23/2013 . WorkAround 1. the views and opinions are published here are my own. 2010 Error: 14420.(Microsoft. All data and information provided on this site is for informational purposes only.SqlServer. SQL Express (2) SQL Queries (15) SQL Security (4) SQLServer 2012 (9) SSIS (5) TempDB (1) Triggers (4) Blogs I Follow SureshGandhi Another good blog: Iordon Iotzov’s 2 days ago Live Feed Oracle Learnings Trainings Online 5 months ago Followers Posted by Kalyan Akula at 4/24/2012 10:00:00 AM Recommend this on Google No comments: Labels: Logshipping Reactions: Tuesday. copy and restore jobs. in that case the logshipping will fail from that point onwards.BAK' 10) Verify file added or not using the below command select * from secondaryDb. * Error: Could not apply log backup file 'C:\Temp\PrimaryDBLogs\PrimaryDB_20120419115948.. We will receive the below error message.MSSQLSERVER\MSSQL\DATA\Secondary_File2.Error: Could not apply log backup file Sometimes due to disk space issue or with some other issue.%s has backup threshold of %d minutes and has not performed a backup log operation for %d minutes. last backup file.Management.trn' 9) Run the below restore command to add the data file to secondaryDb on target server Use Master RESTORE log [SecondaryDB] FROM Disk='C:\temp\PrimaryDBLogs\PrimaryDB_20120419115948. Use WITH MOVE to identify a valid location for the file. File 'Secondary_File' cannot be restored to 'C:\Appl\MSSQL\MSSQL10_50 . The Message 14420 does not necessarly indicate a problm with logshipping. backup source directory.MSSQLSERVER\MSSQL\DATA\Secondary_File.Microsoft SQL Server: Logshipping Page 2 of 5 Using the above logshipping tables we can get the last restored log file. The views and opinions expressed here are of my  Translate Popular Posts Shrink TempDB Data File Without SQL Restart http://calyansql. STANDBY = N'C:\Appl\MSSQL\MSSQL10_50 . we may need to add additional file to logshipping primary database.trn' WITH MOVE 'Secondary_File' TO 'C:\Appl\MSSQL\MSSQL10_50. 14421. last copied file.LogShipping) *** Partitioning (1) SQL Azure (1) Error: The file 'C:\Appl\MSSQL\MSSQL10_50.

First verify the space usage information.Examples sqlcmd Switches -S >> ServerName -D >> DatabaseName -U >> UserName -P >> Password Q >> Query -o >>.. The date and time of monitor server is different from the date and time of primary server.Microsoft SQL Server: Logshipping Page 3 of 5 2. The logshipping copy job is run on the primary server and may not update the entry in the msdb database at monitor server in the log_shipping_primaries table... Error: 15150) Some times we may get the below error while updating the login from dbo to some other login from user mapping window. While following any advices from blog if you encountered any issues. Restored latency is %d minutes. Insert Images into database using T-SQL The following are the rowset functions available with us to query values from different types of sources. This may occur restore job on the secondary server is failing. (Microsoft SQL Server.%s has restore threshold of %d minutes and is out of 3/23/2013 . SQLCMD . 1.. Posted by Kalyan Akula at 6/01/2010 10:22:00 PM Recommend this on Google own and not those of the people or organizations that I may or may not be related with. Contributors Kalyan Akula Kalyan Kumar No comments: Links to this post Labels: Logshipping Reactions: Home Older Posts Total Pageviews Powered by Blogger. We can shrink the tempdb data file without restarting the SQL Server using the following steps. author is not responsible for that. The code / scripts or any kind of stuff published in this blog are not permitted or certified by my employer or Microsoft SQL Server. 5.. 2. Ensure the transaction log backup happend on the primary server. 3. I have database .blogspot. 1.. You may set incorrect value for the backup alert... OPENQUERY 2. The message doesn't necessarly indicate a problm with logshipping. Check agent log and logshipping monitor information. http://calyansql. If the t-log backup fails then also above error will occur. 1. OPENROWSET 3. 14421 Error : The log shipping secondary database %s. You may set out of sync alert is wrong. 4.. No restore was performed for %d minutes. Cannot alter the user 'dbo'.

Microsoft SQL Server: Logshipping Page 4 of 5 3/23/2013 .

blogspot.Microsoft SQL Server: Logshipping Page 5 of 5 3/23/2013 .