Friday, July 24, 2009

Back up & Restore a farm by using the Stsadm command-line tool

Back up & Restore a farm by using the Stsadm command-line tool

Back up a server farm by using the Stsadm command-line tool

1. On the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

2. Type the following command, and then press ENTER:

stsadm -o backup -directory <\\server name\folder name>-backupmethod full

If the backup does not complete successfully, review the spbackup.log file.

Automate or delay backup of your farm

Create a batch file

1. Click Start, and then click Run.

2. Type notepad, and then click OK.

3. In Notepad, type the following text:

@echo off echo===========================================================

echo Back up the farm to C:\backup

echo ===============================================================

cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\BIN @echo off

stsadm.exe -o backup -directory "\backup" -backupmethod full

echo completed

4. Note :Change "C:\backup" and "\backup" to the name of your backup shared folder.

5. In Notepad, on the File menu, click Save As.

6. In the Save As box, select the folder where you want to keep your batch file.

7. Using the ".bat" file name extension, type the name of the file in the File name box, for example,backup_batch.bat.

8. In the Save as type box, click All files.

9. Click Save.

Schedule a backup

10. Start the Scheduled Task Wizard, and then click Next.

11. Click Browse, navigate to the batch file that you just created, and then click Open.

12. Type a name for your task, for example,backup_batch.

13. Select how often you want this task performed (for example, weekly), and then click Next.

14. To automatically perform this backup periodically, select an interval such as Weekly or Monthly. To perform this backup one time, or to delay a single backup, select One time only.

15. Choose a time and start date for your backup.

16. Type a name and password for a user, and then clickNext. This task will run as if it were started by that user.

17. Click Finish.

To configure advanced settings for the task, select theOpen advanced properties for this task when I click Finish check box in the final page of the wizard. This opens the properties dialog box for the task when you click Finish. You can then change the program being run on the Task tab, fine-tune the schedule on theSchedule tab, customize settings on the Settings tab, or set user and group permissions on the Security tab.

Restore a server farm by using the Stsadm command-line tool

1. On the drive on which SharePoint Products and Technologies is installed, at a command prompt, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

2. To obtain the backup GUID for the specific backup that you want to restore, type the following command, and then press ENTER:

stsadm -o backuphistory -directory

where Path is the Universal Naming Convention (UNC) path to the shared folder that contains the backup.

3. Type the following command, and then press ENTER:

stsadm -o restore -directory -backupid -restoremethod overwrite

where Path is the UNC path to the backup shared folder and GUID from backuphistory is the GUID of for the specific backup package that you want to restore. By using the overwrite value for the–restoremethod parameter, you are directing the old farm to be overwritten by the restored one. When you receive a warning that all selected items will be overwritten, type y and then press ENTER.

4. When prompted, type the user name and password for the Web application and content databases.

5. If the recovery completes successfully, the command window displays the following text:

Completed with 0 warnings.
Completed with 0 errors.
Restore completed successfully.
Operation completed successfully.

6. If the recovery does not complete successfully, refer to the sprestore.log file.

Wednesday, July 22, 2009

Upload multiple files link missing in wss 3.0

I just came across this issue with my manager and thought I would share what I learned.

If you choose to upload a document and do not see the link 'Upload multiple files…' below the textbox or upload link on the document library , there are a couple things to consider. Keep in mind.

To upload multiple files, you need to have Office 2003 installed on your machine.
Three are 3 dll's that are used as 'add-on's for SharePoint

Name.dll, Owsclt.dll, and Stsupld.dll

It is the stsupld.dll that is responsible for the multi file uploadcapability.

Make sure you have the stsupld.dll on your machine and properly registered. Try re-registering the dll if you are still having a problem or re-install Office 2007.

My thanks to brian who gave the above solution.

Friday, July 17, 2009

What is publishing??

