Monday, February 25, 2013

Step by step create Named Instance in SQL Server 2008 R2

To create a Named Instance in SQL Server 2008 R2, You need to follow below mentioned steps...

1. Go to your folder in machine where you have SQL Server 2008 R2 Setup files and file the setup.exe file this is executable file that is used to install SQL Server for you. Do right click on this file and select Run as administrator option from the appeared context menu as mentioned below in Screenshot.




2.  the moment you executed setup.exe file one splash screen will appear for you. There, you can find multiple option like Planning, Installation, Maintenance, Tools, Resources, Advance and last is Options

By Default Planning option is selected on the screen. To create new SQL Server Instance you need to select Installation option...




3. In Installation option, You need to choose  "New Installation or add feature to an existing installation." from the right panel of the screen. 


once you click on this option one splash screen will appear as mentioned below..


4. once current operation is completed, New screen will prompt you  to setup support rules..

Although, you can see all the details on the screen but in case of any fail you can see all details using button Show details >>. when you will click on this button you can see all the relevant details in appeared bottom section on screen.


 If all mentioned rules are passed click on "OK" button. on click of "OK" button again process splash screen will appear for you


In case of fail, You have to choose button Re-run to execute/Validate again..

5. Now your setup is ready to install setup support files on your machine. Press Install button 


You can check the process status as showing in below screenshot...


once process will completed you can see all the status in appeared screen. You should not worried about the warning if any.


So far, Everything looks good. I don't care about the warning..Thus, I'll go ahead and press "NEXT" button.

6. Here, You will get screen "Installation Type" Screen that will allow you to  create new SQL Server Instance for you. You have to select option "New Installation or add shared feature" from the given option on screen. Press "Next" Button


7. In this screen, You need to provide you product key in given input area. by default, it takes from last installation. 


Press "Next" button for next step...

8. In this screen you can find all the licence terms and conditions. Please read carefully and do accept for the successful installation.

Microsoft has given an option to send the feature usage information along with your hardware details to Microsoft.


9. Now you can setup the role for your  instance in below mentioned screen

Press "Next" button

10. In this step you can select or deselect the feature the available features for your instance...




I have selected All and pressed "Next" Button. This will take few minutes to install features for your instance and will notify with "Please Wait" message So please bear with this for the minute..



11. Next setup screen is related to "Installation Rules". Here, i can see all the details with the help of "Show Details >>" button. check the details for the error. If failed count is zero then press "Next" button happily..


12. This is the main step that you need to take for creating new instance in installed SQL Server 2008 R2. Select option "Named Instance" from the given option and provide the name as per your wish for new Instance.


In my case i have given name as "MYSQL" and clicked "Next" button 


13. The next step is related to your disk space requirement that is necessary to complete installation. you can see the details tin screenshot


Press "Next" Button from the bottom panel

14. In this step you can configure your server. Here, you can setup the user account for the SQL Server services and can setup the collation for the Server.


You can select the account as given in list or browse for the another user account..


find the collation setting here you can customize according to your need..Collation you need to change in case if you want to provide support for other language/special symbol those are not supported by current collation..

click on "Next" button after configured your Server for the created instance..

15.  This step allow you to use SQL Server in Mixed mode authentication. here you can provide your password for the administrator user for created instance and add current user as a administrator in instance.





Press "Next" button
16. Setup the Account for the Analysis service in Instance in this step and you can add default/current user 





17. You can do reporting service configuration in this step. If you don't have anything specific for the reporting section then you can choose native/default selected option.

To integrate reporting service with SharePoint you can use second option from the given.

and if you want to install only and don't want to configure select third option.


18. In this step you send your report server error to Microsoft by selecting the check box on screen.



Press "Next" Button

19.  In this section of installation, You can setup installation configuration rules..for more details click on "Show Details >>" button.. You can find details in below area of the screen ..


press "Next" button

20. Ready to Install SQL Server 2008 R2. click on "Install" Button


21. Now your installation will start after setting up all the configurations, roles and settings. Now you have to wait till the complete step.


22. After long waiting time, Your installation completed and you will happy to see below mentioned 
screen in front of you.
 

23. Now you can go to start and run SQL server management studio as Run as administrator

24. Click on "Connect Object Explorer" one dialog box will prompt you to setup your
  •  Server Type
  •  Server Name
  •  Authentication


provide the details in given input area and click on "Connect" button.


25. You will be happy to see your new instance this moment. Here you can create databases, Setup user accounts and more ...


I would like to thanks everyone who has go through this blog. Please provide your valuable feedback about the blog..

Thanks again :)

Enable HTML 5 in SharePoint 2010


In this blog, I would like to show you how we can enable HTML 5 in our SharePoint 2010 site.  

1. Create a new SharePoint 2010 project and use Empty SharePoint project template for your solution.




2. In SharePoint Customization Wizard, Give your site URL and select the Deploy as a farm solution from the below given options in dialog box.


3. Press the Validate button to validate the site URL. Once validation is done you will get another notification dialog box as depicted below.


