HP3000-L Archives

October 2004, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Richard Barker <[log in to unmask]>
Reply To:
Richard Barker <[log in to unmask]>
Date:
Fri, 1 Oct 2004 11:32:32 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (200 lines)
I can't recall exactly what Michael said Yesterday, but in Enterprise
Manager, under tools, there is a script generation tool.  If you pick the
Database and click on this option, then click on all the table scripting
boxes, this will generate a complete script to first drop all the
constraints, all triggers, etc, then the tables.  Afterwards it will then
re-create them all.

Oh and make sure you click the option 'Generate scripts for all dependant
objects' first.

In 'SQL Query Analyzer', under Tools, you can then execute your script.  You
should then have the complete database structure with all the constraints,
but no data.  If I understand correctly, this is what you want.  If it
isn't, you can at least edit the script to do what you want.

I hope this makes sense.


-----Original Message-----
From: [log in to unmask] [mailto:[log in to unmask]]
Sent: 30 September 2004 18:58
To: Richard Barker
Cc: [log in to unmask]
Subject: Re: [HP3000-L] SQL commands like Adager dbschema listing?






Hi Richard and Others :)
    A quick summary and Thanks for help!

   First, most all suggested (and it worked sorta) doing the TRUNCATE TABLE
command to clear the 'datasets' out.  Also, several replies confirmed that
I was doing my backups right and the detach/copy/reattach method was good
to go for making a reserve copy.

   Michael Gueterman pointed in the right direction of how to create a
blank copy by use of the Enterprise Manager.  I now have a blank copy and a
physical copy located in a 'safety' directory on a different machine.

   The issue with the TRUNCATE TABLE command is every table in this
database has 1 or more (some have 7+) foreign key constraints!  and I am
not sure how to 'deactivate' 'em so the TRUNCATE TABLE command can work.
Any Idears?

   The goal was turn off the foreign key constraints, truncate the table,
turn on foreign key constraints.


thanks,
Art "Learning Quick :) " Bahrs


=======================================================
Art Bahrs, CISSP           Information Security          The Regence Group
(503) 553-1425              FAX (503) 553-1453


|---------+-------------------------------->
|         |           "Richard Barker"     |
|         |           <Richard.Barker@virgi|
|         |           n-exp.com>           |
|         |           Sent by: "HP-3000    |
|         |           Systems Discussion"  |
|         |           <[log in to unmask]
|         |           DU>                  |
|         |                                |
|         |                                |
|         |           09/30/2004 01:28 AM  |
|         |           Please respond to    |
|         |           "Richard Barker"     |
|         |                                |
|         |           |-------------------||
|         |           | [ ] Secure E-mail ||
|         |           |-------------------||
|---------+-------------------------------->

>---------------------------------------------------------------------------
-----------------------------------------------|
  |
|
  |      To:    [log in to unmask]
|
  |     cc:
|
  |     Subject:      Re: [HP3000-L] SQL commands like Adager dbschema
listing?                                              |

>---------------------------------------------------------------------------
-----------------------------------------------|




>    Wish Adager had a PC version for MS-SQL :)

I wish the HP had a tool like MS Enterprise Manager.

Just a small thing to add, I would follow Michael Gueterman advice for
blanking or copying the DB, but just FYI, if you want to delete the
contents
of a table.  Use the TRUNCATE command, this will delete all the data in a
table almost instantly without having to physically delete each record.
It's much more efficient for large Tables.


-----Original Message-----
From: Emerson, Tom [mailto:[log in to unmask]]
Sent: 29 September 2004 20:38
To: [log in to unmask]
Subject: Re: [HP3000-L] SQL commands like Adager dbschema listing?


> -----Original Message-----
> Behalf Of Art Bahrs
>
> Hi All :)
>     Anyone know how to "Blank" a MS-SQL database?  Need to
> create a blank copy of a database I inherited maintenance of ...

There are a couple of ways to do this.  You don't really need to know the
current structure (which is what I read as your implication here) because
most PC based databases are a single file -- just copy the file to a new
location, then erase the contents leaving the structure intact.  [issue the
SQL command "delete from <table>" for each table/dataset name -- by not
qualifying it with a WHERE clause, the result is to select and delete every
entry]



there are numerous "navigator" style tools for various PC-based databases
[some can even use ODBC to back into Image databases, but that's another
topic...]  These tools will show the structure, allowed users, etc., and
allow for manipulation of both the data and the structure.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

==================================
This message contains confidential information and is intended solely for
the use of the individual or entity to whom it is addressed. If you are not
the named addressee you should not disseminate, distribute or copy this
email. Please inform the sender immediately if you have received this
e-mail
by mistake and delete this email from your system. Email transmission
cannot
be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or be incomplete. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message, which arise as a result of email
transmission.
If verification is required please request a hard copy version. No
contracts
may be concluded on behalf of Virgin Express SA/NV by means of email
communication. Finally, the recipient should check this e-mail and any
attachments for the presence of viruses. The company accepts no liability
for any damage caused by any virus transmitted by this email.
==================================

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *





 ===========================================================================
==
IMPORTANT NOTICE: This communication, including any attachment, contains
information that may be confidential or privileged, and is intended solely
for the entity or individual to whom it is addressed.  If you are not the
intended recipient, you should delete this message and are hereby notified
that any disclosure, copying, or distribution of this message is strictly
prohibited.  Nothing in this email, including any attachment, is intended to
be a legally binding signature.
 ===========================================================================
==

==================================
This message contains confidential information and is intended solely for
the use of the individual or entity to whom it is addressed. If you are not
the named addressee you should not disseminate, distribute or copy this
email. Please inform the sender immediately if you have received this e-mail
by mistake and delete this email from your system. Email transmission cannot
be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or be incomplete. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message, which arise as a result of email transmission.
If verification is required please request a hard copy version. No contracts
may be concluded on behalf of Virgin Express SA/NV by means of email
communication. Finally, the recipient should check this e-mail and any
attachments for the presence of viruses. The company accepts no liability
for any damage caused by any virus transmitted by this email.
==================================

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2