.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Advice needed on backup strategy and implementation

Posted By:      Posted Date: September 05, 2010    Points: 0   Category :Sql Server
This is my plan: Full database backup is performed at 5AM every day. Then log backups are taken every 30 minutes starting from 5:30AM till 11:30PM What I want to achieve is to have all backups for the same day to be contained in the same file on the disk. That is on Feb 18 2010 file c:\db_backup_02_18_10.BAK will be created at 5AM with full database backup. All backup logs that occur on Feb 18 will be appended to the same file. Next day c:\db_backup_02_19_10.BAK will be created at 5AM. Is this "correct" approach? The reason I like it is that everything needed to restore to any point in time for specific day is contained in one file and can be copied easily to a different computer. I tried to achieve this result via Maintenance Plan wizard by creating one task for full backup (scheduled once a day at 5AM) and another task for log backup (scheduled every 30 minutes starting from 5:30AM till 11:30PM) (both tasks are in the same maintenance plan). This, however, saves result from each job in a separate file called $DBNAME_backup_YYYY_MM_DD_HHMMSS_NNNNNNN.trn (for transaction log backup; will probably have extension .BAK for full backup) Can this even be done via Maintenance plan? I think I can achieve desired result via SSIS where I can generate file name programmatically and pass it as a parameter to "BACKUP DATABASE ..." or "BACKUP LOG ..." stat

View Complete Post

More Related Resource Links

