Hi,

I use Microsoft SQL and MSSQL supports multiple queries.

Here is the first 50 lines of a script which is 18839 lines long. I can
read this db creation script into PHP via file_get_contents() and then
issue it to the DB using mssql_query() or odbc_execute() if the site is
using ODBC (I prefer to use ODBC as there is no issue with null text
columns which exist with the MS SQL dblib).

Hope this is of some use.

Regards,

Richard Quadling.

/****** Object:  Database CONTRACTS    Script Date: 21/12/2004 08:24:48
******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name =
N'CONTRACTS')
        DROP DATABASE [CONTRACTS];
CREATE DATABASE [CONTRACTS]  ON (NAME = N'CONTRACTS', FILENAME =
N'd:\mssql7\DATA\CONTRACT_9.DAT' , SIZE = 2958, FILEGROWTH = 10%) LOG ON
(NAME = N'CONTSLOG', FILENAME = N'd:\mssql7\DATA\CONTSLOG_9.DAT' , SIZE
= 56, FILEGROWTH = 10%);
exec sp_dboption N'CONTRACTS', N'autoclose', N'false';
exec sp_dboption N'CONTRACTS', N'bulkcopy', N'false';
exec sp_dboption N'CONTRACTS', N'trunc. log', N'true';
exec sp_dboption N'CONTRACTS', N'torn page detection', N'false';
exec sp_dboption N'CONTRACTS', N'read only', N'false';
exec sp_dboption N'CONTRACTS', N'dbo use', N'false';
exec sp_dboption N'CONTRACTS', N'single', N'false';
exec sp_dboption N'CONTRACTS', N'autoshrink', N'false';
exec sp_dboption N'CONTRACTS', N'ANSI null default', N'false';
exec sp_dboption N'CONTRACTS', N'recursive triggers', N'false';
exec sp_dboption N'CONTRACTS', N'ANSI nulls', N'false';
exec sp_dboption N'CONTRACTS', N'concat null yields null', N'false';
exec sp_dboption N'CONTRACTS', N'cursor close on commit', N'false';
exec sp_dboption N'CONTRACTS', N'default to local cursor', N'false';
exec sp_dboption N'CONTRACTS', N'quoted identifier', N'false';
exec sp_dboption N'CONTRACTS', N'ANSI warnings', N'false';
exec sp_dboption N'CONTRACTS', N'auto create statistics', N'true';
exec sp_dboption N'CONTRACTS', N'auto update statistics', N'true';
if( (@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion &
0xffff >= 724) )
        exec sp_dboption N'CONTRACTS', N'db chaining', N'false';
use [CONTRACTS];
/****** Object:  Trigger dbo.aa_costcentre_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_costcentre_t]') and OBJECTPROPERTY(id,
N'IsTrigger') = 1)
drop trigger [dbo].[aa_costcentre_t];
/****** Object:  Trigger dbo.aa_costheader_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_costheader_t]') and OBJECTPROPERTY(id,
N'IsTrigger') = 1)
drop trigger [dbo].[aa_costheader_t];
/****** Object:  Trigger dbo.aa_nl_acc_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_nl_acc_t]') and OBJECTPROPERTY(id, N'IsTrigger') =
1)
drop trigger [dbo].[aa_nl_acc_t];
/****** Object:  Trigger dbo.aa_category_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_category_t]') and OBJECTPROPERTY(id, N'IsTrigger')
= 1)
drop trigger [dbo].[aa_category_t];
/****** Object:  Trigger dbo.aa_majorheading_t    Script Date:
21/12/2004 08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_majorheading_t]') and OBJECTPROPERTY(id,
N'IsTrigger') = 1)
drop trigger [dbo].[aa_majorheading_t];
/****** Object:  Trigger dbo.aa_nl_tran_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_nl_tran_t]') and OBJECTPROPERTY(id, N'IsTrigger')
= 1)
drop trigger [dbo].[aa_nl_tran_t];
/****** Object:  Trigger dbo.aa_pl_acc_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_pl_acc_t]') and OBJECTPROPERTY(id, N'IsTrigger') =
1)
drop trigger [dbo].[aa_pl_acc_t];
/****** Object:  Trigger dbo.aa_pl_anal_t    Script Date: 21/12/2004
08:24:56 ******/
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aa_pl_anal_t]') and OBJECTPROPERTY(id, N'IsTrigger')
= 1)
drop trigger [dbo].[aa_pl_anal_t];

-----Original Message-----
From: Jakub Vrana [mailto:[EMAIL PROTECTED] 
Sent: 14 February 2005 10:21
To: phpdoc@lists.php.net
Subject: Re: [PHP-DOC] cvs: phpdoc /en/security database.xml

Derick Rethans wrote:
> Other database do support it though, so we need to have something in 
> our manual about it.

Can you please point me which databases support it (at least some
example)? I used to work with MySQL, PostgreSQL and SQLite and none of
them support it.

Jakub Vrana

Reply via email to