Office SharePoint Server 2007 makes it easy for users to upload documents to document libraries and add tabular information to lists. However, when you want to publish longer or more unstructured information in a Web page format, and you want the content owners to be able to produce the pages themselves, you can use publishing pages to enable browser-based page editing by authorized contributors.
Each publishing page is associated with a page layout. The page layout controls the look and feel of the publishing pages that are created from it. It also defines the fields where contributors can enter various types of article content, such as article titles, graphics, quotations, and unstructured text.
Publishing pages use the publishing feature in Office SharePoint Server 2007. Publishing automates the workflow process, making it easy to use the browser to create new pages that are based on a page layout. When the page is created and edited, the content owner submits it for review. When the reviewer approves the article and publishes it, the page becomes visible to other users on the site.
Callout 1 A Web developer creates and customizes the page layout in Office SharePoint Designer 2007.
Callout 2 A content owner creates a new page based upon one of the available page layouts (in the browser).
Callout 3 The content owner completes the page in the browser, and then submits it for approval.
Callout 4 An authorized approver edits and then approves or rejects the article.
Callout 5 Upon approval, the article is published.

Tuesday, July 14, 2009

Site BackUp and Restore using STSADM command

Take backup using stsadm command


stsadm.exe -o backup -url <> -filename "<>" -overwrite

Ex: stsadm.exe -o backup -url http://idc-dk-is:801/sites/SalesLibrary -filename "E:\SP Backup\SalesLibraryBackUp.dat" -overwrite

Restore site using stsadm command

stsadm.exe -o restore -url <> -filename "<>" -overwrite

Ex: stsadm.exe -o restore -url http://idc-lt-i00142:20533/sites/saleslibrary -filename "D:\SP Backup\ SalesLibraryBackUp.dat" -overwrite

Thursday, July 9, 2009

Workflows Introduction In SharePoint

Types of Workflow

Workflows fall into one of two broad types, based on how the tasks are processed:

Sequential workflows: Typically depicted as a flowchart, in which the process has a beginning, a prescribed path (which could include parallel branches, criteria-based branching, and loops, but is nonetheless a defined path) and an end.It includes most of the typical structures found in a standard flowchart. Starting from the top, it is possible to trace the execution logic from beginning to end without much knowledge of even what the process represents.

State machine workflows: State machines are a significantly different beast from sequential workflow and often harder to bend your mind around. They are, however, much better at modeling complex human activities. Essentially, a state machine is based on the concept of conditions and transitions. A condition is a set of circumstances that indicate the current status or situation of the process being modeled. Events occur and cause a transition from one condition to another. Unlike sequential workflows, there is no prescribed path through the workflow. Instead, the path taken by the workflow is determined
by the events that occur as the workflow is processing.A generic sequential workflow has a prescribed path through the process.you can see that on the one hand, the representation of the workflow is much simpler; there are only two structures—states and events.

As alluded to earlier, and as indicated by the name, sequential workflows follow a sequence of prescribed steps to move from beginning to end. They are easy to understand and follow when presented graphically;


A sequential workflow works very well in many scenarios you are likely to encounter when implementing Workflow in Office 2007:
• Approval
• Translation
• Feedback
• Collaboration

As mentioned before, only two elements make up a state machine:
• States: A condition that represents the current status of your workflow
• Events: Responsible for managing the movement of your workflow from one state to another

Sequential vs. State Machine:

First, let’s present our scenario. We’ll start with the same basic scenario we saw earlier for the state machine—document approval. While not uncommon, a simple scenario such as this is not typical. More common is a situation in which complexity is added in the form of requirementslike those listed here:
• The document is time-sensitive so approvals need to happen in a timely fashion or be escalated to another approver.
• There are multiple potential approvers of a document, each with their own area of focus.For example, a document might need approval from several departments.
• Not all reviewers are created equal—some reviewers can trump another’s approval or rejection with their own super-approval or super-rejection.
• There are levels of approval, occurring either in series or parallel. What happens when a document is rejected by a second-level reviewer—does it go back to the first level, back to the original author, or continue on for a final review?
• A document requires a subset of the reviewers to approve or reject it before it moves on or falls back. For example, a document is sent to five reviewers and requires any three of the five to approve it before it can be published.
• The document is modified by one approver—does it go back to the original author, start the workflow over again, or just continue on?For our scenario, we’re going to take on just a few of these additional complexities. Our approval is going to require the fourth and fifth items from the previous list.

A complex process modeled as a sequential workflow we can describe the process as follows:
1. An author creates a document and initiates the workflow.
2. The manager reviews the document and takes one of three paths:
• Rejects document outright: The document is returned to the author as rejected.
• Approves document but makes some modifications: The document is returned to the author with suggested modifications.
• Approves document as is: The document moves on to the Product Management step.