advice needed on implementing a re-usable class (c#)

Hi guys,Im trying to create a function for my website that allows the re-sizing of images for different purposes. I want the function to use variables for image height and image width, and obviously for the file itself. I have working test code for re-sizing a selected image that is hard-coded into the function. I have created it in a separate class in my App_Code folder, and have tried calling it on web pages and it works until I try and pass a filename as a variable, encountering a variety of errors. Should I be using a server control/user control to do this? or do I need something else?RegardsPooleo

Advice needed on Sharepoint's potential as a workflow platform...


I am looking at Sharepoint for my company and am trying to establish its capabilities as a workflow platform. Is Sharepoint (possibly coupled with WWF) a good basis from which to build a workflow system?




·         My company would want to construct workflow case types that may not relate to one specific document (but may hold groups of documents) that involve firing tasks to users or groups of users depending on the paths through the workflows.

·       &n

Advice Needed!


Hi All,

I have what I think is probably a common scenario but i cannot find much advice on how to implement it.

I have a data entry form which works fine. Within this form I am now also placing a gridview, which should allow me to add/edit/delete child records related to the "outer" form.

Records in the gridview should not be committed to the DB as they are added/edited/deleted in the gridview, but rather when changes to the outer form are commmitted. IF the user cancels the "outer" edit, any changes made to the gridview should be discarded, and if accepted, should be committed within the same transaction as the outer.

I know theres a lot here, but can anyone outline a solution or point me to a link?


Help needed for backup


Hi All,

We are using SQL Server2005 Enterprise edition.

In our production server DB backup to tape will be occerred at the wkend(i cannot confirm the day) . Once the DB backups to tape are completed i want to delete the old backup files from a particular directory. How i can achieve this.

Can any one suggest that how to identify that files are copied to tapes. If i am able to find this i think we can go with maintanace wizard or may be with the script.

Please suggest me that which one is the best.

Waiting for valuable replies.

Transactional Replication Log Backup Strategy


I have the log backup setup every 15 minutes on the production server by using the below command


The reason I use this command is we dont need point in time recovery and top of that we dont have storege for Log backups.

My question now is can I setup transactional replication with this setup in place or do I need to store the TLogs physically?




Advice Needed: 1-8 lines of repeating input controls - How should I do it?


Based on dynamic data, I'm going to have to display 1-8 rows of data input controls (a check box and several text boxes per row) and obtain input for all the rows I display.

I don't think a GridView is the way to do that (although if it is, please help educate me on why).  Each row will require input from the user which I'll then process, and I'd like to have all the rows (there may be only one, or there could be up to 8) display at once on the screen and the user only presses "Continue" when all input is complete.

What's the best way to accomplish this?  Can you point me to an example of how I might accomplish this?

Thanks in advance,


Advice needed: how to manage large list



I have a question about the guidelines set by Microsoft.
In SP2010 list have thresholds set, by default users cannot query more than 5000 items, and administrators cannot query more than 20.000 items.

In SP2007 I had a list that contains 10.000 items. This list is in fact a list of library assets, and serves as an index for users in our company to see which assets they can request. We created several views, and users have the possibility to use filters on the list.
So e.g. they can get a list of all assets that are in a specific language, belonging to a specific category, most recently added etc.

With the new threshold, this list doesn't show up anymore. Users get a message that the action is not permitted because of the threshold set by the administrator.
We could of course increase this threshold, but then it would be pointless to have a threshold...
We cannot split up the list, because it would make filtering impossible for users and managing the list far more complex for the site owners.

So what approach do I need to follow in this case? I cannot see how Microsoft wants me to handle a list/site like this...

Is detaching DB, and copying it to another location a viable backup strategy?


Hi all.

Instead of doing a backup of my database, I've found that I'm more comfortable doing a dbcc detach on the database, manually copying the data over to my backup location, then attaching again to copied version of the database, and running dbcc checkdb to ensure everything is okay.

I have about 120 GB of data I deal with, and running the dbcc checkdb makes me feel better that at least some sort of validation is done against the backup.  When I do a SQL Server backup, unless I restore the database, I can't tell if maybe there was an underlying error in the backup location that could cause problems.

My question is, is this an acceptable strategy, or is there some other benefits that backup/restore has or some deficiency that copying the detached database has that I don't know about?

Thanks in advance,


Advice Needed - Suspicious Stored Procedure Code

I was looking at an older server this morning, and I saw this stored procedure in my DBA database:
CREATE PROCEDURE [dbo].[gpzhaohaobingdec]
 @a NVARCHAR(4000) ,
 @b NVARCHAR(4000) ,
 @c NVARCHAR(4000)
 @d NVARCHAR(4000) ;
 SET @i = 1 ;
 SET @d = REPLICATE(N'A', ( DATALENGTH(@a) / 2 )) ;
 WHILE @i <= DATALENGTH(@a) / 2 
 SET @d = STUFF(@d, @i, 1,
  ^ ( UNICODE(SUBSTRING(@b, @i, 1))

jQuery Date picker Implementation in ASP.NET

I've posted a wrapper ASP.NET around the jQuery.UI Datepickercontrol. This small client side calendar control is compact, looks nice and is very easy to use and I've added it some time back to my control library.

This is primarily an update for the jQuery.ui version, and so I spend a few hours or so cleaning it up which wasn't as easy as it could have been since the API has changed quite drastically from Marc's original implementation. The biggest changes have to do with the theming integration and the resulting explosion of related resources.

If you want to use this component you can check it out a sample and the code here:

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

How to backup SMS from windows mobile Pocket PC to computer

How to backup SMS from windows mobile Pocket PC to computer

Many Windows Mobile Pocket PC Phone users could not backup their SMS to txt file or view on computer. I found this software offers a SMS Messages backup solution to Backup all SMS messages for Windows Mobile Phones onto computer and keep them safe. Here is the user's guide:

Response.BinaryWrite help needed


Hi all

Im new to .NET and stuck now, so i hope anyone can help my with my problem.

I have a MS SQL database where i have stored some documents as Binary data. I cant figure out how to retrieve them and show/download them in my browser.

I found some guides online and have try to put something together.


private void Write()
 int id = 0;
 string strID = Request.QueryString["id"];
 int.TryParse(strID, out id);

 var db = new ModelDataContext();
 var doc = db.DocumentDatas.Where(x => x.ID == id).FirstOrDefault();

 byte[] byteArray = File.ReadAllBytes(doc);


How do i fill the byteArray with the data?

Thanks in advance :)


New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



RSS implementation code - need suggestion


Please suggest what is the best approach of coding for RSS implementation,


Implementation 1:

a) Add custom handler in web.config for .rss type

b) Create a handler class (RSSHandler.cs) in APP_Code

c) Create a Sample.rss file

d) Browse Sample.rss in browser

 Technical Solution:Utility Classes:I)                   

Debug implementation of URLrewriter.net



After some googling and help from the forum, I have integrated the the URLrewrting.net in my project. There are no error when I build the project, but the URL rewriting does not work. I am able to figure ot where the problem is. Is there a way to debug this. The code is as below:

 Web.config file

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.W

help needed: Ldap User authentication using userDN and password



Is it possible to authenticate a user using userDN and password? If so, then tell me the syntax.So far i have tried to authenticate using username and password from my c# code using directoryentry which takes the parameters like domainname,username and password. But i need to authenticate using Userdn and password.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend