Tuesday, April 21, 2015

Power of Compact & Repair

In this blog we will see, how “Compact and Repair” Command can help to prevent and correct the problems that sometimes affect a database file.
Why we use compact and repair command?
When we create a database then, it occupies a certain amount of space in the memory. In this image suppose blue circle is the full memory and red part shows the occupied memory by database.

When we remove an object from the database then some amount of memory occupied by the database will be free and when we add any new object in the database then, the size of database file will be increase.Sometimes the empty space cannot be accessed by the computer as shown in below image.

In other words you can say the other applications cannot use this memory space for their uses.To overcome from this situation we compact the database. As you can see, space occupied by database is now lesser than previously.
After the execution of this command the memory will be free for other resources.
Before using this command, do these important things: If you are going to use compact and repair command then you have to take care of the following things.
  1. Take Backup: During repair process, MS Access may truncate some damaged data from the table. Sometimes it is possible to recover this data from the updated backup. If you use the database on the daily basis then, you should take the backup of database according to your schedule. You can go on the File tab, click Save & Publish then under Advanced option you will get the option for Back Up Database.
  2. Automatically: If your database is shared by other users on the network then you should set your database to automatically compact and repair.For this first go on File tab then, click on the Options. In the Access Options dialog box, click Current Database. Under the Application Options, select Compact on Close check box.
  3. Need to know about system recovery errors table: Any objects that cannot be recovered in Access database repair process are noted in a table named MSysCompactErrors. We can see the datasheet view of this table and determine which object you want to import from the database backup into required database.
  4.  Permission to run this command: If you are using the earlier version of MS Access then, you might be unable to compact and repair the database on your own. If you need the sufficient permission for compact and repair your database. You can contact your work-group administrator for assistance.

From the second point it is clear that, we can also use the command Compact & Repair automatically. Now we will see how it works manually. you can run this command when your database is open or close. A shortcut for  compact & repair command can also be created for a particular database.
  • If database is open: In the following figure you can see the option of Compact & Repair. If database is open then you can directly use this option.


  • If database is close:Start Access but do not open your database. Go to the Info option then, click on the Compact & Repair. After this you will see the following dialog box and you can select the database according to your choice.

Wednesday, May 15, 2013

What is Guest Link feature in SharePoint Online 2013?


The Guest Link feature of SharePoint 2013 allows you to share individual documents, files and folders with out side users. You can invite people from outside your organization to collaborate and share documents. There are two ways to share documents, with or without creating user account. When you want to share individual document then you don't need to create an account but if you want to share a whole site then creation of account is necessary.

Before sharing a document you need to know who are external or outside users. External user is that user to whom you grant access to your SharePoint Online site and who is not a member of your organization. Here I am describing External user rights:

What an external user can do?
  1. External users can can view and edit documents using Office Web Apps.
  2. External users can see the contents of subsites also for which they are invited.
  3. External users can use the rights of SharePoint Online customers who has invited them to collaborate on a site.
What an external user can't do?
  1. External users are not allowed to create ID on MySite and SkyDrive Pro.
  2. External users are not allowed to edit their own profiles.
  3. External users are not allowed to see the company news feeds.
  4. External users can't use Search service of SharePoint.
  5. External users can't be an admin.
How to share a site?
To share a site you first need to send an invitation to the external user with whom you want to share your site. When that user accept your invitation, he can log in by using either Office 365 user ID or Microsoft account. You can also decide what type of permission you want to assign to the eternal user. For security purpose, create another site that you will use only for external sharing and also assign unique permission to this site. To share a site you need to have full permission of it. Follow below step to share a site:
  1. First make sure external sharing feature is turned on.
  2. Now go to the site that you want to share and click Share.
  3. Type the email id of the external user in the Share dialog box.
  4. Type an invitation message.
  5. You can also assign a group to the external user, for that click Show options and select the group.
  6. Click Share.
Note: The invitation that you send to an external user is valid only for 7 days, after that it will expire. You need to resend the invitation if the user does not accept in 7 days.

How to share a document?
There are two methods of sharing a document with external user one is by requiring a sign in and another by sending a guest link. To share a document you must have full permission of the site.
  1. Select the document that you want to share with external user.
  2. Click the ellipses...and then go to Property dialog box and click Share.
  3. Type the email ids of external user or users in share box.
  4. Now assign the permission to external users. For example if you want the user to only view the document then select Can View.
  5. Type an invitation message.
Perform one of the following task:
  • If you want to invite user by sign in method to view or edit the document then select the Require sing-in checkbox.
  • If you want to invite user by sending a guest link to view or edit the document the clear the Require sign-in checkbox.
    7.   Click Share.

Best practices for sharing documents and sites

When you share your whole site with external user then that user will become the member of the site. He will be able to view or edit the documents. If you share your team site with external user then he will be able to view the contents of team site including subsites. To prevent external user from gaining access to your confidential data you can create a subsite of your team site and create unique permission for external user.

Be careful while sharing your documents using anonymous guest link because external user to whom you have send the invitation might share the link with others. So avoid sharing confidential data using links instead use sign in method.

