Step 8: Create a sample HR database

 

Applies To: Forefront Identity Manager

The test lab guide scenarios use two BHOLD database tables that represent a corporate human relations (HR) database. Before installing BHOLD FIM Provisioning, you should create these two tables.

To create the sample HR database

  1. Log on to APP1 as CORP\Administrator.

  2. Click Start, click All Programs, click Accessories, and then click Notepad.

  3. In Notepad, type the following:

    USE [HR]  
    GO  
    
    /****** Object:  Table [dbo].[Emp]    Script Date: 02/09/2012 06:38:49 ******/  
    SET ANSI_NULLS ON  
    GO  
    
    SET QUOTED_IDENTIFIER ON  
    GO  
    
    CREATE TABLE [dbo].[Emp](  
    [Empid] [int] IDENTITY(1,1) NOT NULL,  
    [EmpName] [nchar](255) NOT NULL,  
    [EmpType] [nchar](255) NOT NULL,  
    [EmpFunction] [nchar](255) NOT NULL,  
    [EmpDepartment] [nvarchar](255) NULL,  
    [EmpAccountName] [nchar](255) NOT NULL,  
    [EmpEmployeeID] [nchar](255) NOT NULL,  
    [EmpEmail] [nchar](255) NULL,  
     CONSTRAINT [PK_Emp] PRIMARY KEY CLUSTERED   
    (  
    [Empid] ASC  
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]  
    ) ON [PRIMARY]  
    
    GO  
    
  4. Click File, and then click Save as.

  5. In the Save As dialog box, click Desktop in the left pane, in File name, type HREmp.sql, and then click Save.

  6. In Notepad, click File, and then click New.

  7. Type the following:

    USE [HR]  
    GO  
    
    /****** Object:  Table [dbo].[Org]    Script Date: 02/09/2012 06:39:33 ******/  
    SET ANSI_NULLS ON  
    GO  
    
    SET QUOTED_IDENTIFIER ON  
    GO  
    
    CREATE TABLE [dbo].[Org](  
    [OrgID] [int] NOT NULL,  
    [Organization] [nvarchar](255) NOT NULL,  
    [Parent] [nvarchar](255) NOT NULL,  
    [id] [int] IDENTITY(1,1) NOT NULL,  
     CONSTRAINT [PK_Org] PRIMARY KEY CLUSTERED   
    (  
    [id] ASC  
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]  
    ) ON [PRIMARY]  
    
    GO  
    
  8. Click File, and then click Save as.

  9. In the Save As dialog box, click Desktop in the left pane, in File name, type HROrg.sql, and then click Save.

  10. Close Notepad.

  11. Click Start, click All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio.

  12. On the Connect to Server dialog box, in Server type, click Database Engine.

  13. In Server name, click app1.

  14. In Authentication, click Windows Authentication, and then click Connect.

  15. In the left pane, right-click Databases, and then click New Database.

  16. In the New Database dialog box, in Database name, type HR, and then click OK.

  17. On the File menu, point to Open, and then click File.

  18. In the Open File dialog box, click Desktop, click HREmp.sql, and then click Open.

  19. In the SQL Editor toolbar, click Execute. Verify that the Messages tab contains Command(s) completed successfully.

  20. On the File menu, point to Open, and then click File.

  21. In the Open File dialog box, click Desktop, click HROrg.sql, and then click Open.

  22. In the SQL Editor toolbar, click Execute. Verify that the Messages tab contains Command(s) completed successfully.

  23. In the left pane, expand Databases, expand HR, and then expand Tables. Verify that dbo.Emp and dbo.Org are listed.

  24. Close Microsoft SQL Server Management Studio.

  25. Log off APP1.

Next step

To continue building the BHOLD Access Management Connector test lab, see Step 9: Create a FIM metaverse rules extension.