If the document is returned to the author with suggested modifications, the author can accept the modifications, in which case the document moves on to product management,or else reject the modifications, in which case the document dies.

3. Product management has the same three options as the manager—reject, accept as modified, or accept as is. The only difference here is that anything except rejected requires a majority of the Product Management Committee. If less than the majority of the committee approves or approves with modifications, the document is returned to the author.
4. The Marketing Manager and Legal steps are similar to the Manager step as well, except that if they reject or accept with modifications, they can opt to send it back to anyone in the process earlier than them—depending on what their objection or suggestion is related to.A complex process modeled as a state machine May not seem any simpler. However, once you come to grips with how state machines are modeled, it is much easier to understand. Remember, too, that this is only a somewhat more complex process—fortunately, however, a state machine workflow does not get progressively more complicated as the process it models does. In many ways, once you get over the initial learning curve, very, very complex state machines are not much harder to follow than simpler ones.

• Waiting for Manager Approval
• Waiting for Product Management Approval
• Waiting for Marketing Approval
• Waiting for Legal Approval
• Waiting for Author Review and six events:
• OnDocumentSubmitted
• OnApproved
• OnRejected
• OnModified
• OnModificationsAccepted
• OnModificationsRejected

However, we’re going to begin our exploration of workflows in Office 2007 with sequential workflows for three reasons:
• Sequential workflows are what most people think of when they think about workflow.They are simpler to understand and so we can focus our time on understanding Workflow’s tools and constructs in Office 2007 rather than a new processing paradigm.
• The out-of-the-box workflows are all sequential models.
• The SharePoint Designer—the software formerly known as FrontPage only supports the creation of sequential workflows.As we delve deeper into Workflow in Office 2007.

Wednesday, July 8, 2009

SSRS with SharePoint

Nice Posts on SharePoint Integration with SSRS:
1. Initial use of SSRS
In this please note the "TargetDataSourcefolder" and "TargetReportFolder" URLs.

2. Integration of MOSS 2007 with SSRS

3. SharePoint Integrationwith SSRS 2007

SharePoint Books

I have found a link where somebody has posted all the books:

Books

How to Vidoes on SharePoint

Start of with the Videos on MSDN:

How Tos

Configuring email Server in SharePoint [Learning]

Download and Install hMailServer a free email Server


You can download here

1. Create a domain in hMailServer
2. Add AD accounts to the Domain
3. Set the host name in Settings -> Protocols->SMTP->Delivery of Email tab
4. Disable Auto-Ban in Settings->Advanced->Auto-Ban
5. Disable require SMTP Authentication [All Options] in Settings->Advanced->My Computer and Internet

SharePoint Interview Questions

SharePoint Interview Questions

• What is List Definition
• What is Site Definition
• What is Site ContentType
• What is Site Column
• What is Field
• How do you customize a List definition,Site Definition in Visual Studio
• Can you tell me a Scenario for FeatureStapling
• Can you modify the data in the database using BDC
• Scenario for developing custom list definiton,custo site content types
• Dual authentication using AD/LDAP
• How do you create custom field controls
• How do you create custom site definition and custom list definition
• How to create custom page layout and custom page content type
• Did u create custom page layout depending on custom content type?
• Diff between JQuery and AJAX
• How did u publish content to a publishing portal
• What is the basic content type associated with a document library
• Diff between Doc library and a list
• How does u create custom content type
• Diff between DDF file and Manifest file
• Why WSP tools
• How do you modify web.config file programmatically
• How can you add a new column to a list programmatically?
• Two diff departmens using same document library…But they have to see different content when they access the doc lib. How do you achieve it?
• Scenario like drop down menus---What will you use JQuery or AJAX
• What are Synchronous event receivers?
• What are Custom error logs?
• What is Feature stapling?
• What are the components in Site Definition?
• If a user has read only permissions for a list, but he has to enter some information say he is participating in a contest. How do you do this programmatically?
• How do you ensure that there is no error after you have done the necessary change?
• What is the best practice while you use the SPSite and SPWeb objects.
• When will you not use the “Using”?