Stopping/starting Sql Server With Commandlinecommands In Batch To Free Up Idle Connections?

Oct 21, 1999

Hello:

We have a new sales force automation application for sales rep to log their contacts, etc. It runs on mssql 6.5, sp 4.

They log in and leave their connections on without logging off or leave their coonections idle .

We set the user connections fiarly high but we are concerned that the max amount of user connections weill be consumed and the sql serve becomes locked.

My questions are:

1) Is there any parameter in the sql server configuration that will log off idle users have a certain time and dsiconnect them?

2) A backup of the database will be made each night. If there is no parameter, would it be a good idea to stop and start the sql server every night to release the idle connections?

3) If so, how to stop sql server from the commadn and start it with a command line command and do this in a batch file as a scheduled task?

4) Is there any other way to release these idle connections each night?

Any information you can supply will be appreciated. THanks.

David Spaisman

View 1 Replies


ADVERTISEMENT

Difference In Starting Rep Service Vs. Stopping And Starting The Rep Job?

Feb 1, 2007

When our rep distribution services time-out (several times a day) some dba's just restart the service while others restart the rep job which starts the service. Are there any differences between these two methods? Does restarting the service inherit any changes made to the job's attributes?



Thanks!

View 1 Replies View Related

Stopping And Starting SQL Server Nightly

Feb 9, 1999

Does anyone see any negative consequences to stopping and starting SQL Server nightly?

View 2 Replies View Related

Starting && Stopping SQL Server From Command Line

Nov 10, 2005

Hello All...
I am new to this forum (and new to SQL for that matter), so I hope this isn't a stupid question. I tried searching for the answer but couldn't find it here.
I am trying to start & stop SQL server through the command line so I can start & stop it as a scheduled task. Are there any switches for sqlmangr.exe I can use? Maybe another way?

Thanks....Dave S. <majordis@weco-group.com>

View 2 Replies View Related

Problem Remotely Stopping And Starting Services In SQL Server 2005

Sep 11, 2007

Hi guys

I've been dealing with a few problems with SQL Server 2005.

We don't want to give our DBA's local administrator access to the servers so we had a problem with SSIS which I managed to resolve by adding their global group into the local DCOm group and modifying the security properties of MsDtsServer.

Another problem I've come across is when you log into Management Studio as an account that has local administrator access to the server you have the Green symbol next to the registered server, you can then right click and Stop, Restart services etc.

If I log into Management Studio with an account that has full SQL sysadmin rights but not local administrator rights to the server then the Green symbol doesn't appear and the Stop, restart options are all greyed out - all other functionality appears okay, they just seem to lose the ability to remotely stop and start services.

All of the above is with Windows Firewall turned off, if the user has local administrator rights but the SQL Server has the Windows Firewall switched on they are unable to remotely stop and restart services.

Port 1433 is open on the firewall and program execptions are there for sqlbrowse.exe

Anyone come across this particular problem before?

Any help would be appreciated.

Cheers

Hanley

View 2 Replies View Related

Idle Connections Termination

Sep 20, 2007

folks
We have a situation where people just login run complex queries and then just don't shut off their query analyzer of apps.

Some of these chew up a lot of CPU cycles and unless we kill the query the CPU cycles are not released.

I see some of them are idle for over 1-2 hours or more, their last_batch would be at least 2 hours old.

The question is, "Is there a setting in the sql server whereby we can automatically disconnect idle threads?"

Regards
Paresh Motiwala
Boston, USA

View 4 Replies View Related

SQL Express 2005 Going Idle And Not Allowing Connections.

Feb 20, 2007

Just upgraded to SQL Express 2005 from MSDE for Firehouse. Upgrade went great and the db is accessable and running fine. Except when not used for a while. Then I need to restart the db to allow connections of any kind. If I don't I get an error that the db is not accessable and I can't connect. Everything runs fine after until it goes to "sleep" on me again. We upgraded to make use of the 4GB limit as we were at 1.9GB and MSDE was getting a little unhappy.



Any suggestions? Is this a "feature" and if so, is there a script I can run to kick it into working mode again?



Thanks

Chris

View 1 Replies View Related

Stopping And Starting Mirroring

Jul 25, 2007

My problem is primarily with SQL backup but the instant question is with mirroring in SQL 2005. I have a log file that is out of control and I need to do a backup with truncate_only, but this is command is evidently disallowed while mirroring is enabled. Is it possible to temporarily deactivate or remove mirroring in order to get the backup log under control? Is it possible to do that and then 'resume' mirroring?



A secondary issue is that I don't think mirroring is actually working at this point in time anyway. In the Mirroring section of the database properties the Status window says "No connection: cannot connect to the mirror server instance," so the question of stopping and restarting may be moot.



