Wednesday, February 1, 2012

Database Design : Smartly storing many user settings with Boolean values in a single value - Part 2

0 comments
If you have visited a previous post, where I have demonstrated how you can use bit masks to reduce your settings table.

Update:
There are situations where this solution will NOT do well. Example are cases where you are having many settings OR expecting more settings in future. After some point, your calculated integer or big integer will become very huge and may cause out of limit. so be careful while deciding to use this solution.

ALSO, in place of integers, you can use bitbinary datatype with appropriate length and use appropriate bitwise operators in sql server. That will surely gain more performance.

Thanks to Yougeshwar Patel, Team Lead, Silver touch technologies for bring this to my notice.

Sharepoint: Creating web application from existing content database

0 comments
There are situations where you want to propagate one SharePoint web application to some other farm/machine.   I feel the fastest way is to take content database backup and restore it in your destination farm. I have done so in last couple of weeks and I have leaned how to quickly do that.

Here are quick notes from my experience:
Pre-requisites:
I was provided with content database backup and source code. That makes be able to restore site and generate wsps from source code.

Creating  content database from backup:
Go to your database server and do following:

  • Create a blank database that will be used as content database 
  • Restore a database using content database back up from source farm.


Creating a web application:

  • Go to sharepoint central administration and create a new web application
  • While creating a new web application, use existing content database in database section
  • Sometimes if your database is too large, web application creation takes too long and times out. Don't worry at all. web application is still created successfully. It happened to me 4 times out of 5. 
Validating the web application:
  • Go to sharepoint central administration, click on application management. In "Databases" section you will find "Manage content databases"
  • Choose your application and it will show database status and number of site collections. If you are not sure how many site collections are there in backup, anything greater than 0 is good news.
Configure web application to work properly:
we are almost done now. Do following:
  • Go to sharepoint central administration
  • Click on "Application Management"
  • In "Site Collections" section click on "Change site collection administrators"
  • choose your web application set proper data in site admins.
Additional optional steps:
After performing all the above steps, it is still possible that you are not able to access your web application. 
  • Last thing to do is to install and deploy wsp by using stsadm or your favorite method. 
Conclusion:
It is always challenging to move applications from one farm to another. Specially when they are depending upon other service applications. In spent last two weeks to learn how to properly do that. I hope this will help you at some point during your sharepoint development.

Happy sharepoint administration!