SQL Compare Comandline Database information

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

SQL Compare Comandline Database information

Postby JDS44 » Fri Sep 20, 2013 10:54 pm

Is there anyway to get the database settings from the script generation through the command line interface similar to this?

USE [master]
GO
/****** Object: Database [DATABASE1] ******/
CREATE DATABASE [DATABASE1] ON PRIMARY
( NAME = N'DATABASE1', FILENAME = N'D:\\SQLData\\DATABASE1.mdf' , SIZE = 32182656KB , MAXSIZE = UNLIMITED, FILEGROWTH = 512000KB )
LOG ON
( NAME = N'DATABASE1_log', FILENAME = N'D:\\SQLData\\DATABASE1.ldf' , SIZE = 10369024KB , MAXSIZE = 2048GB , FILEGROWTH = 512000KB )
GO
ALTER DATABASE [DATABASE1] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [DATABASE1].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [DATABASE1] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [DATABASE1] SET ANSI_NULLS OFF
GO
ALTER DATABASE [DATABASE1] SET ANSI_PADDING OFF
GO
ALTER DATABASE [DATABASE1] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [DATABASE1] SET ARITHABORT OFF
GO
ALTER DATABASE [DATABASE1] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [DATABASE1] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [DATABASE1] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [DATABASE1] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [DATABASE1] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [DATABASE1] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [DATABASE1] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [DATABASE1] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [DATABASE1] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [DATABASE1] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [DATABASE1] SET DISABLE_BROKER
GO
ALTER DATABASE [DATABASE1] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [DATABASE1] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [DATABASE1] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [DATABASE1] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [DATABASE1] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [DATABASE1] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [DATABASE1] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [DATABASE1] SET READ_WRITE
GO
ALTER DATABASE [DATABASE1] SET RECOVERY FULL
GO
ALTER DATABASE [DATABASE1] SET MULTI_USER
GO
ALTER DATABASE [DATABASE1] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [DATABASE1] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'DATABASE1', N'ON'
GO
JDS44
 
Posts: 5
Joined: Fri Sep 20, 2013 10:11 pm

Postby Brian Donahue » Mon Sep 23, 2013 11:11 am

If the question is, how can you get SQL Compare to output a list of database creation options, SQL Compare doesn't compare and script these options. SQL Server Management studio does, when you tell it to script the database...
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby JDS44 » Wed Sep 25, 2013 12:39 am

I am using the command line interface to capture the files to check into my version control. I was hoping to automate that.
JDS44
 
Posts: 5
Joined: Fri Sep 20, 2013 10:11 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests

cron