How does one reestablish mirroring if the connection is lost?



Lots of questions, I know... I'm reading up on it, but I'm obviously not the guy who set it up in the first place! Thanks in advance for any help...


CB

View 4 Replies View Related

Stopping And Starting SQL Service On A Cluster

Apr 24, 2008

hello everyone,

I wonder if you can help me with a problem I have trying to support a web based application that uses SQL 2005.

The problem is that the application developers tell me that it is neccessary to stop and restart the SQL service as part of the troubleshooting process when their application stops working. Unfortunately, the customer has our application database on a clustered SQL instance that is used by other applications so they cannot just stop and restart the SQL service because this will have a major impact on all the other instances...

Is there another way that would effectively do the same thing as stopping and restarting the SQL service? I have read that dettaching and re-attaching might do the same but application developers say onlt stopping/restarting services is sufficient to break the connection with the application.

Any advice would be really welcome as I am completely new to SQL and struggling with this!

Many thanks, Nick.

View 5 Replies View Related

Problem Stopping And Starting Services.

Mar 7, 2008

I'm hosting sqlserver 2005 developer edition locally on windows vista.

I'm getting messages for allot of stuff.

I can't restart, stop, or start my sql server instance.

I can't start the full-text search service.

I get this when I try to start the full-text search service.


===================================

Unable to start service MSFTESQL on server PAUL-PC.

===================================

Access Denied (ObjectExplorer)

------------------------------
Program Location:

at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.CheckServiceActionReturnValueSuccess(UInt32 returnValue)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.Start()


And when I try to restart the instance...


===================================

Unable to stop service MSSQLSERVER on server PAUL-PC.

===================================

Access Denied (ObjectExplorer)

------------------------------
Program Location:

at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.CheckServiceActionReturnValueSuccess(UInt32 returnValue)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.Stop(Boolean stopDependentServices)

View 4 Replies View Related

Stopping And Starting Pull Subscription

Feb 1, 2007

Say we need to replicate between 2 databases using transactional replication

So we create a publication on the first server and initialse the publication agent so that it takes a snapshot and starts the log reader to capture the transactions being keyed into it.

Then say we create a pull subscription from the second database but lets say we assume we already have the data from thepublication database already in it so no need to app,ly a snapshot over it, when the pull subscription starts we assume that only transactions in the log reader that occured AFTER the pull subscription was started would be applied. Is this correct?

Then say we need to stop the pull subscription for a short period then start it again (let say so that we can take a back up of the subscriber database and restore the database somewhere else and replication set up between these 2 with no chance of data being althered before the restore had finished) can someone confirm when we start the pull subscription again all the transactions that occurred during the stopped period will be applied when it is started again OR will it be the case that only the transactions since the pull subscription was restarted will be applied

Cheers

Matt

View 1 Replies View Related

SQL 2012 :: DTSX Package - Starting And Stopping A Job

Feb 26, 2015

I have a job that runs a dtsx package (containing an infinite loop). What I want to do is set up a schedule to start the job at 8am and stop it at 5pm. The scheduling GUI doesn't give this kind of option (caveat: that I can see).

View 3 Replies View Related

Stopping The Execution Of A Multi-batch Script

May 15, 2008



We have a number of customers using the same database and ASP application. We need to run a script that modifies the database to the latest version. If the script runs twice it will cause problems so we need to build in a fail safe way of stopping it running a second time.

To do this we can update a version table at the end of the script. At the start of the script we check that the version is the previous one. If it isn't then we need to abort the enitre script. The problem is that the RETURN statement will only exit the current batch and execution of the script will continue from the next GO statement.

Is there any way to stop a multi-batch script running if a certain condition is met in one batch in such a way that the remaining batches do not run?

View 10 Replies View Related

How To Free Memory Used By Prior Query Statement Within A Batch By TSQL?

Feb 13, 2004

Just Like these:

-- batch start
Select * from someTable --maybe a query which need much res(I/O,cpu,memory)

/*
can I do something here to free res used by prior statement?
*/

select * from someOtherTable
--batch end

The Sqls above are written in a procedure to automating test for some select querys.

View 4 Replies View Related

Generate Values Between A Starting And Stopping Point (time Values).

Apr 23, 2007

[RS 2005]

Given the starting and stopping points (time values), how do I generate values between these points.

For example, if I have 08 (representing Hour) as a starting point and 12 as a stopping point.

From this I would like to generate a data sequence like 08, 09, 10, 11, and 12.

So how do I accomplish this? In SQL or in the RS?

