Thursday, 4 September 2014

How to Create Content Organizer Rules in SharePoint 2010

SharePoint 2010 introduced a new feature called Content Organizer. This article will introduce how documents flow through the Content Organizer and how users can create and manage rules.
1. Content Organizer is a site level feature. Navigate to Site Actions => Site Settings => Site Actions =>Manage site features.
Manage site features
2. Activate the feature Content Organizer.
Content Organizer
3. Once this feature is activated, you will see two options, Content Organizer Settings and Content Organizer Rules, under the Site Administration section
Content Organizer Rules
4. A new document library called Drop Off Library will also be created in the location you will be adding documents to.
These documents will be moved to the target library based on Content Organizer rules.
Drop Off Library
5. A new content type will be created for Content Organizer rule as follows:
new content type will be created
6. Let’s look at the Content Organizer rules.
First navigate to Site Actions => Site Settings => Site Administration =>Content Organizer Rules.
Enter a name for your rule. In my example I call my rule “Example rule”.
In the Submission’s Content Type section select the Content type: Group and Type.
Submission Content Type
7. In the Conditions section, set the Property- based condition for the rule and select the Target location where you want to save the document based on the rules conditions.
Target location in conditions section
8. Click the OK button and a new rule will be created successfully.
new rule will be created successfully
9. Now let’s see if it works. Add a document to the Drop Off Library and enter the title Example rule, or the title that you created.
Example rule
10. If the rules condition is met, in my example “Title is equal to Example rule”, then a message will pop up as follows:
a message will pop up
11. The document will be saved in Shared Documents.
Shared Documents
12. If the condition is not met:
if the condition is not met
13. Then a similar message will pop up as follows:
similar message will pop up
14. But the document will be added to the Drop Off Library and NOT added to the Shared Documents library.
document will be added
document will be added2



Reference:

http://www.boostsolutions.com/blog/how-to-create-content-organizer-rules-in-sharepoint-2010/
 

Configure Send To connections in SharePoint 2010

In this article we will be seeing how to configure Send To connections in SharePoint 2010.



A connection is created for sending documents to the records center or to the document repository; it specifies the web application from which the document has to be sent and the document repository or records center to which documents will be sent.



SharePoint 2010 provides a great way to manage the documents. You have three Send To actions.

  • Copy
  • Move
  • Move and Leave a Link

1.gif



Copy:



User can create a copy of the document and send the copy to the other location.



Move:



User can move a document from one location to other location.



Move and Leave a Link:



User can move a document from one location to another location, by leaving a link at the current location indicating that the document has been moved and with the new location information.



Documents can be sent across a site, a site collection or even farms using the OfficialFile web service http://server/site Url/_vti_bin/officialfile.asmx.



2.gif



In the destination document repository or records center the Content Organizer feature should be enabled, then only documents can be sent. If you don't enable this feature you can't create a new Sent To connection.



Activate the feature Content Organizer:

  • Content Organizer is a site feature.
  • Go to Site Actions => Site Settings => site Actions =>Manage site features.
  • Activate the feature Content Organizer.

3.gif



Create a new Send to connection:
  • Go to Central Administration => General Application Settings =>External Service Connections =>Configure send to connections.

    4.gif

  • Select the web application from which the documents has to be sent.

    5.gif

  • In the "Send To Connections" option select "New Connection".

    6.gif

  • In the "Connection Settings" enter the display name.
  • In the "Send To URL" enter the web service url of the destination document repository or records center.
  • Send To URL:

    • In the destination document repository or records center, go to Site Actions => Site settings => Site Administration => Content Organizer settings =>Submission Points.

      7.gif

    • Copy the Web Service URL.

      8.gif
  • Click on "Click here to test" to test the url.
  • Select the "Sent To action ".
  • Enter the explanation for the connection.
  • Click on "Add Connection".
  • A new Sent to connection will be created.
  • Click Ok.

