.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

Automatic Stopping and Starting of SQL Server?

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Sql Server


I know how to manually go into the Control Panel Administrative Tools Services applet to stop and re-start SQL Server services.  But, is it possible to somehow program this service to automatically stop and re-start, say, at midnight each night so that temporary tables and other items get cleaned out and so that apps that depend on SQL will perform better during the business day?


View Complete Post

More Related Resource Links

Error starting SQL Server Agent - Could not load the DLL xpstar90.dll. Reason: 126

AD Service account password was changed.  Now the SQL Server Agent (MSSQLSERVER) will not start even after updating the password.  Have no access into the databases.  Log files say "Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.)."  Service Account has Full rights on system.  Any help in solving the problem would be great.

Failed to generate a user instance of SQL Server due to failure in starting the Process for the User

Could someone help with this please? I'm using VWD 2010 to build a new web site - I tried to add a new database file but it won't do it. I started by clicking on the folder 'App_Data', then right clicking and selecting 'Add new item' - after that I tried to add an SQL Server Database but received this message...  'Failed to generate a user instance of SQL Server due to failure in starting the Process for the User Instance' What does this mean? How do I start the 'Process for the User Instance'?  I imagined all that was done for me at the install stage, when I installed VWD2010, but it appears not.  Thank you for any help at all.    Regards

Problem in starting the SQL Server Reporting Services

Hi All,   I have a problem in deploying the reports. when i try to deploy the reports it shows that  Report Sever not working but when i try to start my SQL Server Reporting Services will get the below mentioned error so please can one could suggest me on  this. "Could not Start the SQL Server Reporting Services (MSSQLSERVER) service on local computer ERROR1053: Service didnt respond to start or control request in a timely fashion" Regards, Snusha  

SQL Server not starting - FallBack certificate initialization failed

I can not start my SqlServer 2008 Express. The problem seemed to start when I changed my "Built In account, Log in as" from Local Service to Local System. If I try to change back to Local Service I get the messagebox with WMI Provider Error, "Cannot find object or property. [0x80092004]". Getting a bit confused, but read http://support.microsoft.com/kb/900497    mentioned about  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib, Value name: Certificate, Type: REG_SZ not having a valid value then 2005 would not starte - my value is blank. Changing it to 0 did not work.How can I import a valid certificate using SQL Server Configuration Manager. And how do you turn off Forced Encryption? Not sure if this would fix it, but couldn't hurt.====================================== 2009-03-08 01:39:06.01 Server      Error: 17190, Severity: 16, State: 1.2009-03-08 01:39:06.01 Server      FallBack certificate initialization failed with error code: 1.2009-03-08 01:39:06.01 Server      Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.2009-03-08 01:39:06.01 Server      Error: 17182, Severity: 16, State: 1.2009-03-08 01:39:06.01 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to i

Failed to generate a user instance of SQL Server due to a failure in starting the process for the us

Hello,Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. I'm using SQLServer2005 and VWD2010. Did the following below but to no avail. 1.) I have set SQL SERVER (SQLEXPRESS) built-in account to "Local System" at SQL Server Configuration Manager. Restart.  2.) Couldn't find the folder "SQLEXPRESS" at Vista c://Users/[username]/appdata/local/microsoft/microsoft sql server. Is there anything else I miss before doing my last resort? FORMAT my pc and hope it will work the next time.I'm using SQLServer2005 and VWD2010. I Did the following below but to no avail.1.) I have set SQL SERVER (SQLEXPRESS) built-in account to "Local System" at SQL Server Configuration Manager. Restart. 2.) Couldn't find the folder "SQLEXPRESS" at Vista c://Users/[username]/appdata/local/microsoft/microsoft sql server.Is there anything else I miss before doing my last resort? FORMAT my pc and hope it will work the next time.Thank You,-imperialx

Starting with SQL Server