The only thing I can think of is using a WHILE loop and a temporary table in SQL (not to keen on doing this).



//HÃ¥kan

View 7 Replies View Related

DOS Batch File Running Osql - Opening/closing Connections

Jul 20, 2007

I've written a small dos batch script that runs a simple query throughosql and then calls an exe which sends an email if the returned value


Quote:

View 2 Replies View Related

Kill A Session After An Idle Duration In SQL Server 2005

Feb 21, 2008

Hi all;

I want to implement "Auto disconnection" (or kill) of user session that exceed a specified idle duration in SQL Server 2005.

I know how do that in oracle by creating a profile and set the IDLE_TIME paramter and asign that profile to all users. But in SQL Server i don't know how to do it.

Can anyone help me.



Kindly

View 2 Replies View Related

Problem With Performance After Leaving SQL Server Express Idle For Some Time

Feb 13, 2007

Hi, everyone!
I have this strange problem... After every time my application leaves sql-server idle (doesn't send anything, doesn't retrieve anything) next command to sql-server processes really long.
I've also noticed this bug/feature/misconfiguration even if I open a DB in Management Studio...
Please, could someone tell me, is there any timer that "puts a DB to sleep" if no one is using it for some time? Can I change the way server behaves in this situation?

View 4 Replies View Related

I Had Set My Windows Service's Startup Type As Automatic But It Is Not Starting Up Automatically When The System Is Starting.

May 18, 2007

Hello,



I had created a windows service using C#. I set its Startup Type as Automatic but it is not getting started automatically when my System Starts.

View 3 Replies View Related

Stopping SQL Server Services

Dec 13, 2001

Anyone got any "gotchas" or "nightmares" they want to share out of experience where the services have been shutdown without the proper forethought?

I'm trying to put a case in for a SQL DBA to be paged and to be in charge of shutting down the services and/or put together a checklist of things to verify first.

While I realize shutting down the services is supposed to be a graceful shutdown process I'm willing to bet there are a host of considerations.

Appreciate any Input.

Regards

View 1 Replies View Related

Server Stopping In Sudden

Oct 31, 2000

hi,
i am having sql7 with sp2.
Recently our server got bounced back. No body stopped the server, there are no work load at that time. Server suddenly stopped and started.
It is weired.
Can anyone have any clues , how it happened and why it happened.
Thanks!

__kavira

View 3 Replies View Related

SQL Server Agent Stopping

May 7, 2007

I have a SQL Server agent that keeps stopping for no reason. It happens about every other day. I have to go in on the server and manually start it. What would cause this to happen? We have about 50+ computers that need to sync with the server and do so successfully without having to manually start the agent every other day. How do we fix it?

View 17 Replies View Related

Detach/Attach DB VS Stopping SQL Server

Mar 21, 2002

What problems could be invoked by stopping SQL Server and copying a user databases data and log files and pasting these files over existing files on another machine.

Ex:
MyDB on Server1
MyDB on Server2
Stop SQL Server Server1 and Server2
Copy Server1.MyDB files
Over write Server2.MyDB files
Start SQL Server Server1 and Server2

Make sense. This scenerio seems to work but wonder what side affects could result.

Any comments would be helpful!!

View 1 Replies View Related

Copy Mdf Files Without Stopping Sql Server

Jan 29, 2006

hi.

how can I copy any mdf file to another folder without stopping sql server?

View 8 Replies View Related

Execute Proc On Stopping Mssql Server

Jul 23, 2005

How execute extended proc on stopping ms sql server (it mean beforestoping).Is it possible to handle this?Or is in system proc a'la sp_on_stop?Thx

View 2 Replies View Related

Report Server Service Stopping Unexpectedly

Jul 12, 2007

we run ssrs 2005 sp2 hotfix applied - how do we troubleshoot a problem where the report server service is stopping unexpectedly several times a day. When this happens please tell me what happens to the reports that are currently running. I believe that



1) a current subscription that is running will fail - not sure if it will try to restart itself 3 times or not

2) connection to the report server db cannot be made when that occurs



this is a huge problem for us and we dont know what is causing it or how to fix it. Any suggestions would help. I can tell you that our customers flood the server with subscriptions

View 2 Replies View Related

SQL Server Stopping While Configuring OLEDB Connection

Jan 23, 2007

When I configure and test and OLEDB connection SQL Server 2005 keeps stopping with an error message as shown below. The problem seems to happen when I open the connection for ediing in Data Flow Window. There is a consistent pattern of errors (in there Event Log) relating to the Evnet Log prior to this error occurring.

Any idea what the problem is?

I have to say that my experience with SSIS has not been very encouraging so far.



