Sunday, February 19, 2012
How to stop SP ?
in vb.net , I can use EXIT sub or exit fucntion , so. does any code i can
put to make sp do nothing (or comment all the code instead ')
Thanks
private function...
exit function
..my code
end privateHi
RETURN is what you are looking for.
CREATE PROCEDURE ABC
AS
--The SP will exit on the next line, reporting success
RETURN 0
--Other code goes here.
GO
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:#USWIilIFHA.1304@.TK2MSFTNGP10.phx.gbl...
> My aims is ..i want the SP do nothing . even some one call the SP
> in vb.net , I can use EXIT sub or exit fucntion , so. does any code i can
> put to make sp do nothing (or comment all the code instead ')
> Thanks
> private function...
> exit function
> ..my code
> end private
>
How to stop running subscriptions??
Does the "CancelRunningJobs.rss" script included in the samples do this?
I have tried searching on here and on google and have not come up with much.
Thanks,
NickI did cancel a long runnig transactions with restarting the SQL Server
agent,
this ended up the Subscription and redering part of about 250 subscriptions.
HTH, JEns Süßmeyer
--
http://www.sqlserver2005.de
--
"Nick P @. INDATA" <NickPINDATA@.discussions.microsoft.com> schrieb im
Newsbeitrag news:152BEDCE-FC64-41DD-905C-B7C8727E441F@.microsoft.com...
> Is there any way to stop a subscription once it has started?
> Does the "CancelRunningJobs.rss" script included in the samples do this?
> I have tried searching on here and on google and have not come up with
> much.
> Thanks,
> Nick
How to stop running DTS package if my view return zero record?
Hi everyone,
I've created a DTS package runs on every day and night, but now my boss was asking if I can insert an exception code to check the view file.
So.. I need help from you guys, cause I don't know How.
This is my DTS description.
My DB will generate a view called "Calls to Add", then it will run the Transform Data Task and insert into a txt file. once it finished, it will run the Batch file. that is it.
Now My boss wants me to add a checking code between "View to Txt" procedure. If the view has no record inside, than the DTS package should stop and not run.
BUT How? Can someone please help? Thanks
Kelvin,
This is an SSIS forum (not DTS).
Sorry.
|||Not sure, and I second Rafael's comment, but can you put in a row counter against the view and test it's result?|||I did, but I don't know how to put it into a package.?
Please Help......
|||Kelvin Y wrote:
I did, but I don't know how to put it into a package.?
Please Help......
If you are using SSIS, and not DTS, you can use an Execute SQL task in the control flow to query the view and capture the row count. (select count(*) from view) Then in the control flow you can test the variable that was previously populated with the Execute SQL task for a condition of != 0, and if so, continue processing.|||
OK. here's another idea....slightly different from Phil's. Give it a shot. (using SSIS again)
The SQL task has a property "ForceExecutionResult" that you can configure using exprssions. Get the count from the view exactly like Phil explained above but instead of using a conditional split, use the value to set the exprssion to Success or Failure.
You wont be able to log an approiate error message though.
P.S: For some reason the use of the word "e x p r e s s i o n" is causing my post to be truncated. So, had to use "exprssion"
|||Thanks everyone, but I can't find the "ForceExecutionResult" property.
Can you tell me where is it?
Thanks
|||
If you dont have experience with exprssions, I'd suggest using Phil's approach.
But to answer your question, you can find the property under the "misc" category about 6th in the list.
|||Thanks everyone, it works now. Thanks for helping me out.|||Kelvin Y wrote:
Thanks everyone, it works now. Thanks for helping me out.
Please mark this thread as answered.
How to stop reporting services deploy
server 2000.
I have a solution with a web application project and a reporting
services project.
When I start the web application project in the IDE, the reports are
automatically deployed to the report server.
I would like to stop this for two reasons: it takes too long, and my
reports are actually not ready to deploy.
Does anyone know how I can stop my reporting services project from
deploying when I run another project in the same solution?On May 15, 3:03 pm, wozza <Woz...@.gmail.com> wrote:
> I am using visual studio 2003 with sql reporting services for sql
> server 2000.
> I have a solution with a web application project and a reporting
> services project.
> When I start the web application project in the IDE, the reports are
> automatically deployed to the report server.
> I would like to stop this for two reasons: it takes too long, and my
> reports are actually not ready to deploy.
> Does anyone know how I can stop my reporting services project from
> deploying when I run another project in the same solution?
Does anyone have an answer?|||On May 15, 3:03 pm, wozza <Woz...@.gmail.com> wrote:
> I am using visual studio 2003 with sql reporting services for sql
> server 2000.
> I have a solution with a web application project and a reporting
> services project.
> When I start the web application project in the IDE, the reports are
> automatically deployed to the report server.
> I would like to stop this for two reasons: it takes too long, and my
> reports are actually not ready to deploy.
> Does anyone know how I can stop my reporting services project from
> deploying when I run another project in the same solution?
I can't believe I'm the only person who has ever encountered this.
Does anyone know how to work around this?|||On May 15, 3:03 pm, wozza <Woz...@.gmail.com> wrote:
> I am using visual studio 2003 with sql reporting services for sql
> server 2000.
> I have a solution with a web application project and a reporting
> services project.
> When I start the web application project in the IDE, the reports are
> automatically deployed to the report server.
> I would like to stop this for two reasons: it takes too long, and my
> reports are actually not ready todeploy.
> Does anyone know how I can stop my reporting services project from
> deploying when I run another project in the same solution?
OK, I've found the answer, which I'll document here for prosperity.
Right click the solution and go properties.
go configuration properties/configuration
reporting services projects have a "deploy" check box. Uncheck to stop
deployment.
How to stop report parameter taking default value
1) Company - values from a query including NULL for ALL companies - no
default value
2) From date - has default value
3) To date - has default value
My problem is that the report runs automatically when launched. Even though
there is no default value specified for the Company parameter it takes the
NULL value.
Is there any way to change this to force the Company prompt to display a
<select a value> and allow selection of one of the options?
--
Magendo_man
Freelance SQL Reporting Services developer
Stirling, ScotlandHello magendo_man,
Instead of letting it take the value or NULL... change to: (CompanyID =@.Company OR @.CompanyID = "ALL"). Then in your query that supplies the
company names add a UNION SELECT "ALL". Don't specify a default for that
parameter.
Hope that helps!
Cheers,
Kathy
"magendo_man" wrote:
> I have a SSRS2000 report with three parameters:
> 1) Company - values from a query including NULL for ALL companies - no
> default value
> 2) From date - has default value
> 3) To date - has default value
> My problem is that the report runs automatically when launched. Even though
> there is no default value specified for the Company parameter it takes the
> NULL value.
> Is there any way to change this to force the Company prompt to display a
> <select a value> and allow selection of one of the options?
>
> --
> Magendo_man
> Freelance SQL Reporting Services developer
> Stirling, Scotland
How to stop replication of a database?
is being usefor replication. But in the replication monitor there is no
publisher. I removed it. How can I stop this db from being used for
replication and then drop it?
Thks for any help
RD
Hi,
To remove replication, you can use Disable Publishing and Distribution
Wizard in SQL Server Enterprise Manager.
The Disable Publishing and Distribution Wizard in enterprise manager is
written to handle
this situation, and will remove all the replication settings.
To get to the wizard:
- Right click on the Replication folder in the server tree (or any child
node of the Replication folder)
- Select Disable Publishing and Distribution
- Go ahead in clicking next in the Wizard
After the removal, you could try dropping your database
Thanks
Hari
SQL Server MVP
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>
|||Try sp_removedbreplication. See SQL Server Books Online for more
information. Also use sp_dboption to mark the database as not published, if
needed.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>
|||Thanks to you both
RD
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>
How to stop replication of a database?
is being usefor replication. But in the replication monitor there is no
publisher. I removed it. How can I stop this db from being used for
replication and then drop it?
Thks for any help
RDHi,
To remove replication, you can use Disable Publishing and Distribution
Wizard in SQL Server Enterprise Manager.
The Disable Publishing and Distribution Wizard in enterprise manager is
written to handle
this situation, and will remove all the replication settings.
To get to the wizard:
- Right click on the Replication folder in the server tree (or any child
node of the Replication folder)
- Select Disable Publishing and Distribution
- Go ahead in clicking next in the Wizard
After the removal, you could try dropping your database
Thanks
Hari
SQL Server MVP
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>|||Try sp_removedbreplication. See SQL Server Books Online for more
information. Also use sp_dboption to mark the database as not published, if
needed.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>|||Thanks to you both
RD
"Bob" <bdufournosp@.sgiims.com> wrote in message
news:%23LRchFGmFHA.1948@.TK2MSFTNGP12.phx.gbl...
> When trying to drop a test database I get an error can't delete because it
> is being usefor replication. But in the replication monitor there is no
> publisher. I removed it. How can I stop this db from being used for
> replication and then drop it?
> Thks for any help
> RD
>