Shortcut to Start and Stop MsSqlServer Service

by Emanuele 6/18/2008 12:13:00 PM
Very frequently I start and stop default istance of Sql Server, to deploy new stuff on the server or on my local machine.
I created two batch files on my desktop to speed up this operation.

First of all we test if the command line script run correctly or not.

Click Start -> Run -> type "cmd" to start command prompt.


Start SqlServer Default Istance

Type "net start mssqlserver" and press Enter.



Stop SqlServer Default Istance

Type "net stop mssqlserver" and press Enter.




If two commands run correctly, we can go on to create the batch files.

p.s. If you use Windows Vista, you must launch the commands with administrator privileges.


Create the shortcuts

Right click on desktop and select New -> Text Document.
Rename the file with "start sqlserver.bat"
Put the command "net start mssqlserver" in the file and save.

Right click on desktop and select New -> Text Document.
Rename the file with "stop sqlserver.bat"
Put the command "net stop mssqlserver" in the file and save.

If you use Windows Vista, right click and select "Run as administrator".

How to install Windows Server 2008 on VmWare

by Emanuele 3/17/2008 11:55:00 PM

In these days, I wrote a document to explain how to install Windows Server 2008 on VmWare 6.0.
I don't explain the new features of Windows Server 2008, but I say how to configure VmWare 6.0 to work with Windows Server 2008.
The guide is very simple and it contains some screenshots.
I upload two files: a pdf file and a xps file.
Choose your favourite format.

How to Install Server 2008.pdf (1.72 mb)

How to Install Server 2008.xps (4.54 mb)

How to determine which version of .Net Framework are installed

by Emanuele 1/10/2008 8:55:00 PM
The easiest way to determine which versions of the .NET Framework are installed on your Pc or on your Server is to navigate the %systemroot%\Microsoft.NET\Framework folder.
You can paste the listed address for the Framework folder into a Windows Explorer address bar to navigate to the Framework folder. The three released versions of the .NET Framework are contained in the following folders:
v1.0.3705
v1.1.4322
v2.0.50727

To determine which versions of the .NET Framework are installed on a computer, follow these steps:
1. Open any one of the folders in the previous list, and then locate the Mscorlib.dll file.
2. Right-click the file, and then click Properties.
3. Click the Version tab, and then note the file version.
4. Use the previous list to determine which version of the .NET Framework is installed on the computer, and then click OK.


Repeat these steps for each version of the .NET Framework on the computer.


Create a shortcut to clear memory

by Emanuele 12/17/2007 5:51:00 PM

Sometimes, when you work all day without restar your pc, it appears much slowly.
The only solution is a reboot of your system, but we have never time for this!!!
To remedy this problem simply create a shortcut on your desktop with this settings.

  1.  Create a new shortcut on your desktop (Righ click -> New -> Shortcut)
  2. Insert this string %windir%\system32\rundll32.exe advapi32.dll,ProcessIdleTasks in the textbox
  3. Insert the name of shortcut, like "Clear memory" and click Ok
  4. Test the shortcut

Simply, fast but usefull.

 

Disable message popup alert after windows update

by Emanuele 12/12/2007 10:53:00 AM

Sometimes, after the Windows Update a annoying message popup appears every a few minutes.

Especially it appears when you do something important, it takes focus and your window goes behind.
If you want to disable this reminder follow the following steps:
  1. Click Start -> Run
  2. Enter “gpedit.msc”
  3. Go to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update
  4. Double-click on “No auto-restart for scheduled Automatic Update installation”
  5. Set to “Enabled”
  6. Reboot the computer

 

Disable_restart_with_scheduled_installations.gif (50.28 kb)

This solution doesn't run under Windows Xp Home Edition because in this version of Windows, doesn't exist the Group Policies utility.
There is a regedit hack.

  1. Click Start -> Run
  2. Enter “regedit.exe”
  3. Search HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
  4. Create a DWORD called NoAutoRebootWithLoggedOnUsers 
  5. Set to 1
  6. Reboot the computer
Otherwise download this and hack the registry.

Expand a VmWare disk

by Emanuele 11/19/2007 4:17:00 PM

Yesterday I tested Windows Server 2008 in a Vmware virtual machine.
When I installed some application and some developer tools, my disk is full.
I hoped to solve the problem in a few minutes, but I wrong.
I seeked on the web to find an easy solution, but the only thing that i found is a command on the command line using VmWare Virtual Disk Manager.
This feature is old but is useful.
You find the documentation about this utility on the follow link: http://www.vmware.com/support/ws45/doc/disks_vdiskmanager_ws.html

The command is:

vmware-vdiskmanager -x 40GB myVirtualDisk.vmdk

myVirtualDisk.vmdk is the file of your virtual disk.
You can find vmware-vdiskmanager in the VmWare installation folder.
The operation of expand the virtual disk need several minutes.
After do that, you install a tool (Partition Magic for example) on the virtual machine and merge the two disk.


Enable Http Compression on IIS 6.0

by Emanuele 11/12/2007 11:20:00 PM

With this simple eight steps, you can enable the http compression on IIS 6.
It is useful if your application has very hard pages, but the compression requires much cpu usage.

1. Open a command prompt, type net stop iisadmin and press ENTER.

2. Type cd c:\inetpub\adminscripts and press ENTER.

3. Type
CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" and press ENTER.

4. Type CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" and press ENTER.

5. Type
CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel "9" and press ENTER.

6. Type CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel "9" and press ENTER.

7. Type
cscript.exe adsutil.vbs set W3SVC/ID/Root/WebServiceTG/DoDynamicCompression True and press ENTER. (ID is the identifier of the application that you can find on the coloumn Identifier of IIS Manager)

8. Type
net start w3svc and press ENTER.

Deploy Web Application

by Emanuele 11/6/2007 12:34:00 PM
Introduction

This article covers how to deploy a Web Application on the server with IIS 6. The article targets the developers that don't know very well the deployment of Asp.Net application.

Creating a Virtual Directory

A virtual directory is an alias to the physical directory, but it may be access from internet.
The better way to create a virtual directory is the follow method:
  • open IIS Manager under Control Panel --> Administrative Tools --> Internet Information Services
  • Expand your local computer node, right click on the website if you want and click New > Virtual Directory
  • Enter the name of our virtual directory and choose the physical path where the our application is.
  • Specify access permissions for the users that use our application

Configuring Asp.Net version

Sometimes the server that you use, have both framework installed. We need to specify the appropriate framework to run our application correctly.
Right click on the virtual directory and select Properties.
In the Asp.net tab select the correct version of framework and click Ok.

Configuring Application pools

The application pool is a functionality that are introduced with IIS 6 to isolate web application into a group called applications pools.
With that the web applications run under a worker process called w3p.exe. The applications in the same group, run under the same worker process.
A new application pool can create with IIS Mananger.
Select the application pools node, right click anc New > Application Pool. Type a pool application ID.
There are some options to setup for application pool but for this time, it's all.

Associating site with application pool

We need to associate our site with our application pool we created. Right click on the our virtual directory and go to tab "Home Directory". Select the application pool we created from the drop down list and click Ok.



Powered by BlogEngine.NET 1.3.1.0
Theme by Emanuele Bartolesi

About the author

Name of author Emanuele Bartolesi
I'm a senior developer and project manager.

Contact me Contact me

Calendar

<<  December 2008  >>
MoTuWeThFrSaSu
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in

Download Day 2008