Thursday, October 2, 2008

Computers are like bicycles for are mind

I was going through a book and saw the following phrase - "Computers are like bicycles for are mind". Initially confused, later intrigued and fascinated, I tried to google it and found the following youtube video....

The graph shown in the above video (probably taken decades back) is really interesting. Please do check it out when you get a chance.

Saturday, August 23, 2008

SQL Server 2008 RTM Installation Instructions

I have installed SQL Server 2008 on 64 bit Windows Vista. Below are the steps for the same.

Steps:

1. Insert the SQL Server 2008 Installation media and navigate to the install folder.

2. Run the setup.exe from the install folder. The installer checks for .NET Framework 3.5 sp1 and if not installed it will prompt you for installing it as show below.

3. Accept the license terms and proceed forward.

4. After .NET Framework is installed it will prompt for Windows Installer installation.

5. Once installed it will prompt for a system reboot. Please go ahead and reboot your system.

6. Once rebooted, please navigate back to the install folder and run the installer again. SQL Server 2008 has a nice Interface for installing different features. It has a total for six main tasks with each having different options.

7. Clicking on the Planning -> System Configuration Checker brings up a tool for checking the conditions that might prevent a successful SQL Server installation. This will help in determining for any potential problems while installing SQL Server 2008.

8. The rest of the screens show the different main tasks.

9. The options tasks determines the version for SQL Server to be installed. I will be installing the 64 bit version

10. Install the SQL Server by choosing Installation -> New SQL Server stand-alone installation

11. You can choose to install a trial version or enter the product key to install the version. I will installing the developer full version of the software.

12. Accept the license terms and install the support files when prompted.

13. Any potential problems that might occur are again displayed and this cast an issue with Windows Firewall was displayed

We will open up the ports later after the installation is done. The ports are mentioned at the end of this post.

14. Next you will configure the required features. Since I will be installing SQL Server 2008 on a machine which has SQL Server 2005 installed, the default instance cannot be used to install it. A new instance with a unique name needs to be used. I will be using MSSQLServer08 (note the warning which shows up if you use the default/already existing instance name).

15. Next you need to configure the service accounts and I choose to use the same account for all SQL Service services.

16. For each of the services, you will be able to configure the administrative accounts, installation paths as shown in the next screens…

17. Please restart the system after the installation is complete.

18. In order to enable remote connections to the SQL Server, the following steps need to be followed: Got to All Programs -> Microsoft SQL Server 2008 -> SQL Server Configuration Manager and enable the TCP/IP and Named Pipes protocol for the installed instance.

19. The following ports need to be opened up in the windows firewall:

Once the ports are up, you should be able to connect to SQL Server from a remote machine.

Service Name

Port Number

Database Engine

1433

SQL Browser

1434

SQL Broker

4022

Analysis Services

2383

Reporting Services

80/443

20. Open the SQL Server management studio and if you have SQL Server 2005 installed, the following message will come up. I did not want to import the settings from SQL Server 2005 and selected no to continue.

21. Next click yes to add the SQL Server 2005 management studio registered servers to 2008 Management studio.

You should be now ready to build and develop new databases....

References:

http://msdn.microsoft.com/en-us/library/ms143219.aspx

Sunday, May 11, 2008

Very Simple AJAX Example

Below is a very very simple AJAX example. This is intended for AJAX starters and is not for people who already know about AJAX.

Overview
AJAX - Asynchronous Java and XML has been the buzzword for the last couple of years. Though it is being used for a very long time now, the term AJAX was coined recently. AJAX is an attempt to give the web user an interactive, quick and rich user experience while navigating through your web application. Normally while requesting pages, every request causes a roundtrip to the server causing the page to freeze and prevents the user from doing any kind of interaction with the page. AJAX moves away from this feature where the user can continue working with the page while requests to the server happen in the background. A very good example of this is Google Maps.