4. Right click on solution and select the Add option from the context menu. Add a new Module from the SharePoint installed templates and named as "CustomHTMLMasterPage".



At the moment when you have added new Module "CustomHTMLMasterPage" in the solution, two more files have been added along with this module. Elements.xml,Sample.txt. You can delete Sample.txt file as it's not required in implementation.




5. Rename your feature name as "MyCustomMTML5MasterPage" and double click on the rename feature, Open the designer and change the Scope to site




6. Go to your hive 14 and  Do copy the V4.Master page from below mentioned path


C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL




paste the copied master page in Module and rename as "MyCustomHTML5MasterPage".


7. Set the URL for the Master page as given in below screenshot


URL - through this we will tell to SharePoint that how we will put Master page in Master page gallery
_catalogs/Masterpage is the Sharepolint Master page Gallery.


Type - this tells the SharePoint the name of the file that we are going to put in Hive 14 in Master Page Gallery 

8. Now do the modification in your Master page to enable HTML 5. find the below mentioned tag

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Simply remove everything behind “html” except the closing tag:
<!DOCTYPE html>



Your masterpage has a tag that pretty much says “Force this page to be rendered as an IE 8 browser would”. But IE 8 doesn’t support HTML 5 so get rid of it – delete the following line from your masterpage:
<meta http-equiv="X-UA-Compatible" content="IE=8"/> 


 

9. Right click on the feature and Add Event Receiver. 

In the added Event Receiver you will find the commented code. you need to implement below mentioned method inside this

a. FeatureActivated
b. FeatureDeactivating 


10. 



Friday, February 22, 2013

Rest WCF Service in SharePoint 2010

 Implement Rest WCF service in SharePoint 2010 

This is my first blog of my life so please bear with me for any mistake, I would like to show you how you can implement REST WCF service in your Sharepoint 2010 solution. Before going ahead, We need to intall CKSdev tool for SharePoint 2010 so we can use SharePoint Service factory to handle the instance of our service. 

Download CKSdev URL : http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/
http://cksdev.codeplex.com/

You can find more out CKSdev tool on http://blogs.code-counsel.net/Wouter/Lists/Posts/Post.aspx?ID=156

Now, Lets start the actual implementation

1.  Create new SharePoint 2010 project in visual studio 2010 and use "Empty SharePoint Project" template for this. We can give solution name like "SharePoint2010RestWCFServiceSolution".

2. In SharePoint Customization Wizard dialog box provide site URL in the give input area and select "Delpoy as a form solution" option. Then you can validate the given site url

3. Once validation will complete, you will get the "Connection Successful" popup on this screen. Press "OK" then You can press "Finish" button.

4. Create new SharePoint project using "Empty SharePoint Project" template and named as "WCFService" 


5. Now, open solution Explorer and do right click on your add WCF project.  Browse the context menu for Add option and explore the option. there, you will find "SharePoint Mapped Folder..." click on that and map the ISAPI folder from SharePoint hive 14 
6. Add a sub folder inside the ISAPI folder named as "WCFService"


7. Add a text file in the folder "WCFService" named as "Service.svc"
8.Right click on Service.svc file and choose HTML Editor by choosing Open with ..... from context menu

9. Now Add existing Service factory of the SharePoint to handle the instance of service for us

10. You need to generate your public token key of the assembly. To  generate token key you can follow below steps.
a. Click on tool menu in Visual Studio 2010
b. Go on External Tool and Click, One dialog box will appear infront of you then Add New title name as your wish
c. In command section C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\sn.exe
d.Set Arguments parameter as -Tp $(TargetPath)
e. Checked option "User outPut Window"

f. Now You will get you Get SN Key in tool Menu. Once you will click on this menu you can see your assembly public key in output window as depicted below
11. Add required assembly references in your solution like 

  • Microsoft.SharePoint.Client
  • Microsoft.SharePoint.Client.ServerRuntime
  • Microsoft.SharePoint.Client.Runtime
  • System.ServiceModel
  • System.ServiceModel.Web
  • System.Runtime.Serializatrion


12. Create a Folder named "WCFObject" in the WCFService solution and add a new class for your properties named as "clsMyProperties".



13. Create a interface in solution for the service named as IService.cs and write below mentioned code



14. Add a new Class named as Service.cs. Here, You can do implementation  interface method (OperationContracts)

Note : Use only 

15. Just build you project and deploy. Now you are ready to consume your created REST WCF service.

16. Add a Web part in "SharePoint2010RestWCFService" solution named as webpart simple.

17. Add Jquery.js file in your project in mapped Layout folder : download url http://jquery.com/

18. Add below mentioned line below the title tag in your web part

<script type="text/javascript" src="../_Layout/jquery-1.7.1.min.js"></script>

19. Create HTML structure as given below in screenshot.


20. Add below mentioned code in <script></script> tag.




21. build and deploy your the solution. 

22. Create a new page in the site named as "RestWCFpage" and add the create webpart from the custom categories in Insert tag of the page.

You can see the resultant data on UI.


for more details you can go through this URL http://msdn.microsoft.com/en-us/library/ff521581.aspx