Get a Jumpstart with our Sample Apps
Results 1 to 5 of 5

Thread: Make a copy of a production table for a test database

  1. #1
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    23

    Default Make a copy of a production table for a test database

    Background
    I want to make a copy of a table I'll call Jazz from our production database and add it to my test database.
    All the file names associated with the Jazz table are as follows:

    Jazz.dbf
    Jazz.cdx
    Jazz.DDd
    Jazz.DDm
    Jazz.DDx

    I plan to copy these files then in my Alpha5 Developer session do "File > Add Table/Set" to get Jazz into my test database.

    Question
    Will I capture everything about this table by following the procedure described above? Is there anything from the Jazz.ADB database file I will not capture?

    I see an existing thread called: "Copying tables with embedded Jpgs" that basically describes/validates what I'm asking,
    posted by Dale Stansbery, Sep 2003.

    So this is probably an OK thing to do, but not copying anything from the database or Jazz.ADB file bothers me.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,697

    Default Re: Make a copy of a production table for a test database

    not copying anything from the database or Jazz.ADB file bothers me.
    The .adb file contains a "description" of what constitutes the database. If you duplicate a table, copy it to another directory, and Add Table/Set to another database, you have update the .adb file for the target database.

    You could run into trouble if the table field rules referenced a table not in the target database, if there are global user defined functions used not in the target, etc.
    There can be only one.

  3. #3
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    23

    Default Re: Make a copy of a production table for a test database

    Hi Stan,

    Is there a place where one can go and see if there are any global variables and/or functions defined in a database?

    Mark

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,697

    Default Re: Make a copy of a production table for a test database

    Global user defined functions are found on the code tab of the control panel. You can right click, choose Export, select them, and export them. The resulting file, copied to another machine, can similarly be imported.

    Global variables can be defined almost anywhere, you can find their names and current values by going to the interactive window and

    ? user_variables_enum(global_variables())

    This will work if all of them are currently initialized by whatever means they are defined such as opening a layout, etc.

    You can copy and paste the result into your text editor of choice if you want to preserve the list or

    save_to_file(user_variables_enum(global_variables()),"drive_path_filename_of_your_choice.txt")
    There can be only one.

  5. #5
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    23

    Default Re: Make a copy of a production table for a test database

    Thanks Stan, a lot of great information on global variables!

    This will keep me busy for awhile sorting all this out. I may get back to you with a few questions.

    Thanks again ... Mark

Similar Threads

  1. Retrieve Production Database to IDE
    By billkay in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 03-04-2011, 08:51 PM
  2. move or copy table to different database?
    By CyberCrone in forum Database Design
    Replies: 4
    Last Post: 12-12-2009, 01:05 PM
  3. Replies: 6
    Last Post: 03-08-2007, 05:14 PM
  4. Replies: 4
    Last Post: 02-11-2006, 10:03 AM
  5. database for production
    By Donnie Mayes in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-09-2002, 05:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •