General information
Forum:
Microsoft SQL Server
Title:
Is aliasing possible for a database name?
I am working with a pre-existing sql script. The sql script gets called from an Exe that I don't have the source for (visual accountmate). The script is designed to be used 'generically' insofar as you use the executable program to specify the name of the target database to populate - in my case 'bss'.
But all the code in the script references a database name ms501 - e.g.
insert into ms501.dbo.arcust
When the script finishes executing - my database - bss - has been populated. Even while running - I see no reference to ms501 in enterprise manager. My question is: Is it possible to 'alias' the database name - not a table - the database. I am guessing that such a transact sql statement or sp - is called in the exe befor the sql script runs.
Otherwise, how would the system know to populate 'bss' when the references are to ms501.
TIA
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only