Can I temporarily suspend SharePoint Server + IIS + SQL Server? - sharepoint

Is there a way to temporarily suspend / pause Sharepoint Server 2010, IIS and SQL Server services without killing them in Task Manager? I am not running VM or Hyper-V, so most of my resources are constantly used by those 3 major server applications.
It's just I am not always in SharePoint 2010. Ocasionally I'd like to play StarCraft 2 or work in AutoCAD.

Check out this nice little utility in Codeplex to start/stop all services of SharePoint 2010.
SharePoint 2010 Service Manager

You could write a script to stop and start the required services like this and place it in a .bat file:
net start service
net stop service
Just choose all the service names you need to start and stop and create two bat files one to stop and one to start

Related

SharePoint 2016 some Timer Jobs run time n/a

I'm helpless... Since couple of weeks looking for a solution.
Some TimerJobs (system jobs and custom) in my migrated SharePoint farm won't be executed. Migrated from 2010, over 2013 to 2016.
Last run time is: N/A or via powershell 01.01.0001 00:00:00
I spend a lot of time to look for a solution, and already did the following:
Restarted timer service
Restarted all servers
iis reset
Cleared SharePoint configuration cache
Tried "Start-SPAdminJob -verbose", but it fails (also when I do "net stop SPAdminV4 / net start SPAdminV4")
Started SharePoint Configuration Wizard
Redployed the wsp and reactivated (for a custom timer job)
Checked service accounts
I'm also wondering about that some of them have also no web application associated. Is this normal?
Web application: N/A
Is there someone with an idea?
Thanks for any help.
try shell
$server=Get-SPServer -Identity "name"
$ts = $server.ServiceInstances | ? { $_.GetType().Name -like "*sptimerservice*" } | Select -First 1
$ts.AllowContentDatabaseJobs = $true
$ts.AllowServiceJobs = $true
$ts.Update()
About the custom jobs it may be related to missing deployment steps, like WSPs installation (ex. Compatibility Level or something else) or even feature activation to 'attach' it to a web application, service instance or server. Remembering that we have a sort of 'scopes' that must be checked during time job development. This is not new, but an excellent material:
https://www.red-gate.com/simple-talk/dotnet/.net-tools/a-complete-guide-to-writing-timer-jobs-in-sharepoint-2010/
About the system (native) jobs, I recommend you to give us an example, so we may check the SharePoint 2016 TimerJobs reference list:
https://learn.microsoft.com/en-us/sharepoint/technical-reference/timer-job-reference-for-sharepoint-server-2016
After checking those requirements, you have a way to start some stucked jobs (or force them to run immediately), using the following commands on your SharePoint shell:
net stop spadminv4
stsadm -o execadmsvcjobs
net start spadminv4
Reference: https://technet.microsoft.com/pt-br/library/cc262783(v=office.12).aspx
And one last shot - check if you have pending administrative changes, like running PSConfig. Central Admin Health Analyzer is your best friend ;)
Bonus: about custom timer jobs, please always be sure that some features may require the Microsoft SharePoint Foundation Web Application service started on CA Server, to make custom timer jobs available under Central Admin:
https://learn.microsoft.com/en-us/SharePoint/administration/service-deployment-planning
"This service provides web server functionality. It is started by default on web servers. Custom features scoped to web applications may not display in Central Administration as intended if this service is not started on the server running Central Administration and if the feature cannot be deployed globally."

both (WAS) and (W3SVC) stopped in iis

I cant start my site in IIS after restarting windows server 2012, because both of (WAS) and (W3SVC) stopped.
how fixed them.
by the way i used "net start W3SVC" in CMD, but nothing changed.
thanks
Just go to services and click on World wide web publishing services was disabled and change to automatically, in same dialogue box you can see Log On button and click the button and click on Allow services, and restart your machine.
IIS depends on the World Wide Web Publishing Service (W3SVC) which in-turn depedns on the Windows process Activation Service (WAS). So you need to start both the services before IIS can be started.
You can do this either by using the net start command or by manually going to the services.msc.
In your case net start W3SVC did not work as W3SVC needs WAS to be in running state. So WAS service needs to be started first.
Use the following command to start the services (you may need to run command prompt as admin)
NET START WAS
NET START W3SVC
Alternatively - go to run and type services.msc Scroll down till you get Windows Process Activation Service and start it. Then scroll further down to World Wide Web Publishing Service and start that.
Finally start your IIS (for instance use IISRESET command)

Sharepoint 2013 Custom Timer Job running on development server but not on production server

