---
title: "sqlCallStoredProcedure"
canonical: "https://support.appfire.com/space/PSJ/15489650/sqlCallStoredProcedure"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | sqlCallStoredProcedure(datasourceName, procedureName, [...]) | **Package** | sql |
| **Alias** |  | **Pkg Usage** | callSP(datasourceName, procedureName, [...]) |

## Description

> Macro (excerpt)
> 
> Executes the stored procedure over the defined datasource name / JNDI datasource.

Executes the stored procedure over the defined datasource name / JNDI datasource.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| datasourceName | String | Yes | Datasource name / JNDI name. For Jira database, this is set to "jdbc/JiraDS" by default. |
| procedureName | String | Yes | Stored procedure name. |

## Return Type

**String []**

## Examples

### Example 1

Where showMessage() is a stored procedure existing in myDB database.

```
string [] results = sqlCallStoredProcedure("myDB", "showMessage");
```

### Example 2

Where addComponent(String id,  String name) is a stored procedure existing in myDB database.

```
string [] results = sqlCallStoredProcedure("myDB", "addComponent", "componentId", "componentName");
```


> ⚠️ To configure the data source, check the [SQL data sources](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=psj&title=SQL%20data%20sources&linkCreation=true&fromPageId=15489650) configuration chapter.


## See also

> Macro (contentbylabel)