Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Renaming the shared folder path

Received Response
249
Views
21
Comments
2

Answers

  • @Pedro F : didn't you have some fun not long ago with search&replace and paths?

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    True actually. Love the double encoding.

  • Charles M
    Charles M Rank 6 - Analytics Lead

    Hi,

    I was able to run the search & replace. This time, It looks like it made some changes (I copied the list out to a text file). Couple things: I noticed that it did not do anything with any of the users folders, other than the one of the user that I ran it as; seems like there were permissions errors.

    Also, I still see the same name of that folder. Do I need to bounce the application, or reload the catalog in some way for the changes to reflect?

    Regards,

    Charles

  • Oh, I forgot to write it but sounded obvious in my mind

    You still have to rename the folder yourself by hand (in cat manager, not on the filesystem), just a right click rename or something like that.

    The "search & replace" will only change all the references so that the various pieces will link to the new folder name.

    True, "search & replace" is limited by the catalog permissions, so you have in general no access to user folders.

    Do your users have links in their personal folders to content from the shared folder? I wasn't thinking at this case, so to solve it and if you want to be sure I guess that the search & replace by command in offline mode will cover that case as it is supposed to be able to go into users folders for that.

    Just run "runcat.sh -help" and you will see there is a command for search and replace there as well and it will have a parameter to say online or offline.

  • To recap the various pieces above, for your need the most effective way (IMHO) is runcat.sh by command line.

    runcat.sh -cmd rename -help

    runcat.sh -cmd replace -help

    These 2 gives you the help of the 2 commands with examples and all the options. I would run them in offline mode as it will also cover the /users folders.

    To practice the commands you can also create a copy of the whole catalog (linux file system copy of the folder containing "root" and "root.atr") somewhere else on the disk and then execute runcat.sh against that copy with " -offline <path to the folder> " and checking if the XML inside the objects got updated correctly (encoding in command line can still be different than Catalog Manager GUI).

    Actually I just saw something which could help in 12.2.1.3.0 and no idea if it was already there in 11.1.1.9, look at the "help" for the rename command:

    # Command : -cmd rename -helprename                  Renames an item in the catalogDescriptionRenames an item in the web catalogFor more information, please see the Oracle Business Intelligence SuiteEnterprise Edition's Presentation Services Administration Guide.Syntaxruncat.cmd/runcat.sh -cmd rename        -old <old path> -new <new path>        -smart        [-folder <path{:path}>] [-skipFolder <path{:path}>]        [-folderFromFile <path of inclusion list file>] [-skipFolderFromFile <path of exclusion list file>]        ( (-offline <path of catalog>) | (-online <OBIPS url> -credentials <credentials properties file>) )Basic Arguments        -old <old path>        -new <new path>Optional Arguments-smart                          Indicates that references to the item being renamed must be fixed as well-folder <path{:path}>           Which folders in the catalog to fix all references (only when -smart is specified)-skipFolder <path{:path}>       Which ones not to (only when -smart is specified)-folderFromFile <path of inclusion list file>           File containing folders in the catalog to fix all references (only when -smart is specified)-skipFolderFromFile <path of exclusion list file>       File containing which ones not to fix references(only when -smart is specified)Common Arguments-offline <path of catalog>-online <OBIPS url>-credentials <credentials properties file>      ----- Sample Credential File ------                                                @ login=weblogic                                                @ pwd=weblogic1                                                -------------------------------------folderFromFile <folder from file>              ----- Sample Folder From File ------                                                /shared/groups/misc                                                /shared/groups/_filters                                                -------------------------------------skipFolderFromFile <skip folder from file>     ----- Sample Skip Folder From File ------                                                /shared/groups/_portal                                                /shared/groups/walmart                                                ------------------------------------Exampleruncat.cmd/runcat.sh -cmd rename -offline c:\oraclebi\data\web\catalog\paint -old "/shared/financials/2008 Model" -new "/shared/financials/2009 Model""Return status from Catalogmanager command : 0"

    The "smart" argument sounds nice ... I must admit I never used it or tested it, and so I have no idea how smart it really is ... I just hope it doesn't just create a shortcut with the old name pointing to the new name

  • Pedro F
    Pedro F Rank 6 - Analytics Lead

    A bit late to this and as usual, @Gianni Ceresa and @Christian Berg already told you all you need to know but just a few quick notes.

    I prefer to use runcat through the command line rather than the catalog manager, you just have more options. When it comes to what you're looking for (replacing paths), that can easily be done through the runcat replace command Gianni just posted. However, you do need to be aware of special characters as they mentioned, what you see in the front-end (analytics) it's not necessarily the value that exists in the physical file. To make sure, it's always better to open the object you're trying to change the path reference with an editor like Vi just to look at the characters.

    For most things though, you should be able to replace most of your paths by doing something like:

    runcat.sh -cmd replace -offline $CATALOGPATH -folder "/shared/ABC:/shared/XYZ" -old "/shared/Finance/Summary Analysis" -new "/shared/Finance/Summary"

    $CATALOGPATH is the path to your catalog such as - .../user_projects/domains/bi/bidata/service_instances/ssi/metadata/content/catalog

    with the folder option you can specify in which folder you want to run the replace operation (in this case it would only run on objects inside folders ABC and XYZ under the shared folder) and you would be replacing all paths "shared/Finance/Summary Analysis" by "/shared/Finance/Summary".

    In general, if you're just trying to replace paths that have, at most, space characters, what I put there will work. If you have any other special characters, you may need to try a couple of times before getting it right.

    Most importantly, definitely do a backup of the whole catalog before running any of these commands, there's no undo option!

    @Gianni Ceresa never tried that -smart option, so don't know how smart it is.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    It literally just does what the GUI does with "keep references" or "update references"

  • Charles M
    Charles M Rank 6 - Analytics Lead

    Thanks Gianni. I was able to do the rename from the catalog manager. Seems like everything is ok, as far as the new path is concerned. I was able to access/view all of the dashboards in the shared folder without any issues.

    Also, I did a search on the old path, and tried a find and replace again, but neither found any matches for the old path

    I am going to work on the command line tool now for a bit, and see if I can find anything out about the users' folders. We actually don't have very many individual users in our Dev instance, so I'm not even sure if anyone has anything saved with that old path in it.

    Regards,

    Charles

  • Charles M
    Charles M Rank 6 - Analytics Lead

    Ok, I was able to use the command line method. I can see that it made all of the changes under the shared folder. However, it did not make any changes to any of the users folders. Strange, because when I did it with the catalog manager, it did modify one user folder (the user I was logged in as ... ).

  • Charles M
    Charles M Rank 6 - Analytics Lead

    Hi All -

    Thanks for all of the input on this. I think we answered/covered my question ... and added some clarifications & helpful hints.

    I appreciate the participation.

    Regards,

    Charles