Re: Identical database w/ identical stored procedures?



If you have 1 proc I think you will have to use dynamic SQL or a lot of
if's
What's the problem (since all table names are the same anyway)
scripting the proc out and running it on all your DB's how may db's are
you talking about anyway?
Running straigh sp's over dynamic sql is alway better


------------------------------------------------------------------------------------------
"I sense many useless updates in you... Useless updates lead to
defragmentation... Defragmentation leads to downtime...Downtime leads
to suffering..Defragmentation is the path to the darkside.. DBCC
INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with
you" -- http://sqlservercode.blogspot.com/

.



Relevant Pages

  • Re: Modelers / code generators
    ... > dynamic SQL versus stored procs. ... extensive calculations on a lot of data, often this is done better in the ... >> a proc with another one, requires you to remove the old proc, however that ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pass SQL function as stored procedure param?
    ... Build a dynamic SQL statement in the proc and execute via sp_executesql ... Build the SQL statement in your application rather than use a proc. ... WHERE ItemID = @ItemID ...
    (microsoft.public.sqlserver.programming)
  • Re: Variable-named database in a proc
    ... dynamic SQL has been the best method. ... Back in they day, when commodity HW boasted 2GB HDDs and PI 133 MHz CPUs, I used a similar method for linked server queries across a set of sub-servers where the names were only known at run time based on the value of a partial logical key referencing a partition table - giving the query reasonable performance for PK entity select & update across a multi-TB database. ... But we need something to replace the old dbname ... your proc is. ...
    (microsoft.public.sqlserver.programming)
  • Re: create/using type dynamically
    ... Now i am looping thru the keys in a proc .Now for a key, ... values of that key want to use dynamic SQL and FORALL to update that ... In engineering the hardest part ... Please state the business case or business problem you are trying ...
    (comp.databases.oracle.misc)
  • Re: how to pass list of string to stored procedure
    ... use it on the database side. ... Dynamic SQL is one common kludge that ... leads to SQL injection attacks -- google articles on this problem. ...
    (comp.databases.sybase)