You can call an extended stored procedure from an SQL script file.
To call an extended stored procedure
Make sure the active project is set to the database project created in Registering an Extended Stored Procedure.
On the File menu, click New, and then click File.
In the New Files dialog box, click SQL Script File from the list of file types.
In the Name box, enter the name of your script file, and then click Open.
You now have a blank script file in the Visual C++ editor. If the extended stored procedure's name is xp_MyXp, the following code would cause the extended stored procedure to be executed:
В Copy Code
To run the script, right-click the editor window, and then click.
If the extended stored procedure produces any output, you can view the output in the Results pane.
SQLВ Server does not perform parameter checking on extended stored procedures. It is up to the caller of the extended stored procedure to know the required parameters and then pass them accordingly.
ConceptsExtended Stored Procedures
Adding Functionality to an Extended Stored Procedure
Registering an Extended Stored Procedure