All tables end up in one place.

Sep 14, 2010 at 2:43 PM

Hi,

  Something not right here - SLAM! seems to be using only the DataSchema and ConnectionString settings from the first of the DataMapping elements in my Slam.config.

It ignores DataSchema and ConnectionString settings on subsequent elements, lumping all tables together. I was expecting to be able to have various databases and schemas. Is this a known problem?

Developer
Sep 14, 2010 at 5:49 PM

Can we see your slam.config?

Sep 15, 2010 at 6:18 AM

Two DataMappings with different attributes, but tables all end up in Database=TeamCenter, Schema=SLAM

I've tried using the default (omitting) the connection string and swapping the order around. All tables end up under the Connection/Schema specified in the first DataMapping in the configuration.

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <ConnectionStrings Default="SLAM">
    <add Name="SLAM_TEAMCENTER" ConnectionString="Database=TeamCenter;Data Source=glkas0382\MSSQLSERVER2008;User Id=teamcenteruser;Password=teamcenteruser" />    
    <add Name="SLAM_SKATE" ConnectionString="Database=datahub_skate;Data Source=10.6.13.69\MSSQLSERVER2008;User Id=datahub;Password=datahub" />
    <add Name="SLAM" ConnectionString="Database=datahub_skate;Data Source=10.6.13.69\MSSQLSERVER2008;User Id=datahub;Password=datahub" />
  </ConnectionStrings>

  <DataMapping DataSchema="SLAM" ConnectionString="SLAM_TEAMCENTER">
    <List Site="TeamCenterCPs" Name="TeamCenterProjects" ActivationOrder="1">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
      </Fields>
    </List>
    <List  Site="TeamCenterCPs" Name="TeamCenterProjectGroups" ActivationOrder="2">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Members" SPType="Lookup" AssociatedList="TeamCenterProjects" AssociationName="GroupProjects"></Field>
      </Fields>
    </List>
    <List  Site="TeamCenterCPs" Name="StepGroups" ActivationOrder="2">
      <Fields>
        <Field Name="LIFECYCLESTEP" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="STEP_ORDER" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="LIFECYCLE_SCOPE" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
      </Fields>
    </List>
  </DataMapping>


  <DataMapping DataSchema="SLAM2" ConnectionString="SLAM_SKATE" >
    <List Site="SkillsTracking" Name="KeySkills" ActivationOrder="6">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Full Path" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Weighting" SqlType="float" SPType="Number" Required="true"></Field>
        <Field Name="SKILL_ID" SqlType="int" SPType="Number" Required="true"></Field>
      </Fields>
    </List>    
    <List Site="SkillsTracking" Name="KeyCompetencies" ActivationOrder="6">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Full Path" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Weighting" SqlType="float" SPType="Number" Required="true"></Field>
        <Field Name="COMPETENCY_ID" SqlType="int" SPType="Number" Required="true"></Field>
      </Fields>
    </List>    
    <List Site="SkillsTracking" Name="CompetencyExclusions" ActivationOrder="6">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Full Path" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Weighting" SqlType="float" SPType="Number" Required="true"></Field>
        <Field Name="COMPETENCY_ID" SqlType="int" SPType="Number" Required="true"></Field>
      </Fields>
    </List>
    <List Site="SkillsTracking" Name="SkillsExclusions" ActivationOrder="6">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Full Path" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Weighting" SqlType="float" SPType="Number" Required="true"></Field>
        <Field Name="SKILL_ID" SqlType="int" SPType="Number" Required="true"></Field>
      </Fields>
    </List>    
    <List Site="SkillsTracking" Name="Events and Comments" ActivationOrder="7">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="Description" SqlType="varchar(max)" SPType="Text" Required="false"></Field>
        <Field Name="EventDate" SqlType="datetime" SPType="DateTime" Required="true"></Field>
        <Field Name="Skills Impacted" SPType="Lookup" AssociatedList="KeySkills" AssociationName="SkillsImpacted"></Field>
        <Field Name="Competencies Impacted" SPType="Lookup" AssociatedList="KeyCompetencies" AssociationName="CompetenciesImpacted"></Field>
      </Fields>
    </List>
  </DataMapping>


</Configuration>

Thanks for any help.
Developer
Sep 18, 2010 at 12:32 AM

So, I understand what you are trying to do and it is not possible.  A DataMapping corresponds to a site collection and the connection string option provides a way to slam one site collection to one database and another site collection to another database.  What it does not provide is a way to slam different lists in the same site collection to different databases.

Sep 20, 2010 at 12:15 PM

Ahh! OK.

Thanks for the clarification.