Re: stored proc question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rob (anonymous_at_discussions.microsoft.com)
Date: 06/03/04


Date: Thu, 3 Jun 2004 06:44:45 -0700

Thanks Uri... that was very helpful. Do you know how to
UNMARK the same object that had been marked as a system
object?

- Rob.

>-----Original Message-----
>Rob
>See if it helps you
>use master
>create table t(c1 varchar(50)) insert t values('master')
>go
>create proc sp_test as select * from t
>GO
>use northwind
>create table t(c1 varchar(50)) insert t values
('northwind')
>use pubs
>create table t(c1 varchar(50)) insert t values('pubs')
>use pubs
>exec sp_test --returns 'master'
>use master
>exec sp_MS_marksystemobject sp_test
>use pubs
>exec sp_test --returns 'pubs'
>use northwind
>exec sp_test --returns 'northwind'
>
>
>
>
>"Rob" <anonymous@discussions.microsoft.com> wrote in
message
>news:17a1d01c44969$be77c310$a401280a@phx.gbl...
>> Hello:
>>
>> As I was implementing a sproc to one of my database, I
>> found a need to run the same sproc against another
>> database on the same server. Is there a way to run, lets
>> say, a generic sproc against the database of your
choice,
>> without having to create that same sproc on all of your
>> databases?
>>
>> Thanks.
>
>
>.
>



Relevant Pages

  • Re: sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.
    ... Master, msdb, Northwind and pubs are set to Simple recovery. ... the transaction log can not be backed up, which causwes the error you see. ... looking in database maintenance plans history i ...
    (microsoft.public.sqlserver.server)
  • Re: stored proc question
    ... use northwind ... exec sp_test --returns 'master' ... > As I was implementing a sproc to one of my database, ...
    (microsoft.public.sqlserver.server)
  • Re: Sample ETL Advice
    ... possible to use Northwind or pubs, since neither database seems to be ... included with SQL 2005? ...
    (microsoft.public.sqlserver.dts)
  • Re: Sample ETL Advice
    ... Thank you for the data generator. ... possible to use Northwind or pubs, since neither database seems to be ...
    (microsoft.public.sqlserver.dts)
  • Re: reading a SQL log file
    ... thnx...but it can not read other database other than ... Northwind and pubs ...
    (microsoft.public.sqlserver.security)