#### SQL DBMS

An SQL Database Management System is a common example of a client/server software package. A standard SQL DBMS will include an SQL server application that handles all the actual work of building and working with databases and database data. The DBMS will also include at least one set of SQL client software (one seat) that can connect to the SQL server over your network. SQL client software usually consists of, at the very least, an SQL statement editor that you can use to write and execute SQL statements, and an underlying communications layer that works with the SQL server application over the network.

When you execute an SQL statement, the client software passes the statement to the communications layer, which sends the statement over the network to the server software. The SQL server analyzes the statement, performs the requested operation, and returns any data requested to the client software. If the server returns any data, the client software displays the data to the user.

##### Stored procedures

In addition to the common relational database attributes (tables, fields, records, etc.) many SQL DBMS systems support stored procedures. A stored procedure is a compiled SQL program consisting of one or more SQL statements. A stored procedure can be used to define an SQL query that you can use over and over again. Furthermore, variables, conditional expressions, and variable arguments can be defined in the stored procedure so that you are prompted to provide information before the procedure is executed.

Since stored procedures can return a result set, they can provide a specific set of data when executed. In fact, Seagate Crystal Reports allows you to execute a stored procedure on an SQL database and use the returned data to design a report. If the stored procedure is designed to prompt a user for information to base its query on, Seagate Crystal Reports will prompt you for that information when you select the stored procedure for your report. See Selecting an SQL stored procedure and changing parameters.

Note:

- Only one stored procedure can be used per report or subreport (a report containing subreports can have a different stored procedure for the main report and each subreport).
- Stored procedures cannot be used in combination with other database objects.
- Linking is not possible for stored procedures.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com