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

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

Help! "You must rerun snapshot because current snapshot files are obsolete" every 90 minutes!

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
I'm having difficulty with SQL Server replication getting machines in the field to replicate correctly.   Here are the specifics of my installation:   100 remote tablet PCs using web sync to update. 1/2 running Vista, 1/2 XP (all latest updates applied) SQL Server Express 2005SP2 w/ cumulative update 6.   Server: Win2003 (all latest updates) SQL Server 2005SP2 CU6   There is 1 database. For each tablet I create a separate publication (PUB001, PUB002, PUB003, etc.) with filtered articles containing data for the tablet. Each publication has a single subscription -- the tablet to which the subscription is assigned. Subscriptions are set to expire after 14 days. Snapshot agent was run when subscription was created, and is set to run automatically every 14 days.     This is a "test" system which is scheduled to roll out into production in 2 weeks.   For the past month I have been running 6 tablets A-OK with no problems (had 6 separate publications/subscriptions on the server/tablets).   I use a stored procedure to create the publications and subscriptions. This stored procedure hasn't changed in months.   Yesterday, we added another 6 tablets w/ separate publications on the server, using the same aforementioned stored procedure.     The tablet application is set to auto-sync over the internet every 15 minutes.   Starting yesterday afternoon, at random, tablets would st

View Complete Post

More Related Resource Links

User complaining about getting kicked out repeatedly after only a few minutes...


Hi, I am using forms authentication.  My web.config file contains this:

<authentication mode="Forms">
 <forms loginUrl="Login.aspx" defaultUrl="LeaseTracker.aspx" protection="All"   timeout="30" slidingExpiration="true"/>
 <deny users="?"/>

And the login includes this:

FormsAuthenticationTicket formsAuthenticationTicket =
 new FormsAuthenticationTicket(1, userName, DateTime.Now, DateTime.Now.AddMinutes(30),
 _isPersistent, userData, FormsAuthentication.FormsCookiePath);


Response.Redirect(FormsAuthentication.GetRedirectUrl(userName, _isPersistent));

Any ideas on why it would be treating the user this way?

getting minutes from calculation in gridview

Hi..I have to change the background colour of a calculated field (just the cell not the whole row) in my gridview called ElapsedTime, based on the number of minutes e.g > 30 mins background is red.I have already done something simliar for hours..I have succesfully written a sql statement that calculates elapsed timeCONVERT(Varchar, (DATEPART(dd, GETDATE() - DateAdded)-1) * 24 + DATEPART(hh,GETDATE() - DateAdded)) + 'h:' + CONVERT(Varchar, DATEPART(mi, GETDATE() - DateAdded)) + 'm' AS ElapsedTimeElapsed time looks like this e.g 11h:14mI then used this bit of code to get the hourProtected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound        Dim et As String                ' For Each r As GridViewRow In GridView1.Rows        If e.Row.RowType = DataControlRowType.DataRow Then            et = e.Row.Cells(13).Text            et = et.Substring(0, et.IndexOf("h"))            Dim number As Integer = Int32.Parse(et)            If e.Ro

Grouping Records into buckets of 15 minutes ....

Hi, Let's say I have a table with the following fields: [Id] [UpdateDate] [Group] Now for one day starting from 00:00:00 to 23:59:59 Let's say I want to plot how many records exist for each group / type in the last day, BUT I want to count these groups in 15 minute intervals. How would I best structure a T-SQL (SQL 2008) query to do this? Example Results: 00:15:00    Group 01 = 211; Group 02 = 289 00:30:00    Group 01 = 205; Group 02 = 233 00:45:00    Group 01 = 200; Group 2 = 267 etc.      I.W Coetzer

.NET Framework installations take 30 minutes on XP 64

We install .NET FW 1.1, 2.0, 3.0, and 3.5 (and patches that are part of the 3.5 download) using msiexec and wusa (/quiet /norestart). The total installation time for all .NET Framework versions is 30 minutes on Windows XP 64-bit: .NET FW 1.1: 2 minutes .NET FW 2.0: 5 minutes .NET FW 3.0: 10 minutes .NET FW 3.5: 8 minutes .NET FW 3.5 patches: 5 minutes Vista 64-bit only takes 3 1/2 minutes for .NET FW 3.5 and 1 patch. Why does XP 64 take 10 minutes for the same operations?Is there anything that can be done to speed up these installations?

Error: The replication agent has not logged a progress message in 10 minutes

Hello,      We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.   John   Error messages: The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.   18 -BcpBatchSize 10000018 -ChangesPerHistory 10018 -DestThreads 218 -DownloadGenerationsPerBatch 518 -DownloadReadChangesPerBatch 10018 -DownloadWriteChangesPerBatch 10018 -FastRowCount 118 -HistoryVerboseLevel 318 -KeepAliveMessageInterval 30018 -LoginTimeout 1518 -MaxBcpThreads 218 -MaxDownloadChanges 018 -MaxUploadChanges 018 -MetadataRetentionCleanup 118 -NumDeadlockRetries 518 -PollingInterval 6018 -QueryTimeout 40018 -SrcThreads 218 -StartQueueTimeout 018 -UploadGenerationsPerBatch 318 -UploadReadChangesPerBatch 10018 -UploadWriteChangesPerBatch 10018 -Validate 018 -ValidateInterval 60   Due to the memory leak issue with respect to replicating blobbed images we have changed UploadGenerationsPerBatch to = 3.

filtering by minutes and hours

guys, is there a way where i can filter my data based on the minutes and hours ie i already have the start date and end date.. i need to filter by the time as well. any help?

Get Difference between two dates as Hours, Minutes



 I am using the below query to get difference beiween two dates in hours and minutes.Minutes part look ok but the hours is incorrect.

 select datediff(minute,LastDate,getdate()) as "Minutes", datediff(hour,LastDate,getdate()) as "Hours"from emp.

 Note: Using SQL Server 2005


