DBA Tips Archive for Oracle

  

Search & Win   click me  


Creating Source Control Workareas with Command-Line Example

by Jeff Hunter, Sr. Database Administrator


There are two ways to start a command-line session for Oracle SCM:

  From the Start Menu:    Repository Command Line Tool
  From a DOS Prompt:      %ORACLE_HOME%\bin\cktl61.exe
The following example command-line script can be used to upload Java files into the repository for the first time:
C:\> cktl61

  Repository Command Line Tool: Production on 10-May-03, 22:07
  Release 9.0.2.91.22  - (c) Copyright 2002 Oracle Corporation. All Rights Reserved

  REPCMD> connect repos_manager/manager@custdb_jeffreyh3

  Connected to Oracle Repository (TM) : Release 4.0.12.91.9 - Production
  CDAPI Version 4.0.12 - Production


      -- Create a workarea with simple rule latest(MAIN)

  REPCMD> mkworkarea jdev_code_wa -rulatest(MAIN)


      -- Set this workarea as the current default

  REPCMD> set wa jdev_code_wa


      -- Upload from a local directory into the SCM Repository

  REPCMD>jdev_code_wa>>\> upload C:\java_code\* jdev_source_fldr -s


      Creating jdev_source_fldr...done

  C:\java_code --> jdev_source_fldr
    Fetching filesystem information...done
    Fetching file information from repository...done
    Creating TestClass.class...uploading (1.017 KB)...done
    Creating TestClass.java...uploading (570 bytes)...done
  2 file(s) uploaded to jdev_source_fldr

  2 file(s) uploaded from 1 folder(s)
  1.587 KB uploaded in 1.873 seconds

      Fetching repository folder list...done


      -- Check in and create first version of all uploaded files and folders.

  REPCMD>jdev_code_wa>>\> ci * -s

  Searching for matching checked out\new objects in root folder \ >>
  Searching for matching checked out\new objects in Folder \SYSTEM FOLDER >>
   >> Checking in Folder - \jdev_source_fldr ... done.
  Searching for matching checked out\new objects in Folder \jdev_source_fldr >>
   >> Checking in File - \jdev_source_fldr\TestClass.class ... done.
   >> Checking in File - \jdev_source_fldr\TestClass.java ... done.

   3 object(s) matched criteria
   3 object(s) successfully checked in


      -- Lastly, commit all changes - this is a database transaction

  REPCMD>jdev_code_wa>>\> commit

  All updates have been committed


      -- Exit Oracle SCM

  REPCMD>jdev_code_wa>>\> exit

  Disconnected from Oracle Repository (TM) : Release 4.0.12.91.9 - Production
  CDAPI Version 4.0.12 - Production


Copyright (c) 1998-2012 Jeffrey M. Hunter. All rights reserved.

All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.

I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Monday, 12-Aug-2002 00:00:00 EDT
Page Count: 5661