Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sql Server 2005 Database Names

Posted on 2012-04-04
4
Medium Priority
?
378 Views
Last Modified: 2012-06-21
I know this is highly unorthodoxed but here is the scenario

I have a DB named RCSQL.  This RCSQLDb is used by a purchased 3rd party software called Zoll and clients access the software via remote desktop.

I have another piece of Software that integrates with ZOLL called Ezpcr to provide other fuctionality not provided by ZOLL to the client company.  Its Database is PCR

However Ezpcr, software combines data in tables in stored procedures from the two databases CAD and PCR.

Now this web based software was never meant to be taken out of house.  Meaning installed as a standalone piece and was meant to been done via hosting for other companies.

I have to now create it so it can standalone on another server where it accesses the client's own copy of the ZOLL database.  Their Database is called CAD and it is referenced through installs on different machines with the client software.

So know I have a SQL Server with PCR DB and CAD DB for the Zoll Software.  But for the EZPCR software to work the Zoll software DB needs to be named RCSQL not CAD.

My Question is can I make some form of an Alias or mutiple datbaase names for the CAD DB that is on the client server that point to the same database.

Meaning
CAD and RCSQL database names point to the same database on the clients server.

This way two sets of code does not need to be created and maintained just for the databasename reference.

I hope you guys and gals followed that.  And yes I know this is not usual or best practice.  But this is just a fix until I build new software which will no longer do that.

So I don't have to maintain two sets of code and do a massive change to the existing code all for a database name.
0
Comment
Question by:angelalaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Expert Comment

by:Patrick Tallarico
ID: 37809070
Could installing it on a second instance of sql server solve the problem?  Perhaps you could install all of this as a standalone installation on a secondary instance of sql server so that you can name the databases whatever you need.

I am unsure if you need the data between the current system to synchronize with the new standalone system. You could set up some sort of replication or replication process if you need to synchronize data between the two instances.  You should be able to set each instance as a linked servers to the other.
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 1400 total points
ID: 37809806
>>CAD and RCSQL database names point to the same database on the clients server

This is not possible as far as I know
0
 
LVL 6

Assisted Solution

by:SJCFL-Admin
SJCFL-Admin earned 600 total points
ID: 37811725
Perhaps we need to refame the issue.

You have a customer that has chosen to call a databse 'CAD' that most every other ZOLL customer calls 'RCSQL'. Correct?    (And we are a ZOLL customer, and we do indeed have a database named RCSQL but not CAD that is used by the ZOLL package...)

You have software that wants to refer to a database called 'CAD' and the application expects it to be in the same instance as ZOLL.  The references are hardcoded and there is no easy way you can run throgh a converted to change the references.  Especially having chosen a database name as short as CAD where you would get numerous false conversions...  (Not a critisism, just a qualification)

And Sql Server isn't the easiest for allowing parameterized database names...

It does, however handle schema very well.  ZOLL tables are all in the dbo schema.  It is doable ( but you would need to be careful on maintenance / upgrades) but you could establish your tables under the same database under a different schema.  

This is not my favorite resolution, but it might work if your application could handle the named schema.

A better solution would be to contact ZOLL and see how difficult it would be for the customer to rename their database.  After all, the standard name for the ZOLL billing databse is RCSQL.  It surely must be much easier for everyone if they went with the standard naming convention.  I wonder if even the customer is wondering why they insisted on a different name at this point.  It would be like deciding to call 'Excel' 'AddIt'.whenever you asked a question everyone must be wondering what you are taking about?
0
 

Author Closing Comment

by:angelalaw
ID: 37822133
I gave partial solution answers.  The ewan was correct as far as I can tell this is not possible on the smae sql server.  And SJCFL had better information for me about Zoll software itself which helped. stmpt had a solution but i think that would be way more expensive and create a huge slowness issue.
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question