Tuesday, February 19, 2013

Restart a server using command prompt

Restart a server using command prompt

Use command:

shutdown -r -f -t0

-r : restart
-f : forcefully
-t : time (Here we have given 0 secs, which means server will be rebooted immediately)

If you dont specify time, default time taken for shutting down is 30 secs.

Tuesday, January 1, 2013

Taking site backup in MOSS 2007 using stsadm

Taking complete site backup in MOSS 2007 using stsadm command on cmd:

1) First go to the path using command prompt:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN

2) Fire the command:
stsadm -o backup -url http://sharepoint:8888 -filename c:/filename.dat

Note:
1) This backup only contains Sharepoint related stuff (i.e Config DB, Content DB, Sharepoint Site Pages)
2) If there are any custom pages that are available outside sharepoint, then those pages needs to be incorporated manually.
3) Also if there are some databases(like aspnetdb or custom DB) other than the sharepoint related databases then those databases needs to be restored separately.



Wednesday, November 28, 2012

Unable to restore database in SQL Server because of running processes

Unable to restore database in SQL Server because of running processes.

If you are unable to restore database in SQL Server because of running processes.

1. You can find which processes are running using the following command:
sp_who2

2. After finding out which processes are running relating to the particular database, you can kill them using the kill command with process id

For eg.

kill 63
kill 55

This should restore your database.


Thursday, November 15, 2012

Delete duplicate rows in table with no key in SQL Server

Delete duplicate rows in table with no key in SQL Server:

DELETE
FROM  TableName
WHERE TableName.%%physloc%%
      NOT IN (SELECT MIN(b.%%physloc%%)
              FROM TableName b
              GROUP BY b.ColumnName)

Thursday, September 20, 2012

10 Key Features in Windows 8

Windows 8 introduces significant changes to the operating system's graphical user interface and platform; such as a new interface design incorporating a new design language used by other Microsoft products, a new Start screen to replace the Start menu used by previous versions of Windows, a new online store that can be used to obtain new applications, along with a new platform for apps that can provide what developers described as a "fast and fluid" experience with emphasis on touchscreen input.Additional security features were also added to the operating system, such as a built-in antivirus program and a secure boot feature on systems with UEFI firmware.

10 Key Features in Windows 8

1. Support for both x86 PCs and ARM tablets
2. Touch-centric, Tiles-based User Interface (UI)
3. Charms
4. Snap Multi-tasking
5. Windows 8 Control Panel
6. Web Navigation by Touch
7. Two Touch Keyboards
8. Enhanced Copy Experience
9. Native USB 3.0 Support
10. Better Support for Multiple Monitors

Sunday, July 15, 2012

How to get the details of W3WP processes running on your server

How to get the details of W3WP processes for each app pool running on your server
Run this command from System32 folder

Cscript iisapp.vbs

Output will be in the format:

W3WP.exe PID: 1468   AppPoolId: AppPoolForSite1.com
W3WP.exe PID: 3056   AppPoolId: AppPooForSite2.com
W3WP.exe PID: 1316   AppPoolId: AppPooForSite3.com

Auto Refresh a Web Page

Add the below line in the <head> section of your web page.
For Eg.
<meta http-equiv="Refresh" content="90" />

where "90" is Time in seconds.