Sage 100

 View Only
  • 1.  How to backup a table in sql

    Posted 07-25-2023 19:07

    I have always made copies of the sage files before editing or importing to them. With Premium, what is the best way to backup a table? backup the whole database or use something like INSERT TO {newtablenamehere} ..

    Advice much appreciated. 



    ------------------------------
    Greg Stiles
    S & W Microsystems
    ------------------------------


  • 2.  RE: How to backup a table in sql

    Posted 07-25-2023 19:27

    I usually create a non-Sage database and do something like this:

    SELECT *
    INTO NonSageDatabase.dbo.ABC_tablename_date
    FROM MAS_ABC.dbo.tablename

    (Never create tables in Sage databases manually... that can interrupt the company copy function).



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: How to backup a table in sql

    Posted 07-25-2023 19:37

    Good to know, thanks @Kevin Moyes



    ------------------------------
    Greg Stiles
    S & W Microsystems
    ------------------------------



  • 4.  RE: How to backup a table in sql

    Posted 07-28-2023 10:01

    I've used the following, but @Kevin Moyes are you saying you don't recommend backing up in this manner?:

    Sql mgmt studio
    New query
    use mas_abc
    go
    SELECT * INTO SO_InvoiceDetail_20220921 FROM SO_InvoiceDetail
    Execute

    And for restoring, you can apparently just rename the files in sql mgmt studio.



    ------------------------------
    Brett Zimmerman
    Net at Work
    Greater Boston Area
    ------------------------------



  • 5.  RE: How to backup a table in sql

    Posted 07-28-2023 10:32

    We had a problem where a test company could not be refreshed... and we traced it to a manually added SQL table, so we don't do that anymore.  New SQL Views are fine... but I'd avoid new tables.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------