Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rardales
Starting Member
32 Posts |
Posted - 2004-12-22 : 13:08:35
|
| Hi, guys. I'm new here and I'm still learning how to be a dba at my work. I have been instructed by the developers to run a stored procedure called p_bank_account. I also need to disable the triggers on the table before doing so. My question is, what is the correct sql syntax to run the stored procedure? I'd appreciate your help. Thanks. |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-12-22 : 13:17:28
|
| MyStoredProcedureName [... list of parameters, if any ...]will do. If its a statement WITHIN a multi-statement block you need (and IMO this is "better" syntax):EXEC MyStoredProcedureName [... list of parameters, if any ...]and it would be wise to specify the owner of the SProc:EXEC dbo.MyStoredProcedureName [... list of parameters, if any ...]If you are creating the SProc do NOT name it "sp_xxxx", use some other prefix ("sp_xxx" ones cause SQL to check master first, and if not found then check the current database)Kristen |
 |
|
|
cshekar
Starting Member
49 Posts |
Posted - 2004-12-22 : 13:32:30
|
| Here is the syntex you got do first disabel triggerALTER TABLE dbo.Currhold DISABLE TRIGGER ALLEXEC nameofProcALTER TABLE dbo.Currhold ENABLE TRIGGER ALLThat al you have do you will be finechandra shekar |
 |
|
|
rardales
Starting Member
32 Posts |
Posted - 2004-12-22 : 15:26:03
|
| Thanks guys. It worked. I appreciate your help. |
 |
|
|
|
|
|