I have developed a custom timer job for SharePoint 2013 in visual studio 2012 which sends email notifications. The issue is that it works fine on development server.
I have followed the following steps to debug it on the development server 1.) Deploy the timer job on respective site. 2.) Restart the timer service in services.msc 3.) Then is do attach to process OWSTIMER in visual studio. 4.) And finally Go to SharePoint 2013 Central administration->Monitoring->Review Job Definition and click on the respective timer job and say run now.
After doing this the breakpoint is hit in visual studio at the Execute() method. So in the development server it is running.
Now on the production server I cannot debug using visual studio so I have deployed the packaged solution(.wsp).
I can see the feature is activated in Site Collection Administration-> Site Collection Features.
Now on the production server I follow the following steps 1.)Restart the timer service in services.msc 2.)And finally Go to SharePoint 2013 Central administration->Monitoring->Review Job
Further to test whether the timer job is working on production server or not I had used PortalLog.LogString("Flow test1"); at the start of the Execute() method. Now this runs on the development server and I see the message in the SharePoint logs but on the production server I can't see "Flow Test1" in the logs after I click Run Now in central admin.
Can anyone suggest what is the issue and a possible solution?
It seems to me that there are two issues:
You should use other way for logging LoggingService should be preferred way. Use WriteEvent to write to EventLog or WriteTrace to write to ULS log.
Running job. Be sure that Owstimer.exe service on all web servers are restarted (can be done by this powershell script). I expect that you have correctly scheduled your job either in your powershell script or in your feature receiver.
Here are a few things to try:
Go to Central Administration and run the timer job from there. Then go to the job history page and check whether it finished successfully or not. If there was an error, you should see the error message from there. That will give you a clue on whats happening.
As Mazin said, restart the timer service in all servers. After deployment, the DLLs are cached by the process and you don't see your changes reflected.
Browse the SharePoint logs and search for an exception or error. You can narrow your search by selecting the timeframe on which your job ran. You can use the following PS script:
Get-SPLogEvent -StartTime "02/02/2014 11:00" -EndTime "02/02/2014 13:00" | Out-GridView
As stated here it seems your job assembly is not deployed in the GAC. Verify that the assembly is present there.

SharePoint 2007 WSP deployment process, restarting SPTimerV3 service

I've got a WF feature which I've been deploying into my development/test environment fairly frequently, and as such have run into an issue where the assembly seems to be cached by the SharePoint Timer service (SPTimerV3), and then an out-of-date version is used after the workflow rehydrates following a Delay Activity.
To fix this, I've tried adding a "NET STOP SPTimerV3" and "NET START SPTimerV3" to my batch file after the STSADM commands to install the .WSP . It works to restart the timer service, and I no longer have the caching problem, however restarting the timer this way seems to kill my SP App Pools in IIS fairly regularly.
Has anyone found a good way to restart the timer in a WSP deployment batch file without adverse affects? Do I need to restart another dependent service, or restart the App Pools each time as well?
you need to restart IIS as well. IISRESET /noforce should do the trick.

Windows Azure local development environment speed

I've started porting an existing ASP.NET web app to Windows Azure and have noticed that the development process is really slow. Each time I make a change to my code and want to view it, I have to effectively redeploy it to the local dev cloud (using Start debugging (F5) or Start without debugging (Ctrl-F5). The process itself takes over a minute, during which time Visual Studio is completely unresponsive.
Am I doing something wrong or is that simply how things are developing for Azure?
My specs:
Visual Studio 2008 9.0.30729.1 SP
5 projects running on .NET 3.5 SP1
Azure SDK 1.1 (February 2010)
Single instance of a single web role
Dual-core AMD 64 machine with 8GB RAM, 64-bit Windows 7, fully patched
The main project itself is quite large (3k files, ~200k lines) but compiles normally in 10-15 seconds
If your web role has limited functionality, you might be able to just set the Web project as the Active Project in your VS solution and run from there.
For example, my web role doesn't call into table storage, blob storage, etc... it just makes some Azure logging calls and interacts with SQL Azure. So sometimes I just set the web project to be the startup project in the VS debugger, not Azure, and run from there. I've properly written my logging calls to check if Azure is available before they write, so they don't execute in this situation.
Of course, if you're doing lots with table storage, queues, blobs, etc. then this is not for you.
Normally in a development machine we just compile and run the solution. In case of Azure development there is a additional step where the specific project is deployed in the Dev fabric which involves copying the complete web site content to the dynamically created deployment folder. Since you have a large number of files this would require all those files to be copied into a new folder every time you press F5 or Ctrl-F5. This may cause the delay you are noticing.
This scenario also highlights the inflexibility in deploying the solution over the App fabric. Any time you change any content (static or dynamic) in the website the complete site has to be packaged and re uploaded on your production server.
In my case when I changed the port from 80 to something else (under end points) the speed returned to normal.
Microsoft's Steve Marx has a blog post about running a website from a mounted VM in Azure. This may be a good development pattern since you simply update the contents of a VM stored in blob storage instead of having to redeploy to the fabric each time.

Resources