The communication with the server is accomplished using XmlHttpRequest object. This object is responsible for opening the connection to the server and sending the request. Once request is complete and data is recieved, the page elements can be modified/updated as needed.
In the below example, when you hover over the label, the sendRequest method gets called which is responsible for opening the connection and sending the request to the "AjaxResponse.html" page on the server. This page just outputs the text "Hello World". The client callback function (callBackFunction()) gets triggered everytime the request state changes and raises an alert once the callback is complete.


   1:  <html xmlns="http://www.w3.org/1999/xhtml">
   2:      <head>       
   3:          <title>Basic AJAX Example</title>  
   4:          <script type="text/javascript">                
   5:          var xmlHTTP = null;        
   6:          //This method gets called everytime the request state changes
   7:          function callBackFunction()
   8:          {   
   9:              //check to see if the status of the request has changed
  10:              //other states are 0 = created but not initialized (open method not yet called),
  11:              //                 1 = initialized (sent method not yet called), 
  12:              //                 2 = sent request (response text and response body not available), 
  13:              //                 3 = recieved request (response text and response body not available),
  14:              //                 4 = all data has been recieved (response text and response body available)
  15:                  if(xmlHTTP.readyState == 4)
  16:                  {
  17:                      //check to see if the status is ok
  18:                      if(xmlHTTP.status == 200)
  19:                      {
  20:                          alert('call back completed and data is recieved from the server');                    
  21:                      }
  22:                  }
  23:          }
  24:      
  25:          //This method creates the xmlHTTPRequest object and sends the request
  26:          function sendRequest()
  27:          {
  28:              //check the browser and instantiate the appropriate object -- IE 7, Mozilla
  29:                  if(window.XMLHttpRequest)
  30:                  {       
  31:                      xmlHTTP = new XMLHttpRequest();
  32:                  }
  33:              //Previous versions of IE like IE 5 and old browsers
  34:                  else if(window.ActiveXObject)
  35:                  {
  36:                      xmlHTTP = new ActiveXObject(Microsoft.XMLHTTP);                    
  37:                      //alernative 
  38:                      //xmlHTTP = new ActiveXObject(MSXML2.XMLHTTP);                                
  39:                  }
  40:                  else
  41:                  {
  42:                      alert('Browser not supported');
  43:                  }                      
  44:              //open a connection using a xmlHttpRequest object
  45:                  xmlHTTP.open("GET","AjaxResponse.html", true);
  46:              
  47:              //set the method to be called when the request status changes
  48:                  xmlHTTP.onreadystatechange  = callBackFunction;
  49:              
  50:              //send the request
  51:                  xmlHTTP.send(null);            
  52:          }
  53:      </script>    
  54:      </head>    
  55:      <body>
  56:              <label id="label1" onmouseover="sendRequest();">Hover over me</label>
  57:      </body>
  58:  </html>
Again, this is a very simple example and you should be able to find more advanced and complicated examples on the web. The page elements can be modified using javascript to insert the response text on the calling page.
 

Sunday, May 4, 2008

MOSS Search error

Scenario: Multiple web front ends with MOSS search service(both query and index) running on one of them.Everything is fine on the web server which also host the moss search service. Specifically, search queries work fine without any errors.

Issue: The other WFE's(not hosting the search service) throw errors when trying to sort the search results. I repeat, the WFE's throw errors only when trying to sort the results. Otherwise they work fine. I can still do search on these servers, but when trying to sort the search bombs out.

The error message thrown is:

