IF NOT EXISTS (SELECT 1
               FROM   SYS.tables
               WHERE  NAME = 'PG_FORN_INTEGRACAO_ARQ_FALHA')
  BEGIN
      CREATE TABLE [dbo].[PG_FORN_INTEGRACAO_ARQ_FALHA]
        (
           [CD_CTR]   [INT] IDENTITY(1, 1) NOT NULL,
           [CD_EMP]   [INT] NOT NULL,
           [CD_FORN]  [INT] NOT NULL,
           [CD_INT]   [INT] NOT NULL,
           [NM_ARQ]   [VARCHAR](100) NOT NULL,
           [FILE_ARQ] [VARBINARY](max) NOT NULL,
           [DT_HR]    [DATETIME] NOT NULL,
           CONSTRAINT [PK_PG_FORN_INTEGRACAO_ARQ_FALHA] PRIMARY KEY CLUSTERED ( [CD_CTR] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
        )
      ON [PRIMARY]
      TEXTIMAGE_ON [PRIMARY]
  END 
