1. sp_configure
Definition: displays or changes the global configuration settings of the current server.
Main result set:Config_value, Configuration value of configuration options; Run_valueRunning value of configuration options;If the two are inconsistent, the configuration is successful but does not take effect.
Note: It is useful. Use sp_configure to display or change server-level settings. To change the database level settings, useAlter Database. To change the settings that only affect
SQL Server uses Trigger to monitor the stored procedure change script instance, trigger Stored Procedure
The following triggers are used to monitor changes to stored procedures.Create a monitoring table:
Create table AuditStored
This statement applies to ms SQL Server 2000/2005Set
Quoted_identifier
On
Go
Set
Ansi_nulls
On
Go
--
Getcontentbyprocedurename '[DBO]. [stored procedure name]'
Create
Procedure
Getcontentbyprocedurename
(
@ Procedurename
Nvarchar
(
500
))
As
If
Exists
(
Select
*
From
DBO. syscomments
Where
ID
=
Obj
Label:debugging directly in the databasedebugging directly in the database is the simplest way to debug a stored procedure in SQL Server 2005. In the visual Stuido IDE, you can choose to step into a stored procedure, and then you can step through a single statement, and you
Tags: Oracle plsql procedure function in out Pl-sql storage functions and stored proceduresORACLE provides the ability to store PL/SQL programs in a database, and can run it from anywhere. This is called a
Method 1: Use the output parameter
Use adventureworks;GoIf object_id ('production. usp_getlist', 'P') is not nullDrop procedure production. usp_getlist;GoCreate procedure production. usp_getlist @ Product varchar (40), @ Maxprice money, @ Compareprice money output, @ Listprice money outAsSelect P. Name as product, P. listprice as 'list price'From production. product PJoin production. productsubcategory sOn
Repeated use. Stored procedures can be reused to reduce the workload of database developers.(2) Improve performance. Stored procedures are compiled when they are created and are not recompiled for future use. Normal SQL statements need to be compiled once per execution, so using stored procedures improves efficiency.(3
The primary key of the table must be the ID column. [ID] int identity)
1. Stored ProcedureSelect top page size *From testtableWhere (id not in(Select top page size * Page IDFrom tableOrder by ID ))Order by ID
2. cursor Stored ProcedureCreate procedure sqlpager@ Sqlstr nvarchar (4000), -- query string@ Currentpage int, -- page n@ Pagesize int -- number of line
SQL: Oracle11g table, view, stored procedure structure query, oracle11g Stored Procedure
-- GetTablesSELECT owner, object_name, created FROM all_objects WHERE (owner in (select USERNAME from user_users) AND object_type = 'table' order by owner, object_name; -- GetTableColumn
This statement applies to ms SQL SERVER 2000/2005SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- GetContentByProcedureName '[dbo]. [stored procedure name]'
Create procedure GetContentByProcedureName
(@ ProcedureName nvarchar (500 ))
As
If exists (select * from dbo. syscomments where id = object_id (n'' + @ Proced
option can be returned to Exec[ute]. Use the output parameter to return information to the calling procedure. The Text, ntext, and image parameters can be used as OUTPUT parameters. The output parameter that is used with the Export keyword can be a cursor placeholder.8.RECOMPILE: Indicates that SQL Server does not cache the schedule for this procedure, which is
The following articles mainly describe how to create and call Oracle procedure in pl/SQL. This article describes the actual procedure of Oracle procedure through the actual operations of the relevant application code, the following is an introduction to the main content of t
Procedure and function programming procedure in PLSQL: Stored procedure eg: createorreplaceprocedurep -- here is the difference between iscurso and plsql
Procedure and function programming procedure in
The following articles mainly use relevant Code to introduce the actual application solution for creating and calling Oracle procedure in pl/SQL, if you want to create Oracle procedure in pl/SQL and call it, the following articles
Label:--Maintenance Database----Stored procedure (procedure)----Overview: A stored procedure for SQl serve is a collection of one or more T-SQL statements。 Common program code Snippe
debugging stored procedures in PLSQL, of course, also applies to functions.The software version and environment used in this article:Server: Oracle 8.1.2 for Solaris 8PL/SQL developer 4.5PreparationsBefore you begin, assume that you have installed the Oracle Database Service, created a database, and configured a listener to allow the client to connect; at the same time, you have a development client with a
How do I retrieve the result set of a stored procedure (store Procedure) in a SQL Server query statement (Select)? (2006-12-14 09:25:36)Other descriptions of the same nature as this issue include:How do I get an execution result recordset for another stored
Define a stored procedure as follows:CREATE proc [dbo]. [Test1] @id Intasselect 1 as ID, ' ABC ' as name union ALL select @id as ID, ' zzz ' as nameReturns two rows of data.Now you want to call the stored procedure with the SQL statement and put the table he returned into th
1. Define a SQL class HelloDROP JAVA SOURCE newxzxt. " Hello "; CREATE OR REPLACE and RESOLVE JAVA SOURCE NAMED newxzxt. " Hello "as import java.lang.*; public class Hello {public static string say (String args) { System.out.println (args); return args; } } /2. The SQL class above the stored
Debug oracle stored procedures in PL/SQL Developer.Author: iamlaosong
Alas, in the real world, I used Toad and used dbms_output.put_line to debug the stored procedure. I only thought it was inconvenient. After PL/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.