Saben si existe alguna forma de obtener la creación de mi BD en un script SQL al igual que se hace con mysqldump en MySQL?
Lo he puesto de esta manera pero no se si sea correcto.
Código PHP:
CREATE TABLE [descargas] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[titulo] nchar(150) COLLATE Modern_Spanish_CI_AS NOT NULL,
[descripcion] nchar(500) COLLATE Modern_Spanish_CI_AS NOT NULL,
[direccion] nchar(300) COLLATE Modern_Spanish_CI_AS NOT NULL,
[autor] nchar(30) COLLATE Modern_Spanish_CI_AS,
[ecorreoautor] nchar(250) COLLATE Modern_Spanish_CI_AS,
[publicado] bit NOT NULL,
[cantidaddescargas] numeric(18, 0) NOT NULL,
CONSTRAINT [PK_descargas] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO
CREATE TABLE [directoriositios] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[categoria] nchar(50) COLLATE Modern_Spanish_CI_AS NOT NULL,
[titulo] nchar(150) COLLATE Modern_Spanish_CI_AS NOT NULL,
[descripcion] nchar(500) COLLATE Modern_Spanish_CI_AS,
[url] nchar(300) COLLATE Modern_Spanish_CI_AS NOT NULL,
[publicado] bit NOT NULL,
[cantidadvisitas] numeric(18, 0) NOT NULL,
CONSTRAINT [PK_directoriositios] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO
CREATE TABLE [frases] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[frase] nchar(1000) COLLATE Modern_Spanish_CI_AS NOT NULL,
[autor] nchar(35) COLLATE Modern_Spanish_CI_AS NOT NULL,
[fecha] datetime NOT NULL,
[publicado] bit NOT NULL,
CONSTRAINT [PK_frases] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO
CREATE TABLE [librodevisitas] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[nombre] nchar(35) COLLATE Modern_Spanish_CI_AS NOT NULL,
[ecorreo] nchar(500) COLLATE Modern_Spanish_CI_AS NOT NULL,
[sitioweb] nchar(1000) COLLATE Modern_Spanish_CI_AS,
[pais] nchar(150) COLLATE Modern_Spanish_CI_AS,
[comentarios] nvarchar(4000) COLLATE Modern_Spanish_CI_AS NOT NULL,
[imagen] nchar(25) COLLATE Modern_Spanish_CI_AS,
[fecha] datetime NOT NULL,
[publicado] bit NOT NULL,
CONSTRAINT [PK_guestbook] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO
CREATE TABLE [noticias] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[titulo] nchar(250) COLLATE Modern_Spanish_CI_AS NOT NULL,
[resumen] nchar(500) COLLATE Modern_Spanish_CI_AS NOT NULL,
[ampliacion] nvarchar(3000) COLLATE Modern_Spanish_CI_AS NOT NULL,
[imagen] nchar(30) COLLATE Modern_Spanish_CI_AS,
[autor] nchar(30) COLLATE Modern_Spanish_CI_AS,
[ecorreo_autor] nchar(250) COLLATE Modern_Spanish_CI_AS,
[fecha] datetime NOT NULL,
[publicado] bit NOT NULL,
[cantidadvisitas] numeric(18, 0) NOT NULL,
CONSTRAINT [PK_noticias] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO
CREATE TABLE [usuarios] (
[id] uniqueidentifier DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[nombre] nchar(10) COLLATE Modern_Spanish_CI_AS NOT NULL,
[ecorreo] nchar(250) COLLATE Modern_Spanish_CI_AS NOT NULL,
[pais] nchar(15) COLLATE Modern_Spanish_CI_AS,
[sitioweb] nchar(250) COLLATE Modern_Spanish_CI_AS,
[icq] nchar(20) COLLATE Modern_Spanish_CI_AS,
[aim] nchar(50) COLLATE Modern_Spanish_CI_AS,
[yahoo] nchar(50) COLLATE Modern_Spanish_CI_AS,
[msn] nchar(50) COLLATE Modern_Spanish_CI_AS,
[fechanacimiento] datetime,
[IPUsuario] nchar(15) COLLATE Modern_Spanish_CI_AS NOT NULL,
[fecharegistro] datetime NOT NULL,
[tipo] bit NOT NULL,
CONSTRAINT [PK_usuarios] PRIMARY KEY ([id])
)
ON [PRIMARY]
GO