Testing the connection:

  • Go to the site from where you want to send the document.
  • Select the document, go to ECB drop down menu => Send To => Records center.

    9.gif

  • A message will pop up, click Ok.

    10.gif

  • Document has been sent to the destination successfully.

    11.gif

  • Now click on the document; you will be redirected to a page where you will see the link of the document current location.

    12.gif

  • Click on the link, it will be redirected to the destination location where the document is present.

    13.gif

    14.gif

    15.gif

    16.gif





How to Configure Send to Connections in SharePoint 2010

Document management is an important function in SharePoint, because many document libraries need to be created in different sites to store all kinds of documents. Due to some reasons, you may have to regularly copy some documents from different libraries to another same library. Fortunately, SharePoint provides Send to Connections to send connection to external document repositories.
Now, I will show you how to configure the Send to Connections in SharePoint 2010.

Step1. Go to Central Administration>General Application Settings>External Service Connections

configure send to connections in sharepoint 2010-4
Click Configure send to connections to open the configuration page. Select the web application for which you want to enable the service. Here, for example, select the 80 port. Then, add one connection and the two connections can be created. The URL and a display name for the target destination are required. Note that the display name should be a valid unique name. The format of Send To URL, however, has certain requirements. The following steps will show you how to get the correct URL.

Step2. Go to Site Action > Site Settings > Manage site features.

Activate Content Organizer.
configure send to connections in sharepoint 2010-6

Step3. Go to Site Settings > Site Administration.

Click Content Organizer Settings. Copy the web service URL as shown in the following screenshot.
configure send to connections in sharepoint 2010-5

Step4. Paste the copied URL to the field Send to URL and type a display name.

You don’t need to modify other settings. Just click add connection and a new connection Connection3 will be added successfully. Click OK to save above settings.
configure send to connections in sharepoint 2010-4

Step5. Open one document library and right-click the document you want to send.

Select Send To in the drop-down menu.
configure send to connections in sharepoint 2010-3

Step6. Click Connection3 in the sub menu and a confirmation dialog will pop up.

Click OK. After a while, it shows the operation result.
configure send to connections in sharepoint 2010-2
Note that by default settings, the document is copied to the Drop Off Library.
configure send to connections in sharepoint 2010-1
I hope the above steps would help you configure Send to Connections in SharePoint 2010 in an easy way.

Reference:

Good Article by

http://www.boostsolutions.com/blog/how-to-configure-send-to-connections-in-sharepoint-2010/
 

Sending Automated Job Email Notifications in SQL Server with SMTP

When you have automated backup jobs running on your database server, sometimes you forget that they are even running. Then you forget to check to see if they are running successfully, and don’t realize until your database crashes and you can’t restore it since you don’t have a current backup.
That’s where email notifications come in, so you can see the job status every morning when you are sipping your coffee and pretending you are working.

SQL Server provides a built-in method of sending emails, but unfortunately it requires you to have Outlook and a profile installed on the server, which isn’t necessarily the ideal way to send an email. Thankfully there is another method, that involves installing a stored procedure on your server that will allow you to send email via SMTP.