Although this is a great feature but you should also consider security requirement and sensitivity of information before sharing.

Thursday, May 9, 2013

How to repair damaged MyISAM tables?

-->
MyISAM tables in MySQL becomes corrupted due to various reasons like hardware fault, sudden system shutdown or server crash. Due to corruption you may lose all your hard earned data. So it is important to deal with corruption properly. First consider the symptoms of corrupt table:

When MyISAM tables got damaged its queries abort unexpectedly and following errors occur:
  1. Can't find table_name. MYI
  2. Record file is crashed
  3. table_name .frm is locked against changes
There are four steps to repaircorrupt MyISAM tables.

Note: Stop the MySQL server (mysqld) before repairing the tables.

Step 1: Check table: Execute below command to check table for corruption
myisamchk *.MYI
Or
myisamchk -e *.MYI

If above command shows error then go to next step. In case myisamchk crashes while checking errors then go to step 3.

Step 2: Easy safe repair: Execute below command to repair the index file. This command will be able to repair your table only if your data file is in working condition.
Myisamchk -r -q table_name

If it fails to repair your table then follows below steps
  1. First backup your datafile.
  2. Run below command to remove incorrect and deleted rows from the datafile. This command will also reconstruct the indexes.
Myisamchk -r table_name
  1. If command does not repair your table then run below command. It uses safe recovery mode.
Myisamchk –safe -recover table_name

Step 3: Difficult repair: Try this step only if your index file contain wrong information or destroyed (16 KB block) or index file is missing. You need to create a new index file. Follow below steps:
  1. First move the data file to a safe location.
  2. Create new data and index file. Here is how:
shell> mysql database_name
mysql> Set autocommit=1;
mysql> TRUNCATE TABLE table_name;
mysql> quit
Now copy the old data file back into new datafile. Again try myisamchk -r -q command. It should work now. You can also use REPAIR TABLE command.

Step 4: Very difficult repair: Try this step only if .frm description file has also got crashed. Usually this doesn't happen. Follow below steps:
  1. Restore your description file from backup and go to step 3.
  2. If backup is not available then create a copy of your corrupt table in another database. Now move the .MYI index file and .frm description file to crashed or corrupt database and also remove the new datafile. Now go to step 2 and try to reconstruct index file.


Wednesday, April 24, 2013

How to recover SharePoint database when STSADM MergeContentDBs cause corruption


STSADM MergeContentDBs command allows users to move a site collection from one content database to another. You have to specify the source and destination parameter properly. In some situations, STSADM MergeContentDBs command fails to work properly and cause database corruption. Due to failure of this command both source and destination database may also got damaged. STSADM MergeContentDBs command fails when there is high load on SQL Server or high user traffic. When you run this command on database whose size is larger than 10GB then also there are high chances of database corruption.

Solution:
To resolve the issue, keep following points in mind while using  STSADM MergeContentDBs command:
  1. Make sure to backup the source and destination database before using the  STSADM MergeContentDBs command
  2. Do not cancel the operation in middle of server that is running SQL Server.
  3. Since  STSADM MergeContentDBs command put extra load on server that is running SQL Server so using it during non production hours.
The above steps are basically prevention steps that will help you in avoiding corruption when next time you use this command but if your database already got corrupted due to failure of  STSADM MergeContentDBs command then you can try a good third party SharePoint recovery software. There are many professional third party tools available online that can easily repair damaged SharePoint database and also provides free demo version.

Monday, April 22, 2013

How to improve SharePoint performance?

MS SharePoint has become the most popular product of Microsoft because so many organizations are adopting it. But the point of concern is that SharePoint performance is not that good because of  heavy use of SQL Server database. There are many reasons behind SharePoint slow performance like incorrect configuration, BLOB storage issue, large media files and many more. Here are some tips on improving SharePoint performance.


  1. Use different networks: Since SharePoint require SQL Server for performing most of its job, this increases load on server. So you should use different physical network for SQL and front end server to separate the user and database traffic.
  2. Reduce server load: A server farm basically consists of front end server, index application and SQL Server. Index server is responsible for processing both search and user queries. It also increases load on index server. You should add one more server for retrieving the search queries.
  3. SQL Server maintenance: In order to improve the efficiency of read/write operations SQL server maintain its own indexes. Gradually these indexes got fragmented and degrade SharePoint performance. So it is important to perform SQL maintenance operations including index fragmentation.
  4. Optimize server performance: If there is heavy load on server then it will affect the performance of SharePoint. Make sure to follow the best practices for server as recommended by SharePoint engineering team.
  5. Page customization: Although SharePoint Designer is a great tool for administrators but page customization can decrease the performance of SharePoint. In page customization, every time a page request occurs, entire content including inline code is retrieved. So with thousands of page request, this back and forth of database degrade SharePoint performance. So to avoid this problem, it is administrator duty to use page customization only when it is necessary.
  6. IIS compression: You can reduce the payload of HTTP response by using IIS compression. This will reduce the data size that is send to the client, resulting shorter load time.
Related Posts Plugin for WordPress, Blogger...