How can i show the seconds in the timer as minutes and seconds?


Im using a timer to countdown seconds. The value of the int is 1200000.

Instead shoing 1200000 and then 1199999

I want to show it as minutes and seconds.

Not the same format like DateTime.Now but something like that a forma that will show minutes and seconds and that will count the seconds back and when a new minute so it will count one minute down and so on.

Like: Minutes left: 7 Seconds: 55 for example.


This is the timer code where i want to show better format:




How to Get Total Minutes From Hours in SQL Server 2005?


Hi All.........!

I have 10:45 Hours and Now I want to get Total Minutes Like 645 Minutes.

How Can I Get in SQL Server 2005?

Please Help Me................!

Thanks in Advanced..............!

find files older than 15 minutes


Can someone please provide me with an example in vb.net of how I can delete a files that was created more than 15 minutes ago? I've been looking on google but can't really find a clear example.I think I need to use FileSystemInfo.CreationTime but not sure..If someone

could get me started I'd appreciate it ...Thank You 

The TimeSpan could not be parsed because at least one of the hours, minutes,.....


One of my users is getting the following error:  

The TimeSpan could not be parsed because at least one of the hours, minutes, or seconds components is outside its valid range.

Here is what I have pin pointed it down to:


cmd.CommandText = "InsertExportPairing";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@pn", SqlDbType.VarChar, 50).Value = pairing.Number;
        cmd.Parameters.Add("@pt", SqlDbType.Time, 7).Value = pairing.FlightTime.Insert(2, ":");
        cmd.Parameters.Add("@date", SqlDbType.Date).Value = DateTime.ParseExact(pairing.Date, "MMM dd, yy", CultureInfo.InvariantCulture);
        cmd.Parameters.Add("@uid", SqlDbType.Int).Value = userID;
        SqlParameter outParam = cmd.Parameters.Add("@newId", SqlDbType.Int);
        outParam.Direction = ParameterDirection.Output;


Difference between 2 times 6:00 Hours - 5:50 hours is 10 minutes i.e 0.10 How to do the same in SSRS


Hi I have a report where I have to get the employees absence hours, i.e if there are 8 hours in a day and the employee worked for 5:50 minutes then the difference would be calculated in time.... Please also let em know how to calculate absence hours if the working ours are null as its not showing any value for absence column

WorkingHrs    HoursWorked Absencehours

8                       5.10              2.50

8                        Null              Null

I have query that I have written to get the absenceHours= WorkingHrs - HoursWorked

Please help I feel its a simple query but kinda confused with it. Thanks.


4 gig log files in 2 minutes?

I am having an odd and very frustrating problem that just started showing up  two days ago.

I am starting to receive log files in my MOSS 2007 server:

10/23/2008 14:33:08.99  OWSTIMER.EXE (0x1E60)                    0x1570 Windows SharePoint Services    Timer                          5uuf Monitorable The previous instance of the timer job 'Application Server Timer Job', id '{C455141D-FE86-49BB-88CC-9691AC63AF39}' for service '{5C4ADEDE-0FC5-47ED-8DA7-8BF3DD989A5D}' is still running, so the current instance will be skipped.  Consider increasing the interval between jobs. 

these errors repeat themselves over and over in the log file and as a result the log file is balloning to hundreds of megs.

and in my event viewer i'm getting errors that look like this:

Event ID 17310

A user request from the session with SPID 71 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.

however the SPID seems to change every couple of seconds.

my log files went from about 28 megs to a couple hundred meg.  and out of the blue there appears a log file that balloons to over 4 gig in a matter of minutes.  it is so large that it tries to take up the remai

User Being Asked To Log In Again After Approx 20 Minutes


Dear All

I have a web application that uses forms authentication, memberships and roles. I'm finding it difficult to test but it looks as though the application is forcing my users to log in again after about 20 minutes of inactivity. However, the nature of my application requires users to stay logged in for longer than this even if they aren't using the application constantly.

I've already set the following line in my web.config file so that doesn't seem to be making a difference:

<sessionState timeout="60"/>

Is there something else that I need to set to prevent my users from being redirected to the login page too early on? I'd like them to be inactive for about an hour before forceably logging them off. I don't want them to lose their work if they don't use the system for 20 minutes.

Please can you help me?

Many thanks



Session timesout inspite of setting it for 45 minutes


Dear All,

I am using the "Inproc" mode of setting  session state to 45 minutes but still the session times out after 10 or so minutes.


Following is the setting included in the web.config:


<sessionState mode="InProc" cookieless="false" timeout="45"/>


Any co-operation in resolving this will highly be appreciated.





Establishing Connection to Database Takes 5 Minutes


I'm using the sync framework and generating an initial database (.sdf file) on the server and pulling it down to my mobile device via a WCF service.  That works fine with one caveat.  When my windows mobile app goes to connect to this database it takes 5 minutes to open the connection.  It seems to be consistently 5 minutes so I was thinking there is a timeout somewhere in play. 

Maybe something else is holding on to the new .sdf file i downloaded?  Maybe my sqlceconnection object thinks it is connected to an old instance of the .sdf and after it figures that out it connects to the new one?  I can't figure out what is happening here. 

Anyone have any ideas?


Converting Date Time to Minutes



I have a database column in datetime datatype . From the datetime column I applied the formula :

substring(convert(varchar(10),[Received time],108),1,5)

which gives me values like 06:00 (HH:MM)

I need to get the minutes from the HH:MM like 06:00 - 360 minutes ( numeric) as I will later be required to do an average of the minutes.

I need to convert HH:MM to represent only minutes in Numeric. Please let me know on this.

Thank You


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