Script for Importing data

Hii All
I want to run import of all the datafile s with help of script
I have many datafile s with differant users and I want to run db import
Plz Help me How to write a script .
Thanking You

GaurAVS,
I don't know what were the reaosns that made you selected this option, question did you try using any other options to move data from source to destination. Couple of questions for you?
1. One single export dump for each schema user or is it more than one file?
2. I assume from your earlier post, you got more than 50 schema users in your database?
Here is simple bash script, assuming you have one export dump file for each schema user. Make a directory call data and move all the dump file, please read script carefully for more instruction and modify according to your needs.
In addition before running this script on linux box run follwoing from command prompt
$dos2unix import.sh
#!/bin/bash
function importfile
     echo "importing $file for user $1"
     imp $1/$2 full=y file=$file log=./data/`basename $file dmp`log
     test=$?
     if [ $test -ne 0 ]
     then
            echo "Importing for user $1 failed ..."
         exit 1;
     fi
function listfile
    # you have to supply username and password here
       for file in ./data/*.dmp
       do
         echo "exporting $file for $1"
         # If you used username as filename for each export dump
          unset username
          +username=`basename $file .dmp`
          echo "Username is set to $username"
          # Now to get password for this username ; you can create a file with
          # this format username=password
          # $1 -- Username
          # $2 -- Password
          unset pw
          pw=`cat ./data/pwd.txt.txt|grep $username|cut -d'=' -f2`
          echo "Password is set to $pw"
          # You have to write a small function to get username and password
          importfile $username $pw
           done
listfile $1 $2Edited by: OrionNet on Dec 20, 2008 11:47 PM

Similar Messages

  • Automate script for import data

    automate script for importing data to the cube from txt files.
    Ex: - I have below 2 files for import
    aaaa.txt
    bbbb.txt
    For the above simply i can write esscmd or Maxl script for importing files .
    Esscmd :
    IMPORT 3 "\aaaa.txt" 4 "N";
    IMPORT 3 "\bbbb.txt" 4 "N"
    my question , suppose if some more files added to the existing files, for example cccc.txt got added ,how can i write a code for this?

    Well I guess this will do
    dataDir=" " # Give the data directory path here
    maxlFile="maxl1.msh"
    cd $dataDir
    for file in `ls *` ;
    do
    maxlStmt="import database sample.basic data from data_file '$file' using rules_file 'xxx.rul'
    on error write to 'xxx.log';";
    printf $maxlStmt >> $maxlFile
    done
    ls * is lists all the files in the directory. If you want to be more specific and if you yhink tat your data folder may contain more files then you can use "ls *.txt" if your file extension to load is txt.
    Well I haven't tested this as I am on vacation...So you can just follow the similar way.
    This is only for the 3rd point which you said

  • How to Flip the Sign using Calculation script for historical data

    I am currently using Essbase 9.3.1. Its required to flip sign for a specific set of accounts for that i am currently using UDA's to flip the sign.
    But now i need to flip the sign for the historical data too. Is there any possible way to flip the sign using calculation scripts for historical data. Kindly let me know your suggestions.
    Many thanks in Advance...
    Edited by: [email protected] on Jul 30, 2009 9:37 PM
    Edited by: [email protected] on Jul 30, 2009 10:58 PM
    Edited by: [email protected] on Jul 30, 2009 11:01 PM

    Of course there is. This is the kind of calc script that only gets run once, so make usre you test it well before doing it on production and make a backup of production before doing it.
    It would be something like
    Fix(time frame, accounts to be flipped, level zero other dimensions)
    actual = actual * -1;
    EndFix
    Cal dim dimensions
    Note, I chose actual, but you could do it for any dimension that has a single or only a couple of members. What ever dimension you choose to do the calculation on, it can't be included in the fix statement

  • Address Book field names changing for "imported" data

    I'm migrating from a thousand year old Palm Pilot that has served me so well to an iPhone. So it's time to get my contacts into OSX Address Book.
    I have tried moving the data a couple of ways - exporting vCards and text files from the Palm Desktop software.
    I did extensive editing of the text file in MS Excel to get the data into good order.
    I have set up a template in the Address Book preferences to create fields that I want/need. Some are generic default field names, some have custom names. eg. I want to see a field called "Bus. Phone" not one called "work". Call me picky.
    I get the same basic result no matter if I import the vCard file or a text file - The names of the fields just show up with very generic names in the imported data. I should note that creating a NEW record seems to use the field names that I have specified in the preferences.
    Also, when importing the text file, Address Book asks me to assign the field names for certain fields (while it seems smart enough to know what labels to use for other fields all on it's own). However, the Field Names available in the drop down menu ARE NOT the ones that I have set up in the prefs. I seem limited to the generic default field names only.
    Can anybody tell me how to get the field names to be what I want them to be for address data that is being imported like this?
    Thanks for any suggestions - this has been driving me crazy as it would seem to me to be a pretty basic process. (I mean, the Address Book has this import functionality and custom field name functionality built in so it should work right?!)
    Allen

    No sooner do I ask than I notice that other people have asked the same question. In one of the reply's I saw mention of a product called "Abee".
    I tracked it down and it did the job for me! Custom Field names live on!
    It's at:
    http://www.sillybit.com/abee/

  • Tabular Modeling. What is the best practice for importing data into VS to limit the records in the designer?

    Should I wrap the queries in a procedure with a @StartDate and @EndDate and create a test partition to pass a small date range? 
    Or can i use the Table properties screen to put the command there and will it run and not be affected or affect the partitions?This would be nice if this SQL statement on this screen was independent of the partitions and I could just leave it with the the
    command text = EXEC TransactionDetail '2014-01-01', '2014-05-31' Especially since if you have many tables that load based on a date range. i would not want to jump in and change that query on all of them.
    Is there a a way to have a parameter in the project so all tables would get the same @startDate and @EndDate so I could change it in one place?
    And I am not stuck to these questions\options, If there is a better way to mass change the queries to run a subset of data for the designer I'd like to hear it.
    Thank You,
    Phil

    Hi Phil,
    According to your description, you are looking for the best way to control the rows that are loaded into a table, right?
    When importing data to a table of tabular model, we can apply filters to control the rows that are loaded into a table. After you have imported the data, you cannot delete individual rows. However, you can apply custom filters to control the way that
    rows are displayed. Rows that do not meet the filtering criteria are hidden. For the detail information about it, please refer to the link below.Filter Data in a Table (SSAS Tabular)
    If I have anything misunderstand, please point it out.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here
    Charlie Liao
    TechNet Community Support

  • How to make an insert script for CLOB data types?

    I need to have an insert script for Oracle 11g where I insert large texts into a CLOB field
    I exported data from a source table using TOAD's export dataset and the insert statements option, so it generates a script of just simple insert into statements with the clob strings in the values clause within single quotes.
    While most of the inserts succeed, several fail with the error: string literal too long
    How can I insert long texts into clobs?
    One workaround I was considering, is maybe breaking up those inserts which are too big, so that it inserts a chunk, and then does an update to append additional chunks? not sure if that would work either
    first wanted to get any ideas from the oracle experts here in case there is a much easier, non-manual labor intensive way.

    Thank you for that informative link, Raj
    I wouldn't be able to use SQL Loader for this though, this is something that gets submitted to a DBA in a request and it must be in a script that can be run in Sql Plus, and it cannot pull it from a table or file.

  • Using  FDM Import Action script to import data from ERPI table "tdataseg_t"

    Hi Experts
    I have extracted data from EBS using ERPI and loaded into the intermediate table "tdataseg_t"
    I am trying to use Import Action script within FDM to extract data from "tdataseg_t" table (where ERPI extract data is stored) as i could not use the normal import script.
    Requirement : I have to restrict the custom 2 dimension based on Account dimension.
    Dim Account
    Account = ???? ( i am struck here)
    If Account = 1000 to 5000 Then
    Custom2 = Right( product , 5)
    End If
    but , I could not find the exact syntax to call the Account dimension from the "tdataseg_t" table.
    Please Advise
    Thanks
    Sak
    Edited by: user12292415 on Feb 26, 2012 1:19 AM

    Hello,
    Importing data via a manual script defeats the purpose of ERPi. As it will not provide you an audit trail, drill-through/drill-back, etc.
    Your best bet is to use the default settings by the software. Just because it returns more records than you want is not a bad thing. You can conditionally change/alter the information either in an EventScript inside of FDM or by mapping the un-needed information to IGNORE.
    Thank you,

  • Is it possible to create an Apple Script to import data from a web data feed (RESTful XML/JSON)?

    Before I get started looking for a programmer, does anyone know if it will be possible to create a script that will allow Numbers to connect to an external data feed in either XML or JSON? I want to enable some colleagues who use Mac to connect to the same data feed that Excel for Office connects to.. Thanks,

    It is definitely not hard to import XML or JSON data via an AppleScript. As an amateur tinkerer, I found a way, for example, to bring in OFX data from my bank (OFX is a flavor of XML) using the XML parser built into System Events, which is AppleScriptable.
    How satisfied your colleagues would be with the solution, though, will depend on what you mean by "connect to an external data feed." If you are dealing with datasets in the thousands of rows and need frequent and rapid response, then you may not be happy. In that kind of situation you would need to expect at least a few seconds of wait time every time you "refresh."
    If, as in my case, you have only a few hundred rows and don't need to bring the data in every few seconds, then the AppleScript solution is very practical. The programmer could probably goose the performance and make the job easier by using AppleScript as a wrapper for a script in Python or another language that is faster than AppleScript at parsing XML and JSON.
    SG

  • FDM Script to import data

    Hi,
    I'm new to FDM scripting. So any pointers will be appreciated. I need to import a TB with the following format in exel file.
    row1 ***CostCenter Number***
    row2 ***TB name*
    row3 - Other parameters
    row4 - Blank
    row5 - Data headers
    row6 - Data begins - format given below -
    row7 - Account Desc Opening Bal Closing Bal
    I have created an import format with the 4 fields - CostCentre, Account,Desc and closing bal. Now my question is -
    1. How do i create script that picks the costcenter number from row1 ?
    Thanks in Advance!!

    That format will not work in an excel file, FDM requires a specific excel template, also the FDM excel templates do not use import scripts,so first convert to a csv file.
    You will then need to use a temporary variable for this e.g. RES.PvarTemp1 and create 2 import scripts
    Assuming that cost centre is the only value on line one of the file what you need to do is:
    Attach an Import script to the Amount entry in your import format and put in the following code (this assumes cost centre is always the first header line and your script is called GetCostCentre)
    If Not Len(RES.PvarTemp1) > 0 Then
    RES.PvarTemp1 = DW.Utilities.fParseString(strRecord,4,1,",")
    End If
    GetCostCentre = strField
    Attach an import script to the CostCentre entry in the import format called SetCostCentre, it will have one line
    SetCostCentre = RES.PvarTemp1
    There is a very similar example in the FDM admin guide Scripting cahpter which has a bit more description.
    Edited by: SH on Dec 7, 2012 11:17 AM

  • Problem in sap script for Item data

    Hi Guys ,
    Although I am working in ABAP for last 1 year but I am new to SAP script , This is first time I am doing this -
    I am creating excise invoice profarma and able to print all that data except J_1IEXCDTL ( Item data ) that I have to display in loop ,
    I am using
    LOOP AT ITAB_J_1IEXCDTL.
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                ELEMENT = 'ITEM_VALUES'
                WINDOW  = 'MAIN'
           EXCEPTIONS
                ELEMENT = 1
                WINDOW  = 2.
    ENDLOOP.
    My problem is that this is working fine for 1 record but if there are more than 1 record in ITAB_J_1IEXCDTL. , it is showing only first record ,
    Other thing i want to know what is connection of element between Driver program and sap script , Can we give any name to element and it doesnt make any impact on Sap script
    i have done same in my program ,
    Thanks in advance
    Amit

    my problem is solved now ,
    Thanks

  • I need a script for importing a PDF into IDCS3

    I used the script that came with InDesign... specifically PlaceMultipagePDF.jsx...
    And that worked well.. except for the fact that we just found out that this large PDF has oversize pages (larger than 8.5 x 11) and that plugin is not shrinking to fit. I had a plugin for IDCS2 that would give me import options.. but this PlaceMultipagePDF.jsx doesnt seem to have any options...

    There's a script in the InDesign Interchange site called PDF Multipage Import MAC that will do it, if you know the percentage that you want the PDF scaled to.
    It's my Martin Sretr. It's written for CS, but I think you know how to deal with that, Chris.

  • Script for current date

    I have a document javascript that used to work. It prints the current date upon first opening the PDF into a field called Today. Thereafter, the date does not change no matter how many more times the PDF is opened.
    var f = this.getField("Today");
    if (f.value == "") f.value = util.printd("mm/dd/yyyy", new Date());
    I'm using Acrobat 9 Pro, and for some reason this script no longer works in version 9. If anyone can assist to correct this sript, I would greatly appreciate it.

    It works fine for me in Acrobat 9.2.0 (under Windows 7). If the field is empty when the form opens, it inserts the current date. If the field is not empty, it does not do anything.
    Are you absolutely sure that the field 'Today' is empty when you open the PDF?

  • Schedule Task within script for import module

    Hi,
    Unable to powershell script in Scheduled task. I have added the import AD module in the powershell script.Every time I need to login into Windows 2008 R2 server and then the script runs successfully.. if I log off the server it doesn't runs..
    Do you have any solutions for without login on server the script runs sucessfully
    Regards
    KunalR

    Hi,
    We can't help you without seeing your script.
    Also, post exactly how you have the scheduled task set up.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Needed:  Script for importing Photoshop layers, converting to shape layers

    I've uncovered what seems to be a "bug" in After Effects CS5.  When I import photoshop artwork in layers, and then try to apply effects to an individual layer, such as a color change, a drop shadow, or pretty much anything including puppets, when I later try to render the movie, it crashes.
    My solution has been to laborously go through and convert any layer where I need to apply effects into an AE shape layer, copy the mask over, etc.  Its not much fun, but it does solve the bug.
    I know this could be done with a script, but I don't have the chops or the time to write it.
    Has anybody else written such a script?
    In essence, it needs to:
    1.  import a Photoshop file in layers.
    2.  select each layer in the file and
    3. create an AE layer
    4.copy the mask from the PS layer and
    5. paste it onto the AE layer.
    6. keeping the same registration and
    7. keeping the color of the PS layer.
    Easy, huh?  For somebody who knows what they're doing, which doesn't include me.....
    :<)McFrisco

    Wouldn't it be just more efficient if you provided one of your crashing PSDs along with the AE project so we can check and verify? If you contact me off-forum I can assure you confidentiality and even provide you with an upload location. I even looked up your otehr threads, but I feel we never really reached a point where we could make out something definite, so rather than trying to fix things the hard way, it may make more sense to let someone take a look. This may be something trivial, after all and be perfectly fixable by doing something differently...
    Mylenium

  • OTL SQL script for timecard data

    Hi,
    I'm looking for a sql script to create a view to quiry timecard data including status, employee name, hours, project, task, type, etc.
    Any help or pointers will be greatly appreicated.
    Joon

    The query will depend on a lot of factors related to the OTL setup and timecard layouts. You can't just have a generic query.
    --Shiv                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • I am trying to display three lines of text but blank lines are being inserted between them.

    I have a section on the right side of my homepage for upcoming events.  It was displaying fine until I changed the data and now the three lines are displaying blank lines between each one.  Here is the code. <h2 class="meeting"> </h2>       <h2 class

  • Sandee mendelson reid : Oracle Error: ORA-01403

    Hi everyone!!! Please could you tell me why I get an error (ORA-01403: No data found) when executing a sql query on Oracle 8i? The query is: "INSERT INTO TABLE1 SELECT * FROM TABLE2" NB: when I run the query "SELECT * FROM TABLE2" I get property regi

  • Including a new (z)field in XD01 - SAP 4.6

    Hi experts, I´d like to know how to (if it´s possible) insert a new Z field in the standard transaction XD01 in SAP 4.6 version. My request is just to modify the KNA1 table by including this new field an also adjust the XD01 screen to show the new fi

  • Re: Unit Tests with Jemmy

    I have a need for running headless beyond just for testing. I'd like to make a library that uses JavaFX properties/tasks that can either run headless, or can use the same tasks to run in a GUI that can display the progress info generated by the tasks

  • Can't open SVG (CS3) in CS2.

    Hi, I can't open an SVG file in Illustrator CS2. The SVG file was made in CS3 (checkbox ticed for compability with CS2). I'm running XP. This is the steps I've done. 1. Graphic created in Illustrator CS2, and saved as EPS-file. 2. EPS-file opened in