Hi I wanted to get going with learning SQL sometime ago but had to postpone it but now got some time facilities; I like to have some assistannce. Let me give a brief on what I did earlier. I tried to download Visual Studio several times because I thought SQL also got shipped with it with it; unsuccessful; I tried to download SQL Server 2008 Express Edition earlier; unsuccessful; thinking the SQL Server 2005 files that were shipped with my computer could be the reason I uninstalled the same but I missed one file; later I tried SQL Server R2; it seems it has installed in my computer; I have been able to download Visual Basic 2008 Expres too. This is the list of Microsift programme files I have in the Control Panel; Compatibility Pack for the 2007 Office System (31.7 MB) .Net Framework 3.5 SP1 (27.8 MB) Office 2003 Web Components (20.4MB) Office 2007 Primary Interop Assemblies (7.23MB) Office Enterprise 2007 (626 MB) Office powerpoint Viewer (English) (50.8 MB) Small Business Connectivity Components (158 MB) Report Viewer Redistributtable 2008 SP1 (114MB) Silverlight SQL Server 2005 (37.4 MB) SQL Server 2008 R2 (590 MB) SQL Server 2008 R2 Native Client (2.90 MB) SQL Server 2008 Policies (983 KB) SQL Server 2008 Setup (English) (32.3MB) SQL Server 2008 Setup Support Files (21.6 MB) SQL Server Browser (8.99 MB) SQL Server Compact 3.5 SP2 ENU (3.39 MB) SQL Server Comp

Sharepoint Server 2007. Sharepoint Designer workflow not starting for one user only.


We have created a custom workflow in SPD that is attached to a document library within a MOSS 2007 teamsite.

The workflow is set to trigger when a new item is created in the document library.

Previously, the workflow has worked fine for all users but recently has stopped working for one user only.

For the problem user, what we are seeing is that when a new item is created in the document library, the attached workflow never starts.  There is no error, the workflow just does not get triggered.  However, if the problem user goes to an item in the document library and clicks on the workflow she can manually start it and it works fine with no error.

This user has the same permissions on the site as others who do not have any problem.

In the course of investigating this problem, we have temporarily increased the problem users permissions on the document library to full control (was contribute before) but this has had no effect on the problem.  Authentication is being done via Active Directory.  We have tried removing the user from the site and re-instating her but again this has no impact.

Does anyone have any idea how we could fix this problem or further debug it?

Project Server Services remains in Starting status


When trying to start the Project Server service, the service remains in Starting status.

I've tried to stop and restart the service on the server that I want to run and this doesn't help.

These are the services that I see on the server:

Microsoft Project Server Events Service 2010

Microsoft Project Server Queue Service 2010


I'm on SP2010 14.0.5123.5000 (August CU).

This is preventing me from accessing the service to configure and provision my Project Server site.

ServiceModel.AddressAlreadyInUseException stopping wcf service from starting


I have a windows service that hosts two WCF services - one using HTTP on port 8731 and the other using HTTPS on port 8732.

When I start the service, it stops after about 30 seconds with the following error

Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL https://+:8732/Design_Time_Addresses/WcfServiceHost/Session/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'https://+:8732/Design_Time_Addresses/WcfServiceHost/Session/' because it conflicts with an existing registration on the machine.

using "netstat -a" before and after trying to start the service indicates that there is nothing listening on port 8732.

If I change the port from 8732 to 8733 in app.config, the service starts successfully. Running netstat -a indicates that nothing is listening on port 8732.

If I change the port back to 8732, it stops working again. I would really like to understand why this happening, but am not sure where to go from here. Any help would be appreciated.


On Automatic Indexing of SQL Server Databases


While SQL queries don't reference indexes explicitly, we all know how important indexes are to database performance. They constitute the backbone of database operations. Indexing currently is a difficult undertaking usually mastered by senior DBAs/developers. What happens if a SQL Server site does not have an indexing expert? Performance will range from less than optimal to unacceptable.

The SQL Server Database Engine has access to all the technical information, albeit not all recorded currently, to enable automating indexing.  The DBA would have to supply query priority information, especially indicate which are the Business Critical queries. It is safe to assume that very frequent queries are Business Critical. However, there are less frequent queries which maybe Business Critical as well.


In a nutshell current indexing wisdom: Primary Key columns (this is already automatic), Foreign Key columns and columns in WHERE clause predicates should be indexed.  In addi

Failed to generate a user instance of SQL Server due to a failure in starting the process for the us


I am trying to get an app I created in VB.NET to run on a client machine. The app runs fine on my development machine but when I copy it to a client machine I receive the error:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance.

I have installed SQL Server Express on both pcs with identical accounts and running identical versions.

What's strange is if I change User Instance = True to User Instance = False in the code, the app runs on the client machine but not on my developer machine.

It seems more like a SQL Server issue than a VB.NET issue.

Any ideas?






Sql Server 2005 not starting


      I have my web application with backend  as Sql Server 2005 CTP(Yukon).
Initially It works well.
I updated some security settings to the OS Windows Server 2003 and restarted the machine.
Now the Sql Server is not starting.When I manually started  It logs error as

