Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In that case the answer most likely lies with the use of Sql Server SYNONYMS which are like aliases. This article <a href="http://www.mssqltips.com/tip.asp?tip=1076" rel="nofollow noreferrer">How and why should I use SQL Server 2005 synonyms?</a> has an introduction to them.</p> <p>You basically want to:</p> <pre><code>CREATE SYNONYM [dbo].[aspnet_CheckSchemaVersion] FOR [yourschema].[aspnet_CheckSchemaVersion] </code></pre> <p>For each affected object. This could be time consuming so this script will likely be of some benefit:</p> <pre><code>SELECT 'CREATE SYNONYM [dbo].[' + p.Name + '] FOR [' + s.Name + '].[' + p.Name + ']' FROM sys.Procedures p INNER JOIN sys.Schemas s on p.schema_id = s.schema_id </code></pre> <p>You need to copy paste the output of the above script into a new script window and execute that. So the idea is that you're using a script to generate other script commands. </p> <p>If you then execute the output of the above script, it will then create synonyms for all procedures in the db.</p> <p>So note: </p> <ol> <li><p>It assumes you have a db with only Application Services procs in it. If you have your own custom procs in there then you will have to add a WHERE conditional to filter for only Application Services objects which start with 'aspnet_' i.e. </p> <p>WHERE p.name LIKE 'aspnet_%'.</p></li> <li><p>This procedure assumes you've already done a find and replace to setup your new schema. i.e. generated a database script from the original db, done a find and replace on the dbo schema references, then delete/drop original dbo objects, and then run the amended script to get the [schema].[object] setup you want, and then finally use the scripts above.</p></li> <li><p>The performance cost of using SYNONYMs will be application dependant. </p></li> </ol> <p>Sounds like a lot of trouble but the whole procedure will probably take you 3-4 mins.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload