Script for Applying master Spread

Hi,
This Script is for Applying CO-Opener master page  wherever CN is applied, When we run the script, it alerts Sucess.But master spread is not applied . Please resolve.
var mydoc=app.activeDocument;
var mypara = mydoc.stories.item(0).paragraphs.everyItem().getElements();
for(i=0; i<mypara.length; i++){
    if (myPara[i].appliedParagraphStyle.name=="CN"){
           mypara[i].parentTextFrames[0].parent.appliedMaster = mydoc.masterSpreads.item("CO-Opener");
alert("Master Page applied Sucessfully")

Hi Math,
I hope your coding is correct, but it seems stories[0] do not have "CN" Styles.
Change the below line:
var mypara = mydoc.stories.item(0).paragraphs.everyItem().getElements(); 
into
var mypara = mydoc.stories.everyItem().paragraphs.everyItem().getElements(); 
Thanks to Jongware and Green4ever.....
and also the use the below url to get the correct coding for CS4 and CS5 and above
Apply Master Page using Paragraph Style
var myDocument = app.activeDocument; 
var myParas = myDocument.stories.everyItem().paragraphs.everyItem().getElements(); 
var myPage = myDocument.pages; 
for(i=0; i<myParas.length; i++) 
    if(myParas[i].appliedParagraphStyle.name == "CT") 
        //Works only in CS5 and later 
        myParas[i].parentTextFrames[0].parentPage.appliedMaster = myDocument.masterSpreads.item("B-Master"); 
        //for CS4 use this 
        //myParas[i].parentTextFrames[0].parent.appliedMaster = myDocument.masterSpreads.item("B-Master"); 
Regards
Siraj

Similar Messages

  • Script for switching master pages

    Would it be possible to write a script to do this: Replace one master page with another whenever a certain paragraph style appears? I'm looking for a quick way to replace my A Master (with running header and page number) with the None Master on pages where new chapters begin.
    Clark

    here you go (it also creates sections)
    var ProgressBar = function(/*str*/title){
         var w = new Window('palette', ' '+title, {x:0, y:0, width:340, height:60}),
              pb = w.add('progressbar', {x:20, y:12, width:300, height:12}, 0, 100),
              st = w.add('statictext', {x:10, y:36, width:320, height:20}, '');
         st.justify = 'center';
         w.center();
         this.reset = function(msg,maxValue)
              st.text = msg;
              pb.value = 0;
              pb.maxvalue = maxValue||0;
              pb.visible = !!maxValue;
              w.show();
         this.hit = function() {++pb.value;};
         this.hide = function() {w.hide();};
         this.close = function() {w.close();};
    function main(){
    var doc = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = [];
    var all_paragraph_styles = [];
    var list_of_masters_names=[];
    var list_of_masters=[];
    for (var i= 0; i<doc.masterSpreads.length;i++){
        list_of_masters_names.push(doc.masterSpreads[i].name);
        list_of_masters.push(doc.masterSpreads[i]);
    list_of_masters_names.push("undefined");
    doc.paragraphStyles.everyItem().name;
    for(var i = 0; i < doc.paragraphStyles.length; i++) {
               list_of_paragraph_styles.push(doc.paragraphStyles[i].name);
               all_paragraph_styles.push(doc.paragraphStyles[i]);
    for(var i = 0; i < doc.paragraphStyleGroups.length; i++) {
              for(b = 0; b < doc.paragraphStyleGroups[i].paragraphStyles.length; b++) {
                        list_of_paragraph_styles.push(doc.paragraphStyleGroups[i].name+"->"+doc.paragraphStyleGroups[i].paragraphStyles[b].name);
                        all_paragraph_styles.push(doc.paragraphStyleGroups[i].paragraphStyles[b]);
    // Make the dialog box for selecting the paragraph styles
    var the_dialog = app.dialogs.add({name:"Section start at paragraph style:"});
    with(the_dialog.dialogColumns.add()){
              with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Find:"});
              with(borderPanels.add()){
                        var find_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Apply Master:"});
              with(borderPanels.add()){
                        var change_master = dropdowns.add({stringList:list_of_masters_names, selectedIndex:0});
                        staticTexts.add({staticLabel:"Select \"undefined\" not to change"});
    the_dialog.show();
    // Define paragraph styles
    var myParagraph = all_paragraph_styles[find_first_paragraph.selectedIndex];
    var myMaster=(list_of_masters_names[change_master.selectedIndex]!="undefined")?list_of_masters[change_master.selectedIndex]:null;
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = myParagraph;
    var myFound=doc.findGrep();
    var i=myFound.length;
    var pBar = new ProgressBar("Sectioning");
         pBar.reset("Rabdare...", i);
    while (i--)
            pBar.hit();
            if (myFound[i].parentTextFrames[0].parent.constructor.name=="Character"){
                var myPage=myFound[i].parentTextFrames[0].parent.parentTextFrames[0].parentPage;}
            else{
         var myPage=myFound[i].parentTextFrames[0].parentPage;}
         var mySection;
         if (myPage.appliedSection.pageStart==myPage){mySection=myPage.appliedSection;}
         else{
         doc.sections.add(myPage,{pageNumberStart:1})};
        // mySection.pageStart=myPage;
         //mySection.pageNumberStart=1;
         if (myMaster) {myPage.appliedMaster=myMaster};
    alert("Acum e gata!!");
    app.doScript('main()',undefined,undefined,UndoModes.entireScript,'AutoSections');
    //main();

  • Is there a script for applying a certain style to several thousands of words arranged in a list?

    Hello, I have tried using FindChangeByList, but I'd pretty much do all the work of pasting every word on the brackets, so i could as well apply the styles by hand.
    So my project involves applying the same style to around 11 thousand words that appear in a book. Those words are mostly names and brands, and they appear throughout the whole text, so applying that style manually would be quite time-consuming.
    I have those words set aside in a list.txt
    Does anyone know if I could use that in any script and apply the style automatically?
    Like I said, pasting every single word into FindChangeByList is out of the question, just like applying the style word by word, it would take forever...
    ...thanks!

    Okay, for anyone that might be interested in this as I was, I found a solution.
    If you want to have a particular text expression on your .txt list to be used as a search parameter by your script, here are a few tips:
    Let's say you want to add the following 2 expressions on your list, without the quotation marks:
    a) "test, test."
    b)"[test] {test}"
    1 - Like Jongware said, you MUST abide by GREP syntax.
    2 - If you want to put an expression on your .txt list that DOES NOT uses characters that represent GREP syntax (example a) with regular text, commas and simple punctuation), you may simply add them to your list between parentheses:
         a) (test, test.)
    3 - If you want the script to search for an expression that DOES CONTAIN characters that are also used by GREP syntax (example b) you can try stuff like:
         b) (\p{Ps}test\p{Pe})
         note the parentheses, because it's a specific text expression
         then note the \p{Ps} and \p{Pe} that mark opening or (s)tarting and closing or (e)nding punctuation such as brackets, braces, parentheses...
    Here is a file with the GREP expressions that helped me solve my problems:
    http://www.kahrel.plus.com/indesign/grep_mapper.pdf
    Although this is a very specific matter and probably easily solvable by all the professional scripters here, I thought I'd share it since it took 3 whole days of studying for me to conclude everything.
    Thanks again, specially to Jongware

  • Scripts for Exporting Master/Work Rep

    Hi,
    I want to automate the export process and in turn was looking for any scripts for exporting the whole ODI Work/Master Rep. I checked the CLASS objects and we donot have any CLASS names for Repository exports.
    Thanks in advance for any answers..!

    Created for 10g [ http://odiexperts.com/automize-the-backup-using-odi-exports]
    but should work for 11g too :)

  • Script for applying object style to only tif, or eps or...(by extension)

    We need to apply object style to only eps files in doc, or tif.... How to do this? Maybe someone have a script?
    thanks

    @kajzica – I don't have a script for that, but it is scriptable. You surely mean that you want to apply the object styles to the container frame of the images, aren't you?
    A few minutes later – try the following ExtendScript (JavaScript) code:
    You could edit the names of the two object styles at the beginning of the script code.
    OR: you could first run the script, the script will add two object styles to the document that you can edit afterwards.
    The script will sort the EPS and the TIFs from the other image types.
    Make sure that all graphics are up-to-date and linked correctly!!
    //ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx
    //Uwe Laubender
    * @@@BUILDINFO@@@ ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx !Version! Thu Dec 12 2013 13:15:30 GMT+0100
    //Edit your style names here. Change the name between the two " " only!!
    //OR: edit your object styles in InDesign after running the script.
    var styleNameForEPS = "EPS-Containers-Only";
    var styleNameForTIF = "TIF-Containers-Only";
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    app.doScript(_ApplyObjectStylesToContainers, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Apply object styles to containers for TIF and EPS graphics");
    function _ApplyObjectStylesToContainers(){
    var d=app.documents[0];
    var allGraphicsArray = d.allGraphics;
    if(!d.objectStyles.itemByName(styleNameForEPS).isValid){
        d.objectStyles.add({name:styleNameForEPS});
    if(!d.objectStyles.itemByName(styleNameForTIF).isValid){
        d.objectStyles.add({name:styleNameForTIF});
    for(var n=0;n<allGraphicsArray.length;n++){
        //The EPS case:
        if(allGraphicsArray[n].getElements()[0].constructor.name === "EPS"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForEPS);
        //The TIF case
        if(allGraphicsArray[n].getElements()[0].constructor.name === "Image" && allGraphicsArray[n].getElements()[0].imageTypeName === "TIFF"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForTIF);
    }; //END: function _ApplyObjectStylesToContainers()
    Uwe

  • Script for creating grid spreads of photos from the Adobe Bridge

    Hi,
    Someone once showed me a script for being able to select multiple images while looking at them in the bridge and making grid layouts on pages from them. Does anyone know how to do that? Thanks!

    The only code that I have seen that does this sort of thing is to be found here. http://forums.adobe.com/message/5713633

  • Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 537, state 3, severity 16

    Hello,
    I've encountered issue during installation of SP1 to SQL Server 2012. After upgrade I'm getting this error in Event Log:
    Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 537, state 3, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline.
    If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script
    upgrade steps run to completion.
    Can someone point me direction how I can fix it? This is a production server and currently only way to make it working is to use T902 flag in SQL Server startup params. I've found some suggestions to check Data path if it exists but it does so this is not
    the issue here. Any ideas?
    I've found also here
    http://www.sqlservercentral.com/Forums/Topic1377073-1550-1.aspx#bm1378279
    suggestions for similar issue with SQL Server 2008 which that I should do:
    Via ssms:
    From msdb:
    Delete:
    dc_admin role
    Dc_operator role
    Dc_proxy role
    UlitityCMRReader role
    UtilityIMRReader role
    UtilityIMRWriter role
    but for not I didn't tried it yet. This is standalone SQL Server instance.
    Any help really appreciated.
    Regards

    Script returns the same error.
    System databases:
    1    1    760    -1    10    1048578    0    1    master        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf
    2    0    12768    -1    10    1048642    0    1    mastlog        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
    1    1    1024    -1    10    1048578    0    2    tempdev        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\tempdb.mdf
    2    0    64    -1    10    1048642    0    2    templog        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\templog.ldf
    1    1    288    -1    128    2    0    3    modeldev    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\model.mdf
    2    0    4464    -1    10    1048642    0    3    modellog    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\modellog.ldf
    1    1    28936    -1    10    1048578    0    4    MSDBData    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf
    2    0    3352    268435456    10    1048642    0    4    MSDBLog    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf
    are all in place where path shows.
    Before sending my message I've searched update script for "FROM master.sys.master_files" and I found script which you are showing me. I've made some digging and when I runned:
           SELECT physical_name
           FROM master.sys.master_files
           WHERE (name = N'master')
    it returned also path to one my customers database name which has filename set correctly but it's Logical DB name is master and mastlog. I'm running shared hosting company and I allow my customers to restore their DBs from .bak files but I have no idea why
    this customers logical name is set to master and mastlog. Probably when I change this names update script will work as it should. On the other hand in my opinion there should be some kind of fail safe mechanism for situations like this one.
    EDIT: After changing logical name for DB and log for mentioned DB your script runned fine so probably now when I remove T902 flag and restart my SQL Server update will run correctly. Big thanks for resolving this issue.

  • Pls correct my script for script label creation

    Hi,
    I want to add the script label name in Masterpages only which was in 'Text thread' options. Is this possible by script?
    This is my code
    var myTextFrame=app.selection[0];
    myTextFrame.label="textpage";
    var myNextFrame=myTextFrame.nextTextFrame;
    while(myNextFrame !=null)
        myNextFrame.label="textpage";
        myNextFrame=myNextFrame.nextTextFrame;
    Instead of first line I want to create this script label "textpage" for master page 'text thread' text frame only
    Instead of first line I want to create this script label "textpage" for master page 'text thread' text frame only. How to change my script pls help me?
    FYI:
    by
    hasvi

    @hasvi – I don't know if I understand you right. Do you want to label every text frame of a story with the same label value? As a starting point you want to work with a selected text frame of that story?
    If yes, select a text frame, could be any, and run that snippet:
    var textContainersOfStoryArray = app.selection[0].parentStory.textContainers;
    for(var n=0;n<textContainersOfStoryArray.length;n++){
        textContainersOfStoryArray[n].label = "textpage";
    Or do you mean you want to label the primaryTextFrame of the applied master spread, if you selected something on a "normal" page?
    That would be:
    //Object selected on "normal" page:
    var myPrimeryTextFrame = app.selection[0].parentPage.appliedMaster.primaryTextFrame;
    myPrimeryTextFrame.label = "textpage";
    Uwe

  • Use different master spreads with autoflow

    Hello,
    I have an XML document which I import into InDesign and apply some paragraph styles via XSL and the aid:pstyle attribute. This works fine and I can apply master spreads to pages with special paragraph styles by scripting.
    The problem is, that I use the autoflow function of InDesign CS5 and this creates pages which all base on the same master spread. If I reapply another master spread to a page manually the master (text frame) objects lie in the background; the already flowed text stays in text frames on top of the master text frames and doesn't flow through the new master text frames. I even don't know how to reflow this manually - not to mention how to do it by script.
    Has someone any idea how to achieve this reflow or how to use multiple master spreads with the autoflow function (maybe there is a configuration possibility to automatically select the master spread according to a paragraph style)?

    Nope. (well, of course it's always good to set it up before you start...)
    New master threads can be created after flowing the text too.
    If someone really messes up the setup, AF Pro even has a "Rebuild Current Story" option which will pick up everything about the master text frames even after the text in flowed into the document.
    I'm really proud of how it works!
    Harbs

  • Please help me resolve the Lync server 2013 deployment error: "An error occurred while applying SQL script for the feature BackendStore."

    I am getting an error in "Step 2 - Setup or Remove Lync Server Components" of "Install or Update Lync Server System" step.
    "An error occured while applying SQL script for the feature BackendStore. For details, see the log file...."
    Additionally, all previous steps such as: Prepare Active Directory, Prepare first Standard Edition server, Install Administrative Tools, Create and publish topology are done without any errors. The user that I used to setup the Lync server is member of:
    Administrators
    CSAdministrator
    Domain Admins
    Domain Users
    Enterprise Admins
    Group Policy Creator Owners
    RTCComponentUniversalServices
    RTCHSUniversalServices
    RTCUniversalConfigReplicator
    RTCUniversalServerAdmins
    Schema Admins
    I have tried to re-install all the things and started to setup a new one many times but the same error still occurred. Please see the log below and give me any ideas/solutions to tackle this problem.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Publisheracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Administrators;LCTBU\RTCUniversalServerAdmins.
    Found Parameter: Replicatoracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: Consumeracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Read-only Administrators;LCTBU\RTCUniversalReadOnlyAdmins.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Found Parameter: Role Value master.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcxds validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcxds validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcxds.
    Checking state for database rtcxds.
    State of database rtcxds is detached.
    Attaching database rtcxds from Data Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath, Log Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    The operation failed because of missing file '\\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath\rtcxds.mdf'
    Attaching database failed because one of the files not found. The database will be created.
    State of database rtcxds is DbState_DoesNotExist.
    Creating database rtcxds from scratch. Data File Path = D:\CsData\BackendStore\rtc\DbPath, Log File Path= D:\CsData\BackendStore\rtc\LogPath.
    Clean installing database rtcxds.
    Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Serveracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcshared validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcshared validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcshared.
    Reading database version for database rtcshared.
    Database version for database rtcshared - Schema Version5, Sproc Version 0, Update Version 1.
    Thanks and Regards,
    Thanh Le

    Thanks Lạc
    Phạm 2
    I Had similar issue i end up uninstalling and reinstallting but same issue, then i change the drive but same issue. It was I/O issue. After adjusting my I/O it fix our issue and installation went on without any issue. 
    If any one using KVM here is detail article 
    We just  give this option cache=‘writeback
    using this article http://www.ducea.com/2011/07/06/howto-improve-io-performance-for-kvm-guests/ and http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/ this fix my issue thanks 

  • An error occurred while applying SQL script for the feature BackendStore.

    Hello,
    I am using my AD in Windows Azure VMs. I created new VM of A3 (4 cores, 7 GB Memory) Windows Server 2012 R2, Port 1433 MSSQL added, made it a member of Domain and planned to install first Lync Server 2013 on it.
    In "Setup or Remove Lync Server Components" of "Install or Update Lync Server System", got an Red Coloured text "An error
    occurred while applying SQL script for the feature BackendStore."
    I have not enabled monitoring and archiving server in topology builder. I added "Network Service" and assign "Full Control" in Security Permissions of "C:\CsData" and "C:\LyncShare".
    I executed the SQL Setup Wizard and upgraded any instance to 2012.
    Please guide.
    Thanks, Divyaprakash Koli

    Please check you have enough disk space for the disk where the folders are.
    Check view log for detailed log information.
    The following link is a similar thread for you to refer:
    http://social.technet.microsoft.com/Forums/lync/en-US/a3cb9ab0-7451-4df5-af96-3d2784d1b075/an-error-occurred-while-applying-sql-script-for-the-feature-backendstore-for-details-see-the-log?forum=lyncdeploy
    Lisa Zheng
    TechNet Community Support

  • Script for master child relation

    we need script for maste child relation
    if i insert or delete or update in master table it should reflect in child table after running procedure (not trigger).
    fetch the value from master table and insert into child table using cursor.
    for ex:
    if i insert value in master table tab1 with column name emp_id, it should reflect other child table with the same column name emp_id.
    insertions should only be done in master table. not in child table..
    notes:it should be in cursor

    hallo
    This is our procedure.the procedure works fine for loop 3 with cursor c3.
    The other cursor 1 and cursor 2 are not working fine. they are fetching duplicate values(ex:D10,D10........).
    In this procedure we are fetching values from 3 tables and putting values in a single table.
    please find the solution the code is given below.
    code
    create or replace procedure employee_insert
    is
    cursor c1 is
    select * from department where
    not exists (select null from employee where employee.department_id=department.department_id);
    p1 department%rowtype;
    cursor c2 is
    select * from jobs where
    not exists (select null from employee where employee.job_id=jobs.job_id or employee.job_title=jobs.job_title);
    p2 jobs%rowtype;
    cursor c3 is
    select * from project where
    not exists (select null from employee where employee.proj_id=project.proj_id or employee.proj_name=project.proj_name);
    p3 project%rowtype;
    begin
    for p1 in c1
    loop
    for p2 in c2
    loop
    for p3 in c3
    loop
    insert into employee (EMPLOYEE_ID,EMPLOYEE_NAME,
    department_id,department_name,
    DATE_OF_BIRTH,job_id,job_title,
    HIRE_DATE,
    SALARY,proj_id,proj_name,
    PHONE_NUMBER,
    ADDRESS,EMAIL) values('E'||employee_id_seq.nextval,
    dbms_random.string('A', 8),
    p1.department_id,
    p1.department_name,
    TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2452641,2452641+364)),'J'),p2.job_id,p2.job_title,
    TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2452641,2452641+364)),'J'),
    Round(DBMS_Random.value(10,50)),
    p3.proj_id,p3.proj_name,
    '98'||'42'||Round(DBMS_Random.value(1000,5000)),
    dbms_random.string('A', 20),
    dbms_random.string('A', 8));
    end loop;
    end loop;
    end loop;
    Exception
    When others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    End;
    execute employee_insert;
    /

  • An error occurred while applying SQL script for the feature BackendStore. For details, see the log file

    Hello
    i got this error in step2
    Error: An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][09_05_16].log'
    here is full summary
    > Bootstrap-CsComputer
    Logging status to: C:\Users\administrator.RCC\AppData\Local\Temp\2\BootstrapFull-[2013_09_23][12_17_37].html
    Checking prerequisites for bootstrapper...
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoBootstrapperOnBranchOfficeAppliance...prerequisite satisfied.
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Host name: lync.rcc.local
    Disabling unused roles...
    Executing PowerShell command: Disable-CSComputer -Confirm:$false -Verbose -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Disable-CSComputer-[2013_09_23][12_17_46].html"
    Checking prerequisites for roles...
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite SupportedOSNoDC...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtcLocal...prerequisite satisfied.
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Checking prerequisite PowerShell...prerequisite satisfied.
    Checking prerequisite WindowsIdentityFoundation...prerequisite satisfied.
    Checking prerequisite SupportedServerOS...prerequisite satisfied.
    Checking prerequisite NoUnsupportedWinFab...prerequisite satisfied.
    Checking prerequisite SupportedSqlLyncLocal...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtc...prerequisite satisfied.
    Checking prerequisite IIS...prerequisite satisfied.
    Checking prerequisite IIS7Features...prerequisite satisfied.
    Checking prerequisite ASPNet...prerequisite satisfied.
    Checking prerequisite KB2646886Installed...prerequisite satisfied.
    Checking prerequisite BranchCacheBlock...prerequisite satisfied.
    Checking prerequisite WCF...prerequisite satisfied.
    Checking prerequisite WindowsMediaFoundation...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtcLocal...prerequisite satisfied.
    Checking prerequisite VCredist...prerequisite satisfied.
    Checking prerequisite SqlNativeClient...prerequisite satisfied.
    Checking prerequisite SqlClrTypes...prerequisite satisfied.
    Checking prerequisite SqlSharedManagementObjects...prerequisite satisfied.
    Checking prerequisite UcmaRedist...prerequisite satisfied.
    Checking prerequisite WinFab...prerequisite satisfied.
    Checking prerequisite MicrosoftIdentityExtensions...prerequisite satisfied.
    Checking prerequisite SqlInstanceLyncLocal...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtc...prerequisite satisfied.
    Checking prerequisite RewriteModule...prerequisite satisfied.
    Checking prerequisite SpeechPlatformRuntime...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ca-ES_Herena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_da-DK_Helle...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_de-DE_Hedda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-AU_Hayley...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-CA_Heather...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-GB_Hazel...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-IN_Heera...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-US_Helen...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-ES_Helena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-MX_Hilda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fi-FI_Heidi...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-CA_Harmonie...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-FR_Hortense...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_it-IT_Lucia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ja-JP_Haruka...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ko-KR_Heami...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nb-NO_Hulda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nl-NL_Hanna...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pl-PL_Paulina...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-BR_Heloisa...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-PT_Helia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ru-RU_Elena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_sv-SE_Hedvig...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-CN_HuiHui...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-HK_HunYee...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-TW_HanHan...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ca-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_da-DK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_de-DE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-AU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-GB_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-IN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-US_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-MX_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fi-FI_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-FR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_it-IT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ja-JP_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ko-KR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nb-NO_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nl-NL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pl-PL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-BR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-PT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ru-RU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_sv-SE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-CN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-HK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-TW_TELE...prerequisite satisfied.
    Checking prerequisite UcmaWorkflowRuntime...prerequisite satisfied.
    Installing any collocated databases...
    Executing PowerShell command: Install-CSDatabase -Confirm:$false -Verbose -LocalDatabases -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Install-CSDatabase-[2013_09_23][12_17_52].html"
    An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][12_17_54].log'
    what should i do?
    Please help me

    Hi,
    The issue may be related to disk read and write cache. Here is a similar case for your reference:
    http://blog.kloud.com.au/2013/07/15/publish-lync-2013-with-2012-r2-preview-web-application-proxy/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Kent Huang
    TechNet Community Support

  • How can I add a library asset to a specific master spread?

    Hello! I am new to the forums and rather new to javascript as it relates to indesign so I apologize if this is rudimentary.
    I am building a script that automates new document creation for our company and have run into a problem with placing library assets.
    I want to add a library asset to a specific master page by name, but I cannot find a way to do this.
    I can get assets to place into my document with this:
                var t = app.libraries.item(0);
                var libTapeStrip= t.assets.itemByName('Tape Strip');
                var myTapeStrip = libTapeStrip.placeAsset(myDocument);
    However, the asset is being placed on a master spread that I had previously added to the document. It seems to be the active or front most spread because when the script is complete and I create a new window that spread is what is displayed with the asset on it.
    I would like to place the asset on another master spread, but placeAsset() only accepts documents and text boxes. I have also looked on a way to bring the master spread I want to the front, but cannot find this either.
    If anyone can lead me in the right direction I would appreciate it!!
    Thanks,
    Ben

    @Benjamin – You could make the spread (or the page) where you want to place that asset the "activeSpread" or "activePage", place the asset and then go back to the old active one.
    Something like this:
    (Here I assume that you want to place your asset on a master spread named "A-Master" and the asset is the first in the one and only library file that is open.)
    var myDocument = app.documents[0];
    var myMaster = app.documents[0].masterSpreads.itemByName("A-Master");
    var myLibrary = app.libraries[0];
    var myAsset = myLibrary.assets[0];
    var myOLDActiveSpread = myDocument.windows[0].activeSpread;
    myDocument.windows[0].activeSpread = myMaster;
    myAsset.placeAsset(myDocument);
    myDocument.windows[0].activeSpread = myOLDActiveSpread;
    Uwe
    Message was edited by: Laubender
    Message was edited by: Laubender [Nothing edited in the code.]

  • [AS CS3-4] Delete applied master, entirely deletes the master from doc?

    Here's what I am trying to do: Add a page at the end of the document. Then, if there is a master page applied automatically, like "A-Master", to delete it so the page has "[None]" master applied.
    I've tried several variations on applying "[None]" or "None" or nothing or null, which do not seem to work.
    I also have a script that I thought worked, but it actually COMPLETELY removes the master spread from the entire document. Clearly not what I intended.
    Any suggestions on how to do this?
    Non-Functional example script:
    tell application "Adobe InDesign CS3"
    tell document 1
      --page 1 has "A-Master" applied
       tell page 1 to delete applied master
      --"A-Master" is now gone from document
    end tell
    end tell

    On 3/6/09 2:18 AM, "Dave Saunders" <[email protected]> wrote:
    > I'm not sure what the AS syntax is.
    set applied master of page 1 to nothing
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

Maybe you are looking for

  • Is there a solution for my "files in use" installation problem with Adobe Reader XI?

    I have tried repeatedly to download Adobe Reader XI (11.0.07), but I keep getting a "files in use" message that indicates my current version, Adobe Reader 8.1, is using files that need to be updated by the download's set up. The message directs me to

  • How can i connect to a Database Server (live data)?

    hi, i'm trying to figure out how i can create a dashboard that's connected to live data coming from a Database server.  i have the username and password and the DB name, but can't find a direct way from within SAP dashboard design where i can make th

  • Cannot be heard at all

    When using Skype # to call out to landline, businesses (usually) I can hear them perfectly but they do NOT hear me at all....not BAD sound just NO sound on their end...many different attempts and different business numbers ....does not happen with re

  • Which Helvetica font do I want to purchase?

    This is most likely a silly question, but I need to be sure.   I have just learned the hard way on how to try & only use non-base 14 fonts for pdf fillable forms in order to maintain a manageable file size. I would like to standardize on Helvetica. 

  • WEIRD HISSING SOUND IN GB3

    hey everyone, im having some trouble with my imac/mbox/garageband. Sounds will play out of my studio monitors through the mbox, but when i go to record, it records a really loud hiss/static. Can anyone please help me out?