SybaseASE.info

Principales características incorporadas a
ASE 12.5.4 ESD #5

Este es un resumen de las nuevas características incorporadas a ASE 12.5.4 ESD#5. Esta información es extraída del README que acompaña a éste release. Vea también otras características incorporadas a ASE 12.5.4 y otras características incorporadas a ASE 12.5.4 ESD#4.


Característica

Descripción

Nuevo procedimiento almacenado del sistema sp_showtext El procedimiento sp_showtext puede regenerar texto de la tabla syscomments para objetos compilados como procedimientos, triggers y vistas, de tal manera que la salida corresponda de manera exacta a lo que el usuario escribió al crear el objeto. La salida puede ser generada con números de líneas, y también como un bloque contextual de texto SQL al rededor de una línea dada. La salida puede ser generada como un script DDL independiente que puede ser usado para volver a crear el objeto. Use sp_showtext sin argumentos para obtener ayuda de uso. Este procedimiento podría funcionar como una mejora de sp_helptext.

sp_showtext
go

Usage: sp_helptext <object name>
[, <start line> [, <number of lines> [, '<print options>'] ] ]

@objname - Name of compiled object local to current db.
@startline - Starting line number from which to generate SQL text
@num_lines - Number of lines to print. If 'context' is specified
in <print options>, treat this as the context block.
@printopts - Print options, see below.
@trace - Debugging traceflags for internal use.

<print options> is a comma-separated string of print option specifiers:
showsql : Print formatted SQL for compiled object.
linenumbers : Print line numbers
comments : Print line numbers in comments
ddlgen : Generate script as a DDL script to recreate the object.
context : Print <n> lines of context, starting from given starting line.
noparams : Suppress parameter information in output.

Examples:
-- Basic usage, without line #s.
sp_helptext sp_helptext, NULL, NULL, 'showsql'

-- Basic usage, with line #s right-justified.
sp_helptext sp_helptext, NULL, NULL, 'showsql,linenumbers'

-- DDL script with line #s in comments.
-- (Can use 0 instead of NULL.)
sp_helptext sp_helptext, 0, 0, 'showsql, linenumbers, comments'

-- Show (default) context block of 5 lines starting from line 44
sp_helptext sp_helptext, 44, NULL, 'showsql, context'

-- Show context block of 10 lines starting from line 44
sp_helptext sp_helptext, 44, 10, 'showsql, context'

-- Show context block of 10 lines starting from line 102, with linenumbers
sp_helptext sp_helptext, 102, 10, 'showsql,context,linenumbers,noparams'

Cambios al procedimiento almacenado del sistema sp_helptext La ejecución de sp_helptext sin parámetros da algunas guías sobre nueva funcionalidad incorporada a éste procedimiento almacenado:

sp_helptext
go

Usage: sp_helptext [ '@objname' [, @grouping_num] [, ... ] ]

-- Generate text for a given procedure in a group, use either one of:
sp_helptext grouped_proc, 3
sp_helptext 'grouped_proc;3'

-- To generate formatted SQL, use 'showsql' in @printopts, as:
sp_helptext sp_helptext, 5, 10, 'showsql'

Usage: sp_helptext <object name>
[, <start line> [, <number of lines> [, '<print options>'] ] ]

@objname - Name of compiled object local to current db.
@startline - Starting line number from which to generate SQL text
@num_lines - Number of lines to print. If 'context' is specified
in <print options>, treat this as the context block.
@printopts - Print options, see below.
@trace - Debugging traceflags for internal use.

<print options> is a comma-separated string of print option specifiers:
showsql : Print formatted SQL for compiled object.
linenumbers : Print line numbers
comments : Print line numbers in comments
ddlgen : Generate script as a DDL script to recreate the object.
context : Print <n> lines of context, starting from given starting line.
noparams : Suppress parameter information in output.

Examples:
-- Basic usage, without line #s.
sp_helptext sp_helptext, NULL, NULL, 'showsql'

-- Basic usage, with line #s right-justified.
sp_helptext sp_helptext, NULL, NULL, 'showsql,linenumbers'

-- DDL script with line #s in comments.
-- (Can use 0 instead of NULL.)
sp_helptext sp_helptext, 0, 0, 'showsql, linenumbers, comments'

-- Show (default) context block of 5 lines starting from line 44
sp_helptext sp_helptext, 44, NULL, 'showsql, context'

-- Show context block of 10 lines starting from line 44
sp_helptext sp_helptext, 44, 10, 'showsql, context'

-- Show context block of 10 lines starting from line 102, with linenumbers
sp_helptext sp_helptext, 102, 10, 'showsql,context,linenumbers,noparams'

Enlaces patrocinados


SybaseASE.info