Re: stored proc question

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

From: Uri Dimant (urid_at_iscar.co.il)
Date: 06/03/04


Date: Thu, 3 Jun 2004 16:09:18 +0200

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: stored proc question
    ... >use northwind ... >use pubs ... >> As I was implementing a sproc to one of my database, ...
    (microsoft.public.sqlserver.server)
  • Re: DetachDB problems - DMO
    ... comes up - I haven't run any program I know that hits the database. ... I also changed the default database to master ... No matter what - it seems like there is always a connection to the Northwind ...
    (microsoft.public.sqlserver.programming)
  • Re: Get custom database properties from an Access database
    ... I could start a local copy only if the master is unavailable. ... If my database gets hosed, or even the entire machine stolen, it doesn't matter, it's only a snapshot of the actual data and can be rebuilt any time it's necessary. ... Dim wshShell ...
    (microsoft.public.scripting.vbscript)
  • Re: Replication problems
    ... An error occurred while accessing the DHCP database. ... DHCP server event log for more information on this error. ... browser for the domain on transport NetBT_Tcpip_{99B638B5-2C0B. ... master browser is stopping or an election is being forced. ...
    (microsoft.public.windows.server.active_directory)
  • RE: SQL Server failing to start (directly effecting sales!!!) Error: 823, Severity:
    ... You should consider calling Microsoft Technical Support as your master ... They will want your SQL Server Errorlogs ... that the machine with the database has hardware that is failing. ... Even if you are planning to reinstall you should make a backup copy ...
    (microsoft.public.sqlserver.msde)