The specified network name is no longer available. (Exception from HResult: 080070040

The event view shows the following message (or something simillar):
The last query machine was taken out of rotation. Propagation may be neccessary. The query machine will be retried in 15 seconds again.
The uls logs show the following message :


0x80070040000000006B49C6F8d:\office\source\search\ytrip\tripoli\common\crequest.cxx246

0x80070040000000006B49C6F8d:\office\source\search\ytrip\tripoli\common\crequest.cxx246 _LokRelegateMachine just relegated the last query machine! - File:d:\office\source\search\ytrip\tripoli\icommand\qpcache.cxx,Line:1393

0xc000020c000000006B49C73Ad:\office\source\search\ytrip\tripoli\common\crequest.cxx244 In CRootQuerySpec::Execute - caught exception: 0x80070040, translated to: 0x80070040 - File:d:\office\source\search\ytrip\tripoli\icommand\qryspec.cxx,Line:767
Log Query: More Information: The specified network name is no longer available.

The same code gets executed on all the WFE's but the error does not happen on the WFE running the query service. Assuming there is an issue with the firewall, how does the search work on these WFE's (when no sorting is done) ? I have been trying to fix this error for sometime now, but didn't get enough time to research more. I will keep looking for more information on this error and post a resolution if I find one.

Monday, March 24, 2008

Who is a SharePoint Developer and What is SharePoint ?

I recently had a conversion with one of my developer friend (Dilbert) which was something like this:

Prashanth: Hey Dilbert! How r u?

Dilbert: I am fine Prashanth. How r u doing?

Prashanth: Never been so great. So what r u working on these days?

Dilbert: I have been developing .NET applications. What’s up with you?

Prashanth: I am working on SharePoint. I build and maintain SharePoint applications.

Dilbert: So you basically take care of document libraries. I heard that that SharePoint is a document repository.

Prashanth (fuming with rage...): I do little more than that and SharePoint is a LOT more than a document repository. It is one of the many, many features provided by SharePoint.

Dilbert: Oh is it? All this time, I was thinking of SharePoint as a SourceSafe. BTW, Do you get to work on .NET applications?

Prashanth(trying to control himself to not hit Dilbert...): SharePoint is built on the .NET platform. Microsoft Office Server 2007 is built on ASP.NET 2.0 and you can basically do whatever you do when developing your .NET applications. SharePoint provides you with a lot of click-create websites based on templates, which may otherwise take days to build. As a developer, SharePoint provides you a great object model which enables you do anything that can be done by the wizards/user interface. This helps in developing rich business applications.

Dilbert: So you basically create websites with a click. Where is the development then?

Prashanth: It’s true that most of the times, I use the built-in wizards to create the sites. But, lot of customizations also needs to be done depending on the business requirements. It involves developing web parts, master pages, user controls and basically everything a normal ASP.NET developer does. It also involves using XML to create/modify site definitions and site templates which is a major part of SharePoint Development. SharePoint provides tight integration with InfoPath and Excel services providing you with a great development environment. Just imagine the kind of development you can do with these tightly-coupled technologies !

Dilbert: What else is part of SharePoint?

Prashanth: SharePoint has a lot more features aimed at Collaboration, Business Intelligence, Content Management, Search for improving Productivity, Communication and for finding information very easily. To summarize:

  • Provides a simple, familiar, and consistent user experience -By tightly integrating with familiar client desktop applications, e-mail, and Web browsers
  • Boosts employee productivity by simplifying everyday business activities - By providing out-of-the-box workflows for initiating, tracking, and reporting common business activities such as document review and approval, issue tracking, and signature collection
  • Helps meet regulatory requirements through comprehensive control over content - By specifying security settings, storage policies, auditing policies, and expiration actions for business records
  • Effectively manage and re-purpose content to gain increased business value - By being able to submit documents for approvals and schedule deployments for intranet and internet
  • Simplifies organization-wide access to both structured and unstructured information across disparate systems - By giving users access to line of business data like SAP, Siebel and many other disparate content sources
  • Connects people with information and expertise -By providing enterprise search which is capable of returning back web pages, people information and documents
  • Accelerates shared business processes across organizational boundaries - By providing great smart electronic forms out of the box
  • Helps in sharing business data without divulging sensitive information
  • Provides a single, integrated platform to manage intranet, extranet, and Internet applications across the enterprise
Though I am not a SharePoint eulogist,working on it for sometime now has given me a better understanding and also the made me understand the essence of it. I hope Dilbert has a better understanding of it now.

Thursday, March 20, 2008

MCTS (70-630) - Configuring WSS 3.0

I recently took the 70-630 exam and passed. There were questions on Load Balancing like using unicast/multicast modes and a few other network related questions. I still have two more exams to take in the Office Sharepoint Server 2007 section and Iam looking forward to take them soon.....

Saturday, March 1, 2008

Attempted to read and write protected memory. This is often an indication that other memory is corrupt.

Wasn't MOSS 2007 sp1 supposed to fix this problem ? I have the MOSS 2007 sp1 installed on a 64 bit machine but still, one of the WFE throws this error. The actual server hosting the central admin is fine and does not show any indication of this error message. In case you come across the same error message, the workaround is to restart the spadmin service (WSS Admin Service) . Few of the searches on internet do refer to the Timer service, but for me restarting the admin service fixes the problem temporarily. Use the task scheduler to schedule a restart (NET Stop SPAdmin, NET Start SPAdmin) whenever event 6398 occurs.