2005-10-13 03:39:57.85 Server      UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.
2005-10-13 03:39:57.85 Server      Registry startup parameters:
2005-10-13 03:39:57.85 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2005-10-13 03:39:57.85 Server     

Failed to generate a user instance of SQL Server due to a failure in starting the process for the us


This seems to be a common problem but I've tried everything I could find in all the posts on this topic with no luck. 

The server is Windows Server 2008 running IIS7.  The ASP.NET application worked fine but it used SQL Server 2008 Web Edition (10.0.2531) and my goal was to upgrade the Web Application from ASP.NET 2.0 to ASP.NET 4.0 and use SQL Express (10.50.1600).

Here are the confirmations/changes I've made while researching this issue:

 1) SQL Server Express is running as Local System (it is on a domain controller)

 2) sp_configure 'user instances enabled', 1... was already 1, but what the heck, did it again

 3) enabled audit security logon events failure to see if it was a permissions problem

 4) attached the mdb file in SSMS to insure it was ok, it is

 5) removed the files in c:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

       (note, I removed the ones in my administrator user folder as there wasn't one for "local system"

 6) And of course, it works fine on my developement machine, windows 7. :)

Any other suggestions how what I should try or procedures to troubleshoot??



SQL server performance problem (periodical stopping processing transactions)

Hi there.
  We are facing some problem that connected with sql server (as we think)
  We have some software (OLTP more like) which receives data (with same structure) over network and then writes it into DB. The problem is that every minute sql server stops processing transactions for 10 seconds (approximately). You can see this situation on picture (green line is intensity of incoming data and red line is output intensity after processing (adding to DB)).
  IBM server with 4 x Xeon 2.2 Ghz (cpu utilization is less then 10%)
  DB files are located on RAID 6 over 20 spindle (physical disks) max IO speed more then 300 MB/s (IO throughtput usage is about 2 MB/s). DB Log is located on the same drive as other DB's files. LOB is stored in separated files. DB sheme is a typical warehouse: 2 Large tables(Table A - 400 M of rows, contains images and has reference to table B. Table B has 40 M of rows). 
  Data proceeding: some structed data (int's + chars) + image - max 50 KB
  Proceeding algorithms: Step 1. Look up table B. Step 2. Insert in table B if needed. Insert into table A.<

SQL 2005 Cluster Error (SQL Server Cluster Resource Not Starting)



  I have 4 node Cluster (3 Active 1 passive) my second node SQL Cluster resource is not starting.


i'm getting following errors. if anyone can please give me help.


Event Type:      Error

Event Source:   MSSQL$TLCSQLDBIN02

Event Category:            (3)

Event ID:          19019

SQL Server 2005 Database recovery takes long when starting


I have a large database which is consistently taking between 30 and 60 minutes to come up after restarting SQL Server.  How can I speed this up?  Please read below before responding.

I have a Winows 2003, 2 node cluster running 1 instance of SQL Server 2005 enterprise ed.    The server has 64GB of RAM, and 4 Quad core chips (16 logical processors).  The storage is on SAN, and is a mix of RAID 10 and RAID 5 volumes.  The instance has multiple DB's in it but 1 is far and away the largest @ 2TB allocated (about 1TB actual data).   The database in question is broken into many datafiles as follows:


Primary filegroup = 1 10GB datafile

Secondary filegroup = 8 x 100GB datafiles spread evenly over 4 seperate volumes for I/O performance.

Partitioning filegroups = many many files used for a partitioned table (file sizes ranging from 1.5GB to 20GB)

Again, my issue is the following.   This 2TB database takes close to an hour to startup everytime the instance of SQL Server restarts, failsover etc...  

Couple of notes:

1) We have instant file initialization configured

2) Recovery model = simple

3) Recovery interval = 0

4) There are no active large transactions running when the instance goes down


UDP server is not stopping

on form load i made a udp server for a chat application. here's the code
 private void server()
      UdpClient up = new UdpClient(8080);
      while (true)
        IPEndPoint remoteipendpoint = new IPEndPoint(IPAddress.Any, 0);
        byte[] recievebyte = up.Receive(ref remoteipendpoint);
        word = Encoding.ASCII.GetString(recievebyte);
        recieveport = Convert.ToInt32(word.Substring(0, 4));
        if (lstbxMsg.InvokeRequired && showcon)
          connect con = new connect(connectmem);
          lstbxMsg.BeginInvoke(con, remoteipendpoint);
          showcon = false;
        if (!string.IsNullOrEmpty(word))
          Thread thrdsend = new Thread(new ThreadStart(send));

Its working fine.

My proble

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