You will want to edit one line in the stored procedure to put the IP address of your SMTP server:
EXEC @hr = sp_OASetProperty @iMsg, ‘Configuration.fields(“http://schemas.microsoft.com/cdo/configuration/smtpserver”).Value’, ’10.1.1.10′
Install the stored procedure into the master database, so it can be easily used from wherever needed.
Open up the SQL Server Agent \ Jobs list, and select the properties for the job you are trying to create a notification for:

Click on the Steps tab, and you should see a screen that looks like this:

Click the New button to create a new job step. We will use this step to send the email notification on success.
Step Name: Email Notification Success
Enter this SQL into the Command window as seen below. You will want to customize the email addresses and message subject to match your environment:
exec master.dbo.sp_SQLNotify ‘server@localserver.com’,’admin@localserver.com’,’Backup Job Success’,’The Backup Job completed successfully’

Click OK and then click the New button again to create another step. This will be the failure notification step.
Step Name: Email Notification Failure
SQL:
exec master.dbo.sp_SQLNotify ‘server@localserver.com’,’admin@localserver.com’,’Backup Job Failure,’The Backup Job failed’
Now the idea is to make the items follow a specific workflow. First click Edit on step 1, and set the properties as shown here:

What we are saying is that on success, go to the success step, and on failure, go to the failure step. Pretty simple stuff.
Now edit the second step, the one labled “Email Notification Success”, and set the properties as seen here:

We are saying that if the notification job is successful, then just quit the job without running step 3. If we don’t specify this, then we will end up getting two emails, one with success and one with failure.
Now edit the third step, the one labled “Email notification failure”, and set the properties as seen here:

Now your job steps should look like this:

You should now have email notifications in your inbox for either success or failure.

Reference:

http://www.howtogeek.com/howto/database/sending-automated-job-email-notifications-in-sql-server-with-smtp/
 

Procedure to Create a Job Task in SQL Server 2008


Step 1 : Go To SQL SERVER Agent then seelct "Job" then right-click and select the "New Job" tab.

image1.gif

Step 2 : It will open a new window, provide a name (I used new job).

image2.gif

Step 3 : Go to "Steps"

image3.gif

Step 4 : Click on the "New" button, it will open a New window.

image4.gif

Step 5 : Specify a name.

image5.gif

Step 6 : Write a query on the Stored Procedure (with exec spname syntax) in the command box.

image6.gif

Step 7 : Click on "OK".

image7.gif

Step 8 : Go to the "Schedule" Tab.

image9.gif

Step 9 : Click on "New", that will open a new window.

image10.gif

Step 10 :
Specify a name.

image11.gif

Step 11 : Schedule the job as your need.

image12.gif

Step 12 : Click on "OK", this window will close.

image13.gif

Step 13 : You can set an alert and notification from the other tab if you need to. If not then click on "OK".

image14.gif

Step 14 : The new job will be shown in the job (folder) list.

image15.gif

Note : The step above can manage by the given query also, but it is a little complex for beginners.

USE
[msdb]GO /****** Object: Job [new job] Script Date: 05/03/2013 11:13:25 ******/BEGIN TRANSACTIONDECLARE @ReturnCode INTSELECT @ReturnCode = 0/****** Object: JobCategory [[Uncategorized (Local)]]] Script Date: 05/03/2013 11:13:25 ******/IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[Uncategorized (Local)]' AND category_class=1)BEGIN
EXEC
@ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'[Uncategorized (Local)]'IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback END
DECLARE
@jobId BINARY(16)EXEC @ReturnCode = msdb.dbo.sp_add_job @job_name=N'new job',
@enabled=1,
@notify_level_eventlog=0,
@notify_level_email=0,
@notify_level_netsend=0,
@notify_level_page=0,
@delete_level=0,
@description=N'No description available.',
@category_name=N'[Uncategorized (Local)]',
@owner_login_name=N'INVEERA\Admin', @job_id = @jobId OUTPUT
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback/****** Object: Step [step 1] Script Date: 05/03/2013 11:13:26 ******/EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'step 1',
@step_id=1,
@cmdexec_success_code=0,
@on_success_action=1,
@on_success_step_id=0,
@on_fail_action=2,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'TSQL',
@command=N'select * from table1',
@database_name=N'master',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollbackEXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollbackEXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'Run',
@enabled=1,
@freq_type=4,
@freq_interval=1,
@freq_subday_type=4,
@freq_subday_interval=1,
@freq_relative_interval=0,
@freq_recurrence_factor=0,
@active_start_date=20130503,
@active_end_date=99991231,
@active_start_time=0,
@active_end_time=235959,
@schedule_uid=N'8f4ea511-099c-4502-890b-3d5673f36b21'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollbackEXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollbackCOMMIT TRANSACTIONGOTO EndSaveQuitWithRollback: IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTIONEndSave:
GO



Reference:

Nice Article by Pankaj Pandey

http://www.c-sharpcorner.com/UploadFile/0fca19/step-by-step-procedure-to-create-a-job-task-in-sql-server-20/