"Same Database" references and post-deploy scripts

Say that I have two database projects - project A and project B.  Project A references project B as a same database reference.
When deploying project A (with Include Composite Objects enabled), all of project B's objects are included, as expected.  However, project B's post-deployment script is not run.
Is this by design, or a bug?

Hi Jamie,
In our scenario, we are using post-deployment scripts with MERGE statements as a way to manage population of initial data in certain tables.  For example, if you imagine a fictitious Gender table:
CREATE TABLE Gender (
Id INT IDENTITY PRIMARY KEY NOT NULL,
Code VARCHAR(2) NOT NULL,
Description NVARCHAR(16) NOT NULL,
CONSTRAINT [UK_Gender_Code] UNIQUE (Code)
we would have a corresponding entry in the post-deployment script such as:
MERGE INTO Gender AS Target
USING (VALUES
('M', 'Male'),
('F', 'Female')
) AS Source (Code, Description)
ON Target.Code = Source.Code
WHEN MATCHED THEN
UPDATE SET
Target.Description = Source.Description
WHEN NOT MATCHED BY TARGET THEN
INSERT (Code, Description)
VALUES (Code, Description)
WHEN NOT MATCHED BY SOURCE THEN
DELETE;
For tables that (for better or for worse) are expected to always contain certain values, this works very well to ensure that those tables are populated with the correct entries both when databases are initially deployed and when they are updated, and also
works well to handle updating this data for new or modified entries.
But, for same-database references, the post-deploy script never runs, and you end up with empty tables.  It's possible to work around this (deploy database B to target, then deploy database A, excluding composite objects), but it doesn't really fit
nicely into the press-F5-to-deploy that SSDT's Visual Studio experience has.

Similar Messages

  • VS 2013, DB project how to run post deployment script?

     
    Hi,
    In VS 2010 in the DB project I can run pre and post deployment scripts. Both are included in the project by default.
    In 2013 there's no such thing. What's the suggested alternative?
    Thanks
    SSIS question

    Hi Andreyni,
    You could get them if you add new Items.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What are  Pre Database Copy and Post data base copy activity list, Pre Migration and Post Migration activity list from SAP BW 7.0 to SAP BW 7.4 SPS6.

    BW on HANA :  Pre Database Copy and Post data base copy activity list, Pre Migration and Post Migration activity list from SAP BW 7.0 to SAP BW 7.4 SPS6.
    We are trying to copy database from SAP BW7.0 to SAP BW on HANA 7.4 SPS6 so we are in search for list of steps or activities during database copy both pre and post steps.
    Along with the above we are in search of Pre and post migration steps ones database is transferred successfully from oracle to HANA on 7.4 SPS6.
    Kindly help us in getting the exact course of action as requested.
    Thanks and Regards,
    Lavina Joshi

    Hi Lavina,
    try this link for starters: Upgrade and Migration - BW on HANA | SAP HANA
    Points to remember are:
    Preparation:
         -- Hardware Sizing
         -- Preparation of Data Centres
         -- HANA Hardware preparation
         -- System Landscape Readiness (upgrade software downloads, system readiness checks, etc)
         -- House Keeping activities on BW system (data clean up, etc)
    Post Installation:
         -- Sanity checks / Preparation and License checks
         -- JAVA Configurations
         -- Infoprovider conversions 
    Overall Stages are described below:
    # Environmental setup (HANA box)
         -- Initial system checks and Building Activities (system copy, Appln server setups, etc)
    # System readiness
                   - ZBW_HANA_COCKPIT Tool
                   - ZBW_HANA_CHECKLIST Tool
                   - ZBW_ABAP_ANALYZER Tool
                   - ZBW_TRANSFORM_FINDER Tool
                   - SIZING Report
                   - System Clean up Activities
                   - Impact of 7.4 on source system checks
                   - Java Upgrade for portal
    # DMO Stages
                   - Preparation & Pre Migration checks
                   - Execution / Migration
                   - Post Migration Activities
    # Testing Phase
                   - Source system checks/Activities
                   - System and Integration Testing
                   - End to End Testing
                   - Performance testing
                   - Reports
                   - BO reports / Interfaces
    Do let me know if you require any further information.
    Regards,
    Naren

  • Question on CAPolicy.inf file and post-installation script

    I'm preparing a small PKI implementation with a single Enterprise Root CA on Windows 2008 R2 Enterprise.
    The primary role of this CA is to provide certificates for about 20 laptops that will use the certificates for authentication to a wireless network.
    I have prepared a CAPolicy.inf file and a post installation script (below).
    Renewal period for the root cert should be 10 years, CRL publication every 2 days with Delta publication every 12 hours (details in scripts below).
    I want to make sure the AIA and CRL url commands are correct.
    Does this look correct?
    AIA
    1:%WINDIR%\System32\CertSrv\CertEnroll\%%1_%%3%%4.crt
    This should publish the CA certificate to the local file system "certenroll".
    2:ldap:///CN=%%7,CN=AIA,CN=Public Key Services,CN=Services,%%6%%11
    This places the LDAP url in the AIA extension of issued certs.
    I am not planning to use HTTP, hence its absence.
    CRL
    1:%WINDIR%\System32\CertSrv\CertEnroll\%%3%%8%%9.crl
    This publishes the CRL to the local file system ("certenroll" subfolder).
    10:ldap:///CN=%%7%%8,CN=%%2,CN=CDP,CN=Public Key Services,CN=Services,%%6%%10
    Indicates CDP in AD DS and includes CDP url in issued certificates.
    Complete scripts
    1. CAPolicy.inf - %windir%
    [Version]
    Signature= "$Windows NT$"
    [certsrv_server]
    renewalkeylength=2048
    RenewalValidityPeriodUnits=10
    RenewalValidityPeriod=years
    CRLPeriod = days
    CRLPeriodUnits = 2
    CRLDeltaPeriod = hours
    CRLDeltaPeriodUnits = 12
    LoadDefaultTemplates=0
    2. Install Role
    Follow steps in GUI here
    3. Run post-install script
    certutil -setreg CA\DSConfigDN CN=Configuration,DC=mydomain,DC=local
    certutil -setreg CA\CRLPeriodUnits 2
    certutil -setreg CA\CRLPeriod "days"
    certutil -setreg CA\CRLDeltaPeriodUnits 12
    certutil -setreg CA\CRLDeltaPeriod "hours"
    certutil -setreg CA\ValidityPeriodUnits 10
    certutil -setreg CA\ValidityPeriod "Years"
    certutil –setreg CA\CACertPublicationURLs "1:%WINDIR%\System32\CertSrv\CertEnroll\%%1_%%3%%4.crt\n2:ldap:///CN=%%7,CN=AIA,CN=Public Key Services,CN=Services,%%6%%11"
    certutil –setreg CA\CRLPublicationURLs "1:%WINDIR%\System32\CertSrv\CertEnroll\%%3%%8%%9.crl\n10:ldap:///CN=%%7%%8,CN=%%2,CN=CDP,CN=Public Key Services,CN=Services,%%6%%10"
    certutil -setreg CA\csp\DiscreteSignatureAlgorithm 1
    certutil -setreg CA\AuditFilter 127
    net stop certsvc & net start certsvc
    certutil -crl
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

    A couple of things (just a quick glance)
    1) CAPolicy.inf
    Everything looks fine in this file. You will have a 2 day base crl and 12 hour delta CRLs. No default templates are loaded, so you must manually designate all published certificates
    2) Post install Script
    a. Best practices are to use HTTP only, not to use LDAP, so your whole design does not follow best practices. Furthermore, if you issue a certificate to a single, non-domain joined machine, they will be unable to evaluate your certificates. If you decide
    to do VPN (or use an internal SSL cert on an externally accessible Web server), revocation checking will fail because you do not publish AD to the external world
    b. Will you be issuing 10 year certificates from the CA. These lines:
    certutil -setreg CA\ValidityPeriodUnits 10
    certutil -setreg CA\ValidityPeriod "Years"
    define the maximum validity period of certs issued *by* the CA. For example, if a certificate template states 4 years, then a four year will be issued (less than 10 years). If a template state 12 years, then the max age will be 10 years. Think of it as a
    governor.
    c.CACertPublicationURLs . This should include an HTTP URL, and if you want to still include LDAP, HTTP should be prior to the LDAP URL.
    d. CRLPublicationURLs. This should include an HTTP URL. If you want to still include LDAP, HTTP should be prior to the LDAP URL. Your checkbox value for the LDAP URL is incorrect as well. For a CA that issues both base and delta CRLs, you must have a value
    of 79 (all check boxes enabled). Your current configuration would fail for revocation checking because you do not publish the base or delta CRL to AD. There is another check box missing (I believe the one to include the URL in the base CRL's freshest CRL extension
    (how to find the delta CRL).
    e. Do not include the DiscreteSignatureAlgorithm line in the script. If you have any Windows XP clients, they will not be able to use the certs (BTW, this should have been AlternateSignatureAlgorithm in my book - where you sourced your scripts). This would
    only be used on a CA where you used something like Elliptical Curve as the assymetric algorithm and SHA384 as the signature algorithm).
    f. The restart line should be net stop certsvc && net start certsvc. The double && ensures that the service comes to a complete stop before the start command is executed.
    HTH,
    Brian

  • How do I get Pages to import references and post the information as a footnote from Logos Bible Software?

    I want to move to the iPad as my only computer, but am a bit frustrated by the loss of some features in the IOS version of Pages. I need the ability to create structured outlines with footnote and endnote capability. Logos Bible Software imports many cross references and properly annotates passages that I copy and paste in Microsoft Word on my PC, but I cannot get pages to do the samething on my iPad. In fact I really miss the outline generation capability in Pages.  Is this something that will be addressed? Are there workarounds?

    # Delete the duplicate bookmarks in the Library (press Ctrl+Shift+B to open it).
    # In Internet Explorer, export your favorites in HTML format.
    #* [http://windows.microsoft.com/en-US/internet-explorer/add-view-organize-favorites Export and import favorites | Microsoft Support]
    # In Firefox, import the bookmarks from the HTML file.
    #* [[Import Bookmarks from a HTML file]]

  • Performance slows down when moving from stage to test schema within same instance with same database table and objects

    We have created a stage schema and tested application which is working fine when we are moving it to another schema for further testing ( This schema is created using same scripts which were used to create objects in staging schema) the performanc of application (Developed in .NET) slows down drastically
    Some of the store procedures we have checked at Databse/SQLdeveloper level are giving almost same performance but at Application level there is lot of difference
    Can you please help
    We are using Oracke 11g Database

    Are you using the Database Cloud Service?  You cannot create schemas in the Database Cloud Service, which makes me think you are not.  This forum is only for the Database Cloud Service.
    - Rick Greenwald

  • Netinstall  - Add Packages and Post-Install Scripts

    I used SIU to make a netinstall image, add 3 .pkg files to install after the restore completes, and apply some system configuration settings. I have had no issues restoring the image, but none of the post restore packages run, and the ByHost preferences are not being changed to match the client after install. The order of the workflow seems to be correct, so I am at a loss as to why I am getting the error "there was no software found to install" when the restore finishes, and the post process begin. Any help is greatly appreciated.
    I have also included a link to a screen shot of my Workflow.
    http://dl.getdropbox.com/u/12985/Screenshot%202008-09-24%2010h%2052m%2012s.png

    No, the server should be fine. I was trying to make sure that you didn't simply have an old version of the tools installed on some other system.
    You might try deleting the automator action cache files (~/Library/Preferences/com.apple.automator*.plist) on the server. Other than that, I have no simple ideas.

  • Post-Deploy Script to restart WebJob

    Currently deploying via GitHub my node
    project which contains also a WebJobs. The WebJob is restarting when I change the run.js file but when I change some external files nothing happens. Any option to let the job restart during every deploy?

    What do you mean by "some external files"?
    Thanks,
    Amit

  • Receive XML file from CIDX adapter and Post to SAP as IDoc using XI

    I have scenario where we will receive the xml file from CIDX adapter. I need to take the xml from CIDX, do the Database Lookup and post it to SAP as IDoc.
    Any technical documentaion or step-by-step process documents can be very helpfull to me, since I am new to XI
    Thanks
    SP

    Lookup in XI is used to call the target data storage system and get data from there to your mapping programme.
    In XI you can do Lookup in Message Mapping, Java Mapping and in XSLT Mapping. Previously Lookup in XI was system dependent. But now what ever the system are i.e. SAP system or non-sap system(Oracle,MS SQL etc) lookup API are same.
    Overview of Lookup
    - Lookups are used to identify/request the data from mapping program.
    - It interrupt the process and looking for data which was stored in target system.
    - It get that data and comeback to process and continue with that data.
    Types of Lookups in XI
    - JDBC Lookup: JDBC lookup is used for accessing data from database (non SAP).
    - RFC Lookup: RFC lookup is used for accessing the SAP Data.
    - SOAP Lookup: SOAP lookup is used for accessing data from Webservice
    Steps to perform Lookup in Mapping
    Import package com.sap.aii.mapping.lookup.*;
    Create connection to the target Database system.
    // Determine communication channel created in ID
    Channel channel = null;
    channel = LookupService.getChannel("DB-SYSTEM-NAME","DB-CHANNEL-NAME");
    // Get system accessor for the channel.
    DataBaseAccessor accessor = null;
    accessor = LookupService.getDataBaseAccessor(channel);
    Build the Query String.
    Getting Result
    // Execute Query and get the values.
    DataBaseResult resultSet = null;
    resultSet = accessor.execute(Query);

  • Post Install Scripts

    I am creating an image with System Utility. One module i can add is called "Add Packages and Post-Install Scripts".
    I put one of my scripts in it:
    #!bin/sh
    defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hello"
    But I get an error when trying to image saying "install setup failed: run postinstall script"
    I know the script works because i tested it.
    Any ideas?

    probably not…
    try using the defined installer variables instead of a specific path. there's a quick rundown here, though there's probably better documentation of it elsewhere: http://tinyurl.com/yejppmm
    basically, you probably want $3:
    $1: Full Path to Package
    $2: Full Path to target installation directory: /Applications
    $3: Mountpoint of installation disk: / or /Volumes/External_Drive
    $4: Root directory of currently booted system
    your script may be failing because the installer is trying to run it on the booted volume, which won't work. you want it to apply to the restored/newly installed volume.

  • Regarding same invoice reference

    hi sirs,
    This is my requirement
    When invoices are interfaced from Doris/concorde/service web into SAP they are sometimes sent over twice. We want SAP to check if an invoice has already been interfaced (sales order exists with same invoice reference and booking reference) and if it has then we want the idoc to be made to fail and stop in BD87.
    for this requirement i have maintain code like this in this include ZXVEDU03
    IF segment-segnam = 'E1EDK02'.
    Transfer E1EDK02 structure to work area..
      ls_e1edk02 = segment-sdata.
      IF ls_e1edk02-qualf = '001'.
        DATA:l_vbeln TYPE vbeln,
             l_zblnr TYPE xblnr,
             l_xblnr TYPE xblnr.
        CLEAR ls_xvbak1.
        MOVE dxvbak TO ls_xvbak1.
        SPLIT  ls_e1edk02-belnr AT '-' INTO l_xblnr l_zblnr.
        SELECT SINGLE vbeln
               FROM vbak INTO l_vbeln
               WHERE xblnr = l_xblnr
                 AND zblnr = ls_xvbak1-zblnr.
        IF sy-subrc = 0.
          sy-msgid = '00'.
          sy-msgno = '001'.
          sy-msgv1 = 'Sales Order already exists for Invoice reference :'.
          sy-msgv2 = ls_e1edk02-belnr.
          sy-msgv3 = 'and Booking reference No : '.
          sy-msgv4 = ls_xvbak-zblnr.
          RAISE user_error.
        ENDIF.
        CLEAR ls_xvbak.
      ENDIF.
    ENDIF.
    while i am testing for some idoc it is showing correct statues and some it was not showing correct states
    some time i am getting correct messag Sales Order already exists for Invoice reference :'. ,for some IDOC  in BD87 i am getting Status was  invalid date
    Please give suggestions and what should i do?
    venkee.

    Hi,
    For line items which are related to another line item, this field contains the number of the partner document.
    In the standard system the field is used for:
    o  Credit memos which refer to a particular invoice item
    o  Subsequent invoices for an invoice item
    o  Partial payments for an invoice item
    o  Partial clearings of down payments.
    In the first two cases mentioned, the terms of payment are copied from the cross-referenced invoice item into the item currently being processed. This ensures that items due on the same date are paid together by automatic payment.
    A special rule applies to credit memos which have a "V" in this field. The due date is determined in the same way as for an invoice. If the field is empty (containing neither a document number nor a "V") the due date is the baseline date for payment.
    Reward if useful.

  • Hold and Post Invoice with Same Reference

    Hi,
    We have activated the check for duplicate invoices.
    Now, we hold an invoice with reference 123 in MIRO.  Then, we click on worklist and open the held invoice and post it.  But the system throws a duplicate invoice error.
    Why is the system checking duplicate invoice where it is actually the same invoice?
    Am I doing something wrong?
    Thanks.

    Hello,
    Invoice Duplication check takes place when we try to post an invoice based on the configuration. Our finding is that this check will not take place at the time of creation of invoice.
    However, this check can be introduced during the creation of invoice in user exit EXIT_SAPLMRME_003 and you have all the parameters for this check here.
    Thanks,
    Venu

  • SQL Server 2008 R2: which version of Visual Studio do I need to keep database projects and SSIS projects in the same solution

    I need to build a solution containing a database project and an integration services project for SQL Server 2008R2.  Apparently, the subset of Visual Studio tools that comes with SQL Server 2008R2 does not include database projects and does not have
    Team Foundation Server support.  Because of those limitations, I am trying to determine which version of Visual Studio will allow me to:
    1. Build a single solution that includes both a database project and an Integration Services project
    2. For the database project, be able to import a database schema from an existing SQL Server 2008 R2 database, do schema compares and update the project from the database and vice versa
    3. For the Integration Services project, be able to deploy the packages to SQL Server Integration Services on SQL Server 2008 R2 (that is, to the msdb database).
    4. Use Team Foundation Server for source control of the whole solution, including both project types.

    Hi G Britton,
    To build a solution containing a database project and an integration services project for SQL Server 2008 R2 and use Team Foundation Server for source control.
     You can choose to install Visual Studio 2008.
    And as you want to utilize Schema compare and/or Data compare functionalities in Visual Studio, you will need to install the
    Visual Studio Team System 2008 Database Edition or Visual Studio Team System 2008 Team Suite.
    In addition, for Visual Studio issues, I would like to recommend you post the question in the
    Visual
    Studio forums to get better support.
    Reference:
    Team Foundation Version Control
    Compare and Synchronize Database Schemas
    Interoperability and Coexistence (Integration Services)
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • DAC, ETL failed due to Post-Etl Script not exist and table not exist.

    When execute the ETL in DAC, it failed when execute the "Change Capture For Siebel OLTP"
    encounterred the following two type errors.
    how to fix these errors?
    The first is the table not exist:
    ======================================================================
    MESSAGE:::Could not truncate table 'S_ETL_I_IMG_38' because this table does not exist in database 'OLTP_SIA'.
    EXCEPTION CLASS::: com.microsoft.sqlserver.jdbc.SQLServerException
    com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    ======================================================================
    The second is the Post-Etl not exist.
    I have copied the Copy Source Files and Lookup Files. What else should I do? What script it not find? have no idea.
    ======================================================================
    Jan 20, 2009 4:11:06 PM com.siebel.etl.etlmanager.EtlExecutionManager finishEtl
    SEVERE: Incorrectly specified Post-Etl Script/Executable. The file either does n
    ot exist, or is not readable
    UNREGISTERING: com.siebel.etl.engine.bore.FixedFailedNodesFacility
    686 SEVERE Tue Jan 20 16:11:06 CST 2009
    END OF ETL
    687 SEVERE Tue Jan 20 16:11:06 CST 2009 Incorrectly specified Post-Etl Script
    /Executable. The file either does not exist, or is not readable
    UNREGISTERING: com.siebel.etl.engine.core.SessionHandler
    UNREGISTERING: com.siebel.etl.engine.bore.ServerTokenPool
    UNREGISTERING: com.siebel.etl.engine.core.TableIndexHandler
    UNREGISTERING: com.siebel.etl.engine.bore.NewDispatcher
    Stopping EtlParameters 9550256
    UNREGISTERING: com.siebel.etl.engine.bore.EtlParameters
    UNREGISTERING: com.siebel.etl.engine.bore.ExternalTaskTokenPool
    UNREGISTERING: com.siebel.analytics.etl.execution.RefreshDateHandler

    Hi tigger,
    ad scripts:
    http://download.oracle.com/docs/cd/E12102_01/books/AnyInstAdm784/AnyInstAdmFunctionalRef9.html#wp1005877
    http://download.oracle.com/docs/cd/E12102_01/books/AnyInstAdm784/AnyInstAdmFunctionalRef8.html
    ad tables:
    Without data change capture tables nothing will work. Have you looked at the actual documentaiotn? It contains everythign step by step.
    http://www.oracle.com/technology/documentation/bi_apps.html
    --> Oracle Business Intelligence Applications Fusion Edition Installation and Configuration Guide -> 4.15.3 How to Update Siebel Transactional Database Schema Definitions

  • Export and re-import on same database

    For one reason or another we want to do a full export and re-import all the data back into the same tablespaces... is there a command to imp to tell it to truncate and over-write all the data before importing? or do I have to manually drop all the tables? (by manual I mean write a script to do it) -- and/or drop all the schemas

    Not sure, why you want to export and import back the same thing into the same database, but anyways to answer your question, yes it is possible with Oracle10g by using TABLE_EXISTS_ACTION={SKIP | APPEND | TRUNCATE | REPLACE}. With Oracle9i, you may have to generate a dynamic script to truncate tables....make sure you exclude SYS/SYSTEM tables from the truncate script.........did I say except SYS/SYSTEM and so on :-)
    HTH
    Thanks
    Chandra Pabba

Maybe you are looking for

  • Has anyone found that MS Word stops showing paste options after upgrading to latest Firefox version?

    I recently upgraded to Firefox 26. I have a PC using Windows XP Professional SP3. I also use Microsoft Word 2007. Recently, when I copy something and paste it into a Word document, I no longer see the little button that allows me to choose paste opti

  • Doubts reg try block and return statements

    hi public int test()           try                System.out.println("hi");                return 1;           catch(Exception e)           System.out.println("err");           return 2;           finally                System.out.println("final");  

  • Printing problem from classic

    I used to print things out from classic but somehow I can't print anymore. It tell me to go to chooser and choose the printer but I can't choose it. I tried to click on HP printer but no reponse. I tried to reinstall but no use. That reinstalling see

  • UDL button inactive

    According to pg. 22 of the Logic Express Reference Manual, that little rectangle in the upper left corner of each local menu is the UDL button, which I would assume stands for Up Display Level. It doesn't do anything noticeable in any of my window le

  • Jpeg image won't scale to fit box. Any ideas?

    I am trying to add text to my scanned watercolor illustrations for a childrens book I wrote.  I am using Illustrator and I just loaded a jpeg image into illustrator, and it is HUGE!  I tried to use the scale tool and I can't figure out how to get the