Wednesday, December 2, 2009

Manage Windows 2008 R2 servers using Windows 7

Remote Server Administration Tools (RSAT) for Windows® 7 enables IT administrators to manage roles and features that are installed on computers that are running Windows Server® 2008 R2, Windows Server® 2008, or Windows Server® 2003, from a remote computer that is running Windows 7.
Note: RSAT for Windows 7 can be installed ONLY on computers that are running the Enterprise, Professional, or Ultimate editions of Windows 7
RSAT includes the following tools and can be downloaded at the below location:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d
Server Administration Tools
  • Server Manager
Role Administration Tools
  • Active Directory Certificate Services (AD CS) Tools
  • Active Directory Domain Services (AD DS) Tools
  • Active Directory Lightweight Directory Services (AD LDS) Tools
  • DHCP Server Tools
  • DNS Server Tools
  • File Services Tools
  • Hyper-V Tools
  • Terminal Services Tools
Feature Administration Tools
  • BitLocker Password Recovery Viewer
  • Failover Clustering Tools
  • Group Policy Management Tools
  • Network Load Balancing Tools
  • SMTP Server Tools
  • Storage Explorer Tools
  • Storage Manager for SANs Tools
  • Windows System Resource Manager Tools
Download the tool and install it. Once installed navigate to control panel –>Programs and Features –> Turn Windows Features on or off. Select all or the required features in Remote Administration Tools section.
image image

Saturday, September 19, 2009

Change recovery model for all databases - sp_MSForEachDB

Very often I need to change the recovery model on development servers from Full -> Simple as there is no need to backup the transaction data(because it is dev server). To accomplish this, normally you would right click a database node in sql server management studio -> options -> change recovery mode. But since I like to use t-sql directly, I decided to dig through the documentation to find out if there is a better way to do this and there is a definitely one.
In SQL Server, there is an undocumented(which means, this may change anytime without notice) store procedured named sp_MSForEachDB in the master database and is used to execute a single t-sql statement. The syntax is something like this:

sp_MSforeachdb @command1, @replacechar, @command2, @command3, @precommand, @postcommand

and each parameter is defined below:

  • @command1 is of type nvarchar and is the first command to be executed
  • @replacechar is of type nchar and is the character in the first command which will be replaced by the Database name. By default it is '?'.
  • @command2 is of type nvarchar and is an additional command which can run against each database
  • @command3 is of type nvarchar and is same as @command2
  • @precommand is of type nvarchar and is a command which runs before running any command on each database
  • @postcommand is of type nvarchar and is a command which runs after all the commands are run on all databases
Except @command1, every other parameter is optional. Enough of theory, lets start using it. Below are few examples on how to use the stored procedure:
Print all the databasename names
exec sp_MSforeachdb 'PRINT ''[?]'''
Check orphans
exec sp_MSForEachDB '[?].DBO.SP_CHANGE_USERS_LOGIN ''REPORT'''
Change db owner to sa
exec sp_MSForEachDB 'USE [?]; EXEC SP_CHANGEDBOWNER ''SA'''
Print the physical names and attributes of files associated with the current database
exec sp_MSForEachDB 'USE [?]; EXEC SP_HELPFILE'
Run DBCC CheckDB on all the databases
exec sp_MSForEachDB "DBCC CHECKDB ('?')"
and finally to change the recovery model to simple for al l the databases, first run the below command and then copy the output and execute it
EXEC sp_MSForEachDB 'PRINT ''ALTER DATABASE [?] SET RECOVERY SIMPLE''; PRINT ''GO'''
Thats all for now and maybe next time, I will have the examples which use the additional parameters.

Tuesday, August 4, 2009

Office 2010 technical preview

I have been using Office 2010 technical preview for a few days now and its been good so far. I have been primarily using Word and Outlook. Microsoft has introduced quite a few new features with this version. I tried to summarize few of them here, but there might be many more features which I am not aware of.

Outlook:
  • Conversations (similar to gmail threaded conversations)
  • Quick Steps, which groups frequently used actions and also enables one to create a customized action
  • Cleanup tool, which is used to remove any redundant messages in a thread
  • Many different types of views have been introduced. Email can be grouped by Date, Conversation, To and many more...
  • MailTips - To prevent common faux pas scenarios
Word:
  • Integrated screen capture tool (similar to snip tool in vista)
  • Better Photo editing capabilities
Outlook has been very stable, but the zoom tool does not function properly. Word cannot open/edit documents in SharePoint (this is really painful but heh, this is technical preview - so stop complaining). I guess that's all I have for today and will post later as I continue using this tool.

Friday, June 26, 2009

Windows 7, Configuring

Last month I took the Windows 7 Configuring beta exam (70-680). Well, the results are out and I did pass the exam.

Tip for anyone taking an exam : Always read carefully the "Skills measured" section on the official exam's site. The exam preparation will almost be done when you go through that stuff.

Here is link to the exam preparation site:

http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-680&locale=en-us

Also, if you need more resources, check out the links below:

http://www.microsoft.com/learning/en/us/training/windows.aspx
http://www.techexams.net/forums/mcts-mcitp-windows-2008-general/42480-71-680-resources.html

Wednesday, May 20, 2009

Visual Studio 2010 and .NET FX 4 Beta out

Visual Studio 2010 and .NET FX 4 Beta has been released to MSDN subscribers...Check out the image below:



Time to pull up your sleeves and start testing it....

Monday, May 4, 2009

Error while importing a sitecollection in MOSS 2007

Recently got this error message while trying to import a site collection in MOSS 2007:

FatalError: Failed to read package file.
at Microsoft.SharePoint.Deployment.ImportDataFileManager.Uncompress(SPRequest request)
at Microsoft.SharePoint.Deployment.SPImport.Run()
*** Inner exception:
Failure writing to target file
at Microsoft.SharePoint.Library.SPRequest.ExtractFilesFromCabinet(String bstrTempDirectory, String bstrCabFileLocation)
at Microsoft.SharePoint.Deployment.ImportDataFileManager.<>c__DisplayClass2.<Uncompress>b__0()
at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.SharePoint.Deployment.ImportDataFileManager.Uncompress(SPRequest request)

Resolution: The error is because of insufficient space on c drive. Please clean up c drive run the import process again.

Thursday, April 16, 2009

IE 8 NTLM Authentication on Windows 2008

If you are using host headers to resolve the websites, then you might have seen the following issue with NTLM authenticated sites on IE 8. When you access the websites on a machine other than the one where it is hosted, you will be able to get to the sites.
Once you RDP onto the server and try to connect to the website, it will prompt for your windows credentials and will get an access denied message. This problem occurs because Windows includes a loopback check security feature that helps prevent reflection attacks on your computer(Probably some kind of security change has been made in IE8 related to this feature). Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.
Resolution: Disable the loopback check
  • Click Start, click Run, type regedit, and then click OK.
  • In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, point to New, and then click DWORD Value.
  • Type DisableLoopbackCheck, and then press ENTER.
  • Right-click DisableLoopbackCheck, and then click Modify.
  • In the Value data box, type 1, and then click OK.
  • Quit Registry Editor, and then restart your computer.