Event Type: Error
Event Source: MSSQL$SQL2005
Event Category: (2)
Event ID: 17311
Date: 23/01/2007
Time: 2:06:41 PM
Description:
SQL Server is terminating because of fatal exception c0000005. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 9f 43 00 00 10 00 00 00 ŸC......
0008: 14 00 00 00 53 00 59 00 ....S.Y.
0010: 44 00 2d 00 4c 00 2d 00 D.-.L.-.
0018: 30 00 31 00 33 00 32 00 0.1.3.2.
0020: 36 00 5c 00 53 00 51 00 6..S.Q.
0028: 4c 00 32 00 30 00 30 00 L.2.0.0.
0030: 35 00 00 00 11 00 00 00 5.......
0038: 45 00 78 00 61 00 6d 00 E.x.a.m.
0040: 70 00 6c 00 65 00 48 00 p.l.e.H.
0048: 69 00 73 00 74 00 6f 00 i.s.t.o.
0050: 72 00 69 00 61 00 6e 00 r.i.a.n.
0058: 00 00 ..

View 1 Replies View Related

SQL Server Services Stopping After System Reboot (URGENT)

Jun 3, 2002

Hello,
SQL Server 2000 services getting stoped automatically when system get reboot. When system reboot they started and after 5 minutes they were getting stoped.
I went through the event log file and found that an error is occuring in sql server with number 17148.

And I also observed that there is a file called "C : P r o g r a m F i l e s V E R I T A S B a c k u p E x e c N T b e n g i n e . e x e" is executing during the maintenance process,which is stopping the sql server services(agent and olap)

This problem is generating error in sql server with above mentioned number.

regards,
vnk.

View 1 Replies View Related

SQL Agent Is In Starting Status - But Not Starting

Mar 6, 2002

We have SQL 2000 (SP2) , Our SQL server agent showing green light as started from EM , It is succussfully restarting from NT Services too . But When I open the properties of the jobs from EM its gives error message SQL DMO error " SQl Agent is starting , try later " . And in EM Next run Date & Time not available .

MDDB database is accessable & in Log file its recovered fully

Thankx in Advance

Sha

View 1 Replies View Related

SQL Server 2005 EE Install Errors Completely Stopping My Progress

May 29, 2008

Trying to install SQL Server 2005 x64 Enterprise Edition during the "Workstation components, etc." part of the install, the install stops and gives me this error.

----------------------
Microsoft SQL Server 2005 Setup
Failed to install and configure assemblies C:Program Files (x86)Microsoft SQL Server90NotificationServices9.0.242Binmicrosoft.sqlserver.notificationservices.dll in the COM+ catalog. Error: -2147024893
Error message: The system cannot find the path specified.
Error description: Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' or one of its dependencies. The system cannot find the path specified.
[Abort] [Ignore] [Retry]

----------------------

This install is being attempted on 3 seperate servers all running Windows Server 2003 R2 Enterprise x64 Edition (Service Pack 2).


Futher notes:
Distributed Transaction Coordinator services is setup and running (started).
I checked to make sure there are no MSMQ components in the COM+ Application struture in Component Services.

View 3 Replies View Related

@@cpu_busy And @@idle

Jun 9, 2003

Should these two stats added together give me the time (ms) since SQL Server has been restarted? Maybe I don't understand but @@cpu_busy is the amount of time sql server has accessed the cpu and @@idle is the amount of time sql server has no cpu activity. When I add these two figures together, I don't get the total amount of time (ms) SQL Server has been running. What am I not doing? Any help is appreciated.
Thanks

View 6 Replies View Related

Performance Gap After Some Time Of Idle.

Jan 29, 2008

 Hello everybody,I have a ASP.NET (3.5) Web site which uses an data connection to my Sql Server 2005 Express. When I browse in my data-driven pages of my website, I am satisfied with the performance. But when I try my website after a long break, e.g. in the morning, the data-driven pages take a long time to come up, about 10 seconds. After this gap, when surfing on the other pages, there is no problem. It is only the first page. So it seems that my SQL Server goes "to sleep" after a certain time of idle.First I read a post about this problem which came up with the user instances of Sql Server. So I got rid of my user instance and set up my database "normally". But still I have that performance gap.I am using Linq To SQL and a couple of ListViews. I am totally confused how to manage this problem.Any suggestions?Thanks in advance,Hannes 

View 1 Replies View Related

Session Idle Timeout Over

Jun 18, 2001

Hi all,
We got this message on our production server event viewer for source MSDTC.

"String message: Session idle timeout over,tearing down the session"..
Even though it is marked as informational, just wanted to know what it is?..

thanks guys,
Marx

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved