This can be done programatically or declaratively. Below is section of code that do it programtically.

        <pre data-sub="prettyprint:_">
        private static void AddServices(WorkflowRuntime instance)
        String connStringPersistence = String.Format(
        "Initial Catalog={0};Data Source={1};Integrated Security={2};",
        "workflow", @".", "SSPI");

        new SqlWorkflowPersistenceService(connStringPersistence, true,
        new TimeSpan(0, 2, 0), new TimeSpan(0, 0, 5)));

        To do it declaratively, you need to change your code and the configuration file as well. Here is a section of code

        //here you use a constructor to specify the configSectionName
        WorkflowRuntime runtime = new WorkflowRuntime("WorkflowRuntime")


        You should add you configsection in the config file. Please note that the name of the section does not necessary to be "WorkflowRuntime"


        <section name="WorkflowRuntime"
        System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,
        PublicKeyToken=31bf3856ad364e35" />
        <WorkflowRuntime Name="ConsoleHostingManaged" >
        <!--Add parameters common to all services-->
        <add name="ConnectionString"
        value="Initial Catalog=workflow;
        Data Source=localhost;
        Integrated Security=SSPI;" />
        <!--Add core services here-->
        <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService,
        System.Workflow.Runtime, Version=3.0.00000.0,
        Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        UnloadOnIdle="true" LoadIntervalSeconds="5" />