Microsoft SSIS

OLE DB Destination Create a Database and Table

Create a Database and Table

  1. Create a Database
  • Open the SQL Server Management Studio.
  • Connect to the Local server (Localhost)
  • Expand the localhost
  • Right Click on the Databases
  • Select New Database
  • It should look like the following screen

  • Name the Database as SSIS Lessons

  • Click OK and you will see the database created


 

 

 

  1. Create Table in the Database (SSIS Lessons)
  • If you take a look at the Database (SSIS Lessons there won’t be any Table other than system created tables).

  • Now we will create a table (Copy and paste the following SQL to create a table). This will create an Employee table in SSIS Lessons Database.

     

    • USE
      [SSIS Lessons]
    • GO

     

    • /****** Object: Table [dbo].[Employee] 2:15:53 PM ******/
    • SET
      ANSI_NULLS
      ON
    • GO

     

    • SET
      QUOTED_IDENTIFIER
      ON
    • GO

     

    • CREATE
      TABLE
      [dbo].[Employee](
      • [BusinessEntityID]
        [int]
        NOT
        NULL,
      • [NationalIDNumber]
        [nvarchar](15)
        NOT
        NULL,
      • [LoginID]
        [nvarchar](256)
        NOT
        NULL,
      • [OrganizationNode]
        [hierarchyid]
        NULL,
      • [JobTitle]
        [nvarchar](50)
        NOT
        NULL,
      • [BirthDate]
        [date]
        NOT
        NULL,
      • [MaritalStatus]
        [nchar](1)
        NOT
        NULL,
      • [Gender]
        [nchar](1)
        NOT
        NULL,
      • [HireDate]
        [date]
        NOT
        NULL,
      • [VacationHours]
        [smallint]
        NOT
        NULL,
      • [SickLeaveHours]
        [smallint]
        NOT
        NULL,
      • [rowguid]
        [uniqueidentifier]
        ROWGUIDCOL
        NOT
        NULL,
      • [ModifiedDate]
        [datetime]
        NOT
        NULL,
    • CONSTRAINT
      [PK_Employee_BusinessEntityID]
      PRIMARY
      KEY
      CLUSTERED
    • (
      • [BusinessEntityID]
        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

     

  • Run the Query

  • Refresh the Tables from SSIS Lessons and expand dbo.Employee and you should the see the following:

 

 

 

 

 

 

 

 

 

 


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s