Can you Alias a database name?

  • We are writing application to migrate from an Informix database to a SQL Server database. We are using SSIS packages and SPL's to accomplish our tasks. But now we been asked if we can target multiple database's. So let's say this is our typical client scenario

    Informix DB -> DMZ -> Target DB

    The target DB is a totally different schema than the source since the application using the Informix DB is a different application than the one using the Target DB.

    The DMZ is a SQL Server database we created with our migration utility. It move's the data from Informix DB to SQL Server DB. From here we call our SPL's to work with the data and move it to our target DB

    So our SPL's exist in the DMZ database and would do something like

    Read the Data

    Manipulate the Data

    Insert into Taget DB using something like

    INSERT INTO [TARGETDB].[SCHEMA].

    (columns)

    Values (values)

    So our TargetDB is hardcoded. But now they want to do the following;

    Informix DB -> DMZ -> Target DB

    Informix DB1 -> DMZ -> Target DB1

    Informix DB2 -> DMZ -> Target DB2

    Can you alias the DB name so we can leave the SPL as TARGETDB but have it point to TARGETDB1

    Thanks Joe

  • Ok, seems that you are in domain environment from your scenario, so you can do the database aliases in you DNS Server where you put the name for the SQL Server and converting that IP in alias name so try to connect with alias and it should work till your IP address must be reserved for that Server/Alias ( SQL Server )!

    Or try to make the aliases in the SQL Server configuration Manager, where you have option to add alias changing the port number and other parameters.

    Or try with Synonyms .... http://msdn.microsoft.com/en-us/library/ms177544.aspx

    Let me know does it work or any other issue!?

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply