How to make code immune to changes in (external) database names?

I wonder if there is a way to make code in one database immune to changes in names of other databases that the code uses. Essentially, what I'm after is something like an alias but not for a specific object in a database but rather for a whole database,
be it on the same server or any other place. Is something like this possible? I wouldn't like to use Linked Servers, bear in mind please... Thanks for any replies!
Darek

hi Darek,
Have you considered using SSIS for your code?  When you use SSIS, you can use data sources which are referenced by the packages, and the underlying connections to databases/servers can be changed without affecting the code.  In fact, if you use
configuration files it becomes as simple as changing one record in a table to change where your data sources are pointing. Here is a blog on using ssis package configurations to manage data sources.
http://dataqueen.unlimitedviz.com/2012/02/creating-an-ssis-package-template-with-predefined-package-configurations/
SSIS is a really powerful way to manage your ETL requirements.
Martina White

Similar Messages

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • How to make code standardization in oracle 10 in sql/pl-sql

    if any body helps to handle how to make code standaridazation in oracle 10g in sql/pl-sql.

    refer tis link and get download..
    http://www.itap.purdue.edu/ea/data/standards/plsql.cfm

  • I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma

    I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma???

    I am working on a friend of mine's 15g ipod(W/dock connector)and I am having the same trouble except it does it to all the songs. I have tried reseting it multiple times, but to no avail.
    I am not sure that this runs on windows XP, it is absolutly archaic (compared to my 5th gen. 30g video).
    Help?
    15g ipod (w/dock connector)   Windows XP  
      Windows XP  

  • How to make Logic auto-select channel when external instrument is selected?

    I recently upgraded hardware and now have to upgrade the OS 9 software (MOTU FreeStyle) I've been using and join the 21st century. I asked a Guitar Center employee about what package to buy and stressed that I wanted the software to auto-select the midi channel since that was a major benefit (for me) in using FreeStyle. I was informed that all of the newer DAW software did this (which made sense to me, after all FreeStyle was already at least 10 years old, although no longer under development (hence OS 9.) Logic Express was specifically recommended.
    Sadly, I don't see this capability in Logic Express. I don't understand why, if I have 15 instruments set up, and I select a new one, I have to manually look at each of the other instruments (assuming I don't have their channels memorized) and see what channels have been used so that I don't accidentally reuse the same one for the new instrument. Doesn't the computer already know what channels are unused??
    In FreeStyle could have 25 instruments set up for a 16 channel keyboard, and as long as there was never more than 16 voices playing at any particular time, the software just managed the channels for me. I don't know what happens if you go over 16 for a 16 channel instrument, I don't think I ever did (I never had voices cut out anyway.)
    Not to berate Logic Express, there's lots of cool stuff in it that I'm looking forward to exploring, and it sounds like you have to jump through hoops even to get MOTU's Digital Performer to emulate the same behavior and I suspect it's as much of a hassle to set it up as to just do it on the fly (from previous experience of "what a salesman says" vs. "what is real.") I'm just trying to figure out how to make the computer do the computer work so that I can do the music work.
    I have lots of partial (and even some complete!) projects to port over and not nearly as much spare time as I'd like to spend playing. I'd rather spend my meager spare time composing, not fighting with the technology.
    Any ideas?
    Thanks,
    -David

    Hi bunker,
    I can't test it at the moment but I think that can be achieved by slightly changing the code like so:
    *<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>*
    *<script type="text/javascript">*
    *$(document).ready(function(){*
    *$("td.GFPFilter span input").focus(function(event){*
    this.select();
    this.value = '';
    *</script>*
    Also, if you found my posts helpful or correct could you apply those labels to the relevant posts?
    Cheers,
    J
    Edited by: J Kremer on 20-Apr-2011 19:23
    Edited by: J Kremer on 20-Apr-2011 19:30

  • How to make the library visible IN AN EXTERNAL disk?

    Hello.
    Searched this forum (found about 25 identical questions and answers "how to make the library visible").
    I turned mine and it is constantly visible now.
    Before installing Lion made a bootable image.
    When I connect the external HD, I see it in the Finder side bar, click on users>myname and the library folder doesn't show up.
    Tried the 3 ways to make it visible but they all bring back and show the Lion's library on my MBP, not the one in the external HD.
    Any ideas?
    (BTW, I am just an "amateur user", not too heavy, so just, please take in consideration that if you explain to me slowly I will understand quicly)...
    Thanks in advance.
    Saul

    Thank you Baltwo.
    Don't I know you from CCC? (If judging from your answer I do, always hit the nail in the head)...
    Yes, I guess I used the wrong terminology. Anyway, I did a bootable disk/image/clone, however it's called, with CCC (Carbon Copy Cloner), which BTW I am using for at least 3 years and saved several times my behind.
    So, if I understood you right, you mean booting from my external HD and make the library visible (I don't remember if the clone was made after installing Lion or still while in Snow L, but will check).
    I'll try and update here if it worked.
    Thanks again and have a good evening.
    Saul

  • How to make call out from XI to external applications??

    Hi,
    I have XI running on my system.
    I want to know if there is any possibility to invoke
    or to make call outs from XI to external applications
    like java.If yes what is the procedure for that.
    Thanks in advance
    Sunita

    XI will need a triggering event to do this. That is, if you can send a message to XI, then using XI you can route the message to a Proxy and from the proxy (which could be a java proxy) you can make a call to a java program outside XI. But, basically, XI on its own will not make a call, but it needs a triggering message. So, you can configure a file adapter to send a triggering message from a file system to the intergration server, and configure routing rules so that the messages reaches a proxy.
    Warm regards,
    Venki.

  • How to develop a report in Crystal with flexible database name?

    Hello
    I am a Project Manager of a project of developing reports in Crystal 11.
    The idea is to develop reports on top of the content in MS SQL tables.
    The initial testing and demonstration to the customer is done within the Crystal development environment.
    In a later stage, we need to integrate the reports with C# WPF application, using Crystal control.
    We currently use ODBC connections.
    We want the flexibility to set the actual database dynamically, by using the "default database" of the ODBC connection (or any other way). In other words, we want not just the flexibility to change the database server, but work with different database names, like "ProductDB_TEST", "ProductDB_PROD" etc. - without changing the report.
    Unfortunately, we got the answer from the developer that the database name should be pre-defined for a given report. Although the connection can be set to another server, the DB name cannot be set dynamically.
    Looking into the "Database" -> "Show SQL Query" menu, we see the following piece inside the query:
    INNER JOIN "DATABASE_NAME"."dbo"."IncidentTypeSnapshotData"
    So it looks like the query itself contains the DB name.
    Is it really a limitation of Crystal, or rather the developer working on the project doesn't know the trick?
    Thanks for any hint
    Max

    CR CR 2011 / "Crystal reports For Visual Studio 2010", you are correct.
    Re. the database thinggy. You can connect to a database via ODBC, OLE DB or in some instances natively. Once a report is created you an change the datasource. A good sample app on how to do this is  csharp_win_dbengine / vb_win_dbengine. A link to the samples is here:
    Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    More info on connecting to dbs and changing them is in the developer help files:
    SAP Crystal Reports .NET SDK Developer Guide
    SAP Crystal Reports .NET API Guide
    More info on CR APIs for .NET (applies to all versions of CR and VS):
    Crystal Reports for Visual Studio 2005 Walkthro... | SCN
    You can also use ADO .NET Datasets and in this way you handle the database connections in your app. A good sample is csharp_win_adodotnet (also available in VB) - same link as above.
    More info on datasets:
    Crystal Reports Guide To ADO.NET
    Crystal Reports for Visual Studio .NET - Walkthrough - Reporting Off ADO.NET Datasets
    For more complicated operations (e.g.; changing a report from ODBC to OLE DB, changing one table, etc., you will want to use the InProc RAS SDK that is also available in CRVS. Developer help files are here:
    Report Application Server .NET SDK Developer Guide
    Report Application Server .NET API Guide
    Sample apps are here:
    NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    and here:
    Crystal Reports .NET In Process RAS (Unmanaged) SDK Sample Applications
    More info on RAS SDK:
    How to Use The RAS SDK .NET With In-Process RAS Server
    Lastly, do use the search box in the top right corner. I find simple search strings such as 'crystal net parameter' return best results (KBAs, Blogs, docs, wikis, discussions and more).
    - Ludek

  • How to Change Crystal Report database name from visual basic code?

    Hi all,
    I have created a Crystal Report (CR)  with .NET VB. I also have developd some UDTs for that pusrpose and everything is OK.
    However I cannot use the same CR in another Company which has the same UDTs. I have not found how Connect to Company (in other words change the DB the report reads).
    Any Idea?
    Thanks,
    Vangelis
    Edited by: Vangelis Kanellopoulos on Jul 19, 2008 6:07 PM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:27 AM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:28 AM

    Hi Vangelis,
    Here's a simple VB class that has functions for setting the login details for the report and passing parameters.
    Option Strict Off
    Option Explicit On
    Public Class CrystalFunctions
        Enum ParamType As Integer
            Int
            Text
        End Enum
        Public Shared Sub SetCrystalLogin(ByVal sUser As String, ByVal sPassword As String, ByVal sServer As String, ByVal sCompanyDB As String, _
               ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oDB As CrystalDecisions.CrystalReports.Engine.Database = oRpt.Database
            Dim oTables As CrystalDecisions.CrystalReports.Engine.Tables = oDB.Tables
            Dim oLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            Dim oConnectInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
            oConnectInfo.DatabaseName = sCompanyDB
            oConnectInfo.ServerName = sServer
            oConnectInfo.UserID = sUser
            oConnectInfo.Password = sPassword
            ' Set the logon credentials for all tables
            For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                oLogonInfo = oTable.LogOnInfo
                oLogonInfo.ConnectionInfo = oConnectInfo
                oTable.ApplyLogOnInfo(oLogonInfo)
            Next
            ' Check for subreports
            Dim oSections As CrystalDecisions.CrystalReports.Engine.Sections
            Dim oSection As CrystalDecisions.CrystalReports.Engine.Section
            Dim oRptObjs As CrystalDecisions.CrystalReports.Engine.ReportObjects
            Dim oRptObj As CrystalDecisions.CrystalReports.Engine.ReportObject
            Dim oSubRptObj As CrystalDecisions.CrystalReports.Engine.SubreportObject
            Dim oSubRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            oSections = oRpt.ReportDefinition.Sections
            For Each oSection In oSections
                oRptObjs = oSection.ReportObjects
                For Each oRptObj In oRptObjs
                    If oRptObj.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                        ' This is a subreport so set the logon credentials for this report's tables
                        oSubRptObj = CType(oRptObj, CrystalDecisions.CrystalReports.Engine.SubreportObject)
                        ' Open the subreport
                        oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName)
                        oDB = oSubRpt.Database
                        oTables = oDB.Tables
                        For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                            oLogonInfo = oTable.LogOnInfo
                            oLogonInfo.ConnectionInfo = oConnectInfo
                            oTable.ApplyLogOnInfo(oLogonInfo)
                        Next
                    End If
                Next
            Next
        End Sub
        Public Shared Sub SetCrystalParams(ByVal sFieldName As String, ByVal iDataType As ParamType, ByVal sVal As String, ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oFieldDefs As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions
            Dim oFieldDef As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
            Dim oParamVals As CrystalDecisions.Shared.ParameterValues
            Dim oDiscreteVal As CrystalDecisions.Shared.ParameterDiscreteValue
            oFieldDefs = oRpt.DataDefinition.ParameterFields
            oFieldDef = oFieldDefs(sFieldName)
            oParamVals = oFieldDef.CurrentValues
            oParamVals.Clear()
            oDiscreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue()
            Select Case iDataType
                Case ParamType.Int
                    oDiscreteVal.Value = System.Convert.ToInt32(sVal)
                Case ParamType.Text
                    oDiscreteVal.Value = sVal
            End Select
            oParamVals.Add(oDiscreteVal)
            oFieldDef.ApplyCurrentValues(oParamVals)
        End Sub
    End Class
    And here's how you would use them:
    ' Create an instance of the Crystal report
    _rptCrystal = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    _rptCrystal.Load(_oSBO.AddonPath + "\Reports\MyReport.rpt")
    ' Call SetCrystalLogin to see the logon information for all report tables
    CrystalFunctions.SetCrystalLogin(sUser, sPassword, _oSBO.SboCompany.Server, _oSBO.SboCompany.CompanyDB, _rptCrystal)
    ' Set my report parameter value
    CrystalFunctions.SetCrystalParams("MyParam", CrystalFunctions.ParamType.Int, 999, _rptCrystal)
    ' Print the report straight to the printer                          
    _rptCrystal.PrintToPrinter(1, False, 0, 0)
    The other way to approach this solution would be to base your Crystal report on a .NET dataset rather than a database connection. However, as you've already written your report, the code above is going to be simpler to implement.
    Kind Regards,
    Owen

  • How to make code portable

    Hi,
    I have a question like how can one make the following java code portable on different enviroments. What are the parts of the code that are not portable and how to rewrite the code in more portable manner.
    Here is the code.
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * Some not very portable Java code. This code obtains a letter from the user
    * and gets a corresponding integer from a binary array stored in a file. The
    * value "base" is the starting position for the array in the file. The method
    * "readbyte" reads one byte from the file at a given position. This code is
    * assumed to occur within method Main of a public Java class.
    public class Portable {
         public static void main(String args[])throws IOException  {
              int letter, start, base=0, val;
              int inbuf[] = new int[50];
              byte inb;
              RandomAccessFile ra = new RandomAccessFile("abc.txt","rw");
              //DataInputStream dr = new DataInputStream(fr);
              System.out.print("Enter a letter between A and Z: ");
              letter = (int) System.in.read();
              if ((letter >= (int) 'a') && (letter <= (int) 'a' + 25)) {
                   letter = letter - 32;
              if ((letter >= (int) 'A') && (letter <= (int) 'A' + 25)) {
                   start = base + 4 * (letter - (int) 'A');
                   val = 0;
                   for (int pos = start; pos < start + 4; pos++) {
                        ra.seek(pos);
                        inb = ra.readByte();
                        val = (val << 8) + ra.readByte();
                   System.out.println("The value stored at position " + letter
                             + " is " + val);
    }Any help would be great.
    Thanx.

    I can't see any code which stores any data, but the byte order for an int can be different on different platforms, but that's more related to the format of the file.
    Kaj

  • How to make code in dreamweaver flow to the next line?

    The line lengths of my code are really really long. How do I make it automatically flow to the next line without causing it to actually be a new line? Just for viewing purposes. I don't like having to scroll all the way to the end of the line of code to add a close tag.

    Hi
    Right-click on the area next to the 'box' that has the page title, and select 'coding' to enable the coding toolbar, (appears on the l/h side of the code window) then select the word wrap icon, see image -
    PZ

  • How to make a loop that changes two different movieclips from visible to invisible every second

    I am writing some code that puzzles me. It may be, because I have a cold or because I've never needed to do anything like this. I want to have two movieclips one is visible and one is not. then one second passes the one that was visible is invisible and the invisible one is visible. What would be the best approach to this, besides handcoding if statements. I know there has to be a faster way and less expensive way than handcoding if statements.
    I'd like to thank anyone who replies in advance .

    this is how i would do it
    package
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.events.TimerEvent;
              import flash.utils.Timer;
              public class Main extends Sprite
                        private var mc1:MovieClip;
                        private var mc2:MovieClip;
                        public function Main()
                                  // create your mc's here
                                  mc1 = new MovieClip();
                                  mc2 = new MovieClip();
                                  mc2.visible = false;
                                  var timer:Timer = new Timer(1000);
                                  timer.addEventListener(TimerEvent.TIMER, loop);
                                  timer.start();
                        private function loop(e:TimerEvent):void
                                  mc1.visible = !mc1.visible;
                                  mc2.visible = !mc2.visible;

  • How to make feild grey  in change mode

    Hi All ,
    I have a reuiremnt , In the module pool I am upadting the date , user name and time automatically by system parameters .
    Now I want to make these three feilds in grey mode always and rest other feilds in the screen should be in change mode .
    Can any one help me to resolve the issue .
    Thanks ,
    NJ

    Hi ,
    Thanks for the quick reply .
    I am new to SAP , Could you please tell me the clear steps ..
    When I go to module pool screen I will find the feilds as mentioned below .
    MODULE LISTE_INIT_WORKAREA.
        CHAIN.
    FIELD ZPFEPPVC-USNAM  .
    MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
        ENDCHAIN.
    I doulble clicked on the FIELD ZPFEPPVC-USNAM  and I am finding a screen painter with screen number , Attributes tab , Element list tab and flow logic tab .
    After this I am not understanding where to go and select the program name .
    Please help me to resolve the issue .
    Thanks ,
    NJ

  • How to maka an userinterface for changing comports

    Hi
    I need to to an exe with LV code, that has an easy to use interface for changing comports.
    The comport change interface is only to be seen when the user chooses to change comport, once this is done the menu is to disapear untill needed again.
    I'm using LV 6.02.
    I need examples please!
    J;-)

    Hi,
    Insert this subVI in any place of your diagram, where you want to reinit serial port settings.
    Good luck.
    Oleg Chutko.
    Attachments:
    Ser_Set.vi ‏48 KB

  • HR Form Editor, How to Make a Rule to change - value to no sign

    Dear All,
    I am making a pay slip in HR Form Editor and in a window i am displaying wage type text and values, values are negative but I want then to be displayed with No sign.
    Can some one explain to me how to eliminate a sign of wage type vales in a window by using a rule or any other methord.
    Regards.

    Hi,
    create a new 'line layout' for your specific form and have the value for conversion set to '19 - No +/- sign'.
    Of course the specific WT should be linked to this new 'line layout' under step  'Window'
    Have fun.
    Wilfred.

Maybe you are looking for