ODBC Server Reference Manual
Transact-SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
4-4
Specifying the Database Location
Specifying the Database Location
With SQL Server, you specify the database location as a parameter of the CREATE
DATABASE statement. In programs written for the NonStop ODBC Server, however,
the location is implied in the structure of the database name you specify.
The following statement, written for the NonStop ODBC Server, creates a NonStop
SQL/MP catalog called PERSNL on the disk volume DISK01 on the node called \TEST:
create database test_disk01_persnl
In a program written for SQL Server, you would specify the database location using the
ON parameter. The following statement, written for SQL Server, creates a database,
PERSONNEL, and allocates three megabytes to it on FILE1 and two megabytes to it
on FILE2:
create database personnel
on file1 = 3, file2 = 2
Batch Queries
The NonStop ODBC Server supports batch queries.
The following table summarizes how batches differ in SQL Server and the NonStop
ODBC Server.
If any statement in a batch contains a syntax error, none of the statements in the batch
is executed.
CREATE TABLE – x
CREATE VIEW – x
DROP DATABASE – x
DROP INDEX – x
DROP TABLE – x (if the table is audited)
DROP VIEW – x
TRUNCATE TABLE – x
x Indicates the statement can be used in a user-defined transaction
– Indicates the statement cannot be used in a user-defined transaction
Feature In SQL Server In the NonStop ODBC Server
Can you execute USE
DATABASE inside a batch?
Does not take effect until
the batch is executed
Takes effect immediately
Are Control-of-Flow
statements supported?
Yes No
Table 4-1. Statements Allowed in User-Defined Transactions (page 2 of 2)
Statement Allowed in SQL Server Allowed in NonStop ODBC Server