#1  
Old 23rd September 2008, 12:46 PM
Jeff Huang
 
Posts: n/a
Default Alter table with encryption

Hi, can someone help me on this?

I try to programmatically encrypt and password protect a table in the
NexusDB v2.07. I also want to remove encryption and password dynamically in
program. Is there any function available with the database version that I
can
use in SQL or Delphi?

Rgds
Jeff Huang


  #2  
Old 25th September 2008, 11:27 AM
William Owyong [NDX]
 
Posts: n/a
Default Re: Alter table with encryption

Setting and unsetting a table's encryption/password state could be done in
Delphi by modifying the table's data dictionary then restructuring. Setting a
table's encryption and password in SQL, as far as I've seen, is only done at
table creation. I don't think you can alter/remove the encryption via SQL once
it's in (for probably a good reason).

Just out of curiosity, why would you want to do this anyway? (Just trying to put
this into context) While setting/unsetting a table's encryption should be fine,
each time you do it the whole table will need to be locked so restructuring can
take place. No datasets can be accessing it at the time or beforehand.

--
Regards,
William

"Jeff Huang" <jhuang@prc.com.au> wrote in message news:48d84a03@77-37-8-25....
> Hi, can someone help me on this?
>
> I try to programmatically encrypt and password protect a table in the
> NexusDB v2.07. I also want to remove encryption and password dynamically in
> program. Is there any function available with the database version that I can
> use in SQL or Delphi?
>
> Rgds
> Jeff Huang
>
>



  #3  
Old 29th September 2008, 11:50 AM
Jeff Huang
 
Posts: n/a
Default Re: Alter table with encryption

Thanks for your reply, William,

I know there is a restructuring function in the Help for the version. But
it'd be better there is a piece of code example that could save us huge
trial time. I like the way in SQL, you can always run "Set Passwords
,p1.,...,pn" once to get in the database to get rid of password restriction
and run the any SQL statement later. So I think if possible there could be
some advantage to set password/encryption on table with p.new so we can
control the settings without using dictionary(too complicated sometimes).

We just want to turn password on/off during a upgrade setup procedure so no
one else is actually blocking the process. we use third party setup tool to
build the setup script, once the database is encryptted, the size for the
setup is significantlt increased so we need to add a lock/unlock password &
encryption in our setup procedure.

"William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
message news:48dad9b4@77-37-8-25....
> Setting and unsetting a table's encryption/password state could be done in
> Delphi by modifying the table's data dictionary then restructuring.
> Setting a table's encryption and password in SQL, as far as I've seen, is
> only done at table creation. I don't think you can alter/remove the
> encryption via SQL once it's in (for probably a good reason).
>
> Just out of curiosity, why would you want to do this anyway? (Just trying
> to put this into context) While setting/unsetting a table's encryption
> should be fine, each time you do it the whole table will need to be locked
> so restructuring can take place. No datasets can be accessing it at the
> time or beforehand.
>
> --
> Regards,
> William
>
> "Jeff Huang" <jhuang@prc.com.au> wrote in message
> news:48d84a03@77-37-8-25....
>> Hi, can someone help me on this?
>>
>> I try to programmatically encrypt and password protect a table in the
>> NexusDB v2.07. I also want to remove encryption and password dynamically
>> in program. Is there any function available with the database version
>> that I can
>> use in SQL or Delphi?
>>
>> Rgds
>> Jeff Huang
>>
>>

>
>



  #4  
Old 29th September 2008, 01:59 PM
William Owyong [NDX]
 
Posts: n/a
Default Re: Alter table with encryption

Hi Jeff,

You may not need to remove the password from the table. I chatted with Eivind
about this and another solution arose around your overall goal of not allowing
others access to the database during your updates. Your nxDatabase component has
an "Exclusive" property which, when successfully set to true, prevents other
users from accessing the database.

To set a connection to exclusive you should set the property to true before
opening the database. If it fails the exclusive lock then someone else is
accessing the database...and you can tell them to get out <g> and when it does
connect you can be sure that that you have exclusive access to the database for
the length of the update.

HTH

--
Regards,
William

"Jeff Huang" <jhuang@prc.com.au> wrote in message news:48e025b7@77-37-8-25....
> Thanks for your reply, William,
>
> I know there is a restructuring function in the Help for the version. But it'd
> be better there is a piece of code example that could save us huge trial time.
> I like the way in SQL, you can always run "Set Passwords ,p1.,...,pn" once to
> get in the database to get rid of password restriction and run the any SQL
> statement later. So I think if possible there could be some advantage to set
> password/encryption on table with p.new so we can control the settings without
> using dictionary(too complicated sometimes).
>
> We just want to turn password on/off during a upgrade setup procedure so no
> one else is actually blocking the process. we use third party setup tool to
> build the setup script, once the database is encryptted, the size for the
> setup is significantlt increased so we need to add a lock/unlock password &
> encryption in our setup procedure.
>
> "William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
> message news:48dad9b4@77-37-8-25....
>> Setting and unsetting a table's encryption/password state could be done in
>> Delphi by modifying the table's data dictionary then restructuring. Setting a
>> table's encryption and password in SQL, as far as I've seen, is only done at
>> table creation. I don't think you can alter/remove the encryption via SQL
>> once it's in (for probably a good reason).
>>
>> Just out of curiosity, why would you want to do this anyway? (Just trying to
>> put this into context) While setting/unsetting a table's encryption should be
>> fine, each time you do it the whole table will need to be locked so
>> restructuring can take place. No datasets can be accessing it at the time or
>> beforehand.
>>
>> --
>> Regards,
>> William
>>
>> "Jeff Huang" <jhuang@prc.com.au> wrote in message
>> news:48d84a03@77-37-8-25....
>>> Hi, can someone help me on this?
>>>
>>> I try to programmatically encrypt and password protect a table in the
>>> NexusDB v2.07. I also want to remove encryption and password dynamically in
>>> program. Is there any function available with the database version that I
>>> can
>>> use in SQL or Delphi?
>>>
>>> Rgds
>>> Jeff Huang
>>>
>>>

>>
>>

>
>



  #5  
Old 8th October 2008, 01:22 PM
Jeff Huang
 
Posts: n/a
Default Re: Alter table with encryption

Hi William,

thank you for your answer. this will help me to detect if another user is
connected or not, but my case is different.Once the product using NexusDB is
delivered to client, they can view some customer details with wordpad, so I
need some encryption to prevent them to view the content and this can be
achived, but once it's encrypted, when we generate the setup or installation
program, the program size increases significantly with our installer. so I'd
like to remove encryption before setup is built and re-encryt the tables
after client run the setup successfully.

"William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
message news:48e0439f@77-37-8-25....
> Hi Jeff,
>
> You may not need to remove the password from the table. I chatted with
> Eivind about this and another solution arose around your overall goal of
> not allowing others access to the database during your updates. Your
> nxDatabase component has an "Exclusive" property which, when successfully
> set to true, prevents other users from accessing the database.
>
> To set a connection to exclusive you should set the property to true
> before opening the database. If it fails the exclusive lock then someone
> else is accessing the database...and you can tell them to get out <g> and
> when it does connect you can be sure that that you have exclusive access
> to the database for the length of the update.
>
> HTH
>
> --
> Regards,
> William
>
> "Jeff Huang" <jhuang@prc.com.au> wrote in message
> news:48e025b7@77-37-8-25....
>> Thanks for your reply, William,
>>
>> I know there is a restructuring function in the Help for the version. But
>> it'd be better there is a piece of code example that could save us huge
>> trial time. I like the way in SQL, you can always run "Set Passwords
>> ,p1.,...,pn" once to get in the database to get rid of password
>> restriction and run the any SQL statement later. So I think if possible
>> there could be some advantage to set password/encryption on table with
>> p.new so we can control the settings without using dictionary(too
>> complicated sometimes).
>>
>> We just want to turn password on/off during a upgrade setup procedure so
>> no one else is actually blocking the process. we use third party setup
>> tool to build the setup script, once the database is encryptted, the size
>> for the setup is significantlt increased so we need to add a lock/unlock
>> password & encryption in our setup procedure.
>>
>> "William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
>> message news:48dad9b4@77-37-8-25....
>>> Setting and unsetting a table's encryption/password state could be done
>>> in Delphi by modifying the table's data dictionary then restructuring.
>>> Setting a table's encryption and password in SQL, as far as I've seen,
>>> is only done at table creation. I don't think you can alter/remove the
>>> encryption via SQL once it's in (for probably a good reason).
>>>
>>> Just out of curiosity, why would you want to do this anyway? (Just
>>> trying to put this into context) While setting/unsetting a table's
>>> encryption should be fine, each time you do it the whole table will need
>>> to be locked so restructuring can take place. No datasets can be
>>> accessing it at the time or beforehand.
>>>
>>> --
>>> Regards,
>>> William
>>>
>>> "Jeff Huang" <jhuang@prc.com.au> wrote in message
>>> news:48d84a03@77-37-8-25....
>>>> Hi, can someone help me on this?
>>>>
>>>> I try to programmatically encrypt and password protect a table in the
>>>> NexusDB v2.07. I also want to remove encryption and password
>>>> dynamically in program. Is there any function available with the
>>>> database version that I can
>>>> use in SQL or Delphi?
>>>>
>>>> Rgds
>>>> Jeff Huang
>>>>
>>>>
>>>
>>>

>>
>>

>
>



  #6  
Old 8th October 2008, 04:06 PM
William Owyong [NDX]
 
Posts: n/a
Default Re: Alter table with encryption

Hi Jeff,

Why your clients are even opening database tables with Wordpad is beyond me but
anyway...
The long and short of it is that there is no SQL functionality to add/remove
encryption to an existing table. Probably the cleanest automated solution for
you is to create a small app in Delphi which is run by your installer. This
app's should connect to the database (exclusively) and restructure the tables
you wish to encrypt/decrypt with a password you specify. If you design it to run
with parameters then you can define in the parameter whether you want it to
encrypt or decrypt the tables.

--
Regards,
William

"Jeff Huang" <jhuang@prc.com.au> wrote in message news:48ec0ab4$1@77-37-8-25....
> Hi William,
>
> thank you for your answer. this will help me to detect if another user is
> connected or not, but my case is different.Once the product using NexusDB is
> delivered to client, they can view some customer details with wordpad, so I
> need some encryption to prevent them to view the content and this can be
> achived, but once it's encrypted, when we generate the setup or installation
> program, the program size increases significantly with our installer. so I'd
> like to remove encryption before setup is built and re-encryt the tables after
> client run the setup successfully.
>
> "William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
> message news:48e0439f@77-37-8-25....
>> Hi Jeff,
>>
>> You may not need to remove the password from the table. I chatted with Eivind
>> about this and another solution arose around your overall goal of not
>> allowing others access to the database during your updates. Your nxDatabase
>> component has an "Exclusive" property which, when successfully set to true,
>> prevents other users from accessing the database.
>>
>> To set a connection to exclusive you should set the property to true before
>> opening the database. If it fails the exclusive lock then someone else is
>> accessing the database...and you can tell them to get out <g> and when it
>> does connect you can be sure that that you have exclusive access to the
>> database for the length of the update.
>>
>> HTH
>>
>> --
>> Regards,
>> William
>>
>> "Jeff Huang" <jhuang@prc.com.au> wrote in message
>> news:48e025b7@77-37-8-25....
>>> Thanks for your reply, William,
>>>
>>> I know there is a restructuring function in the Help for the version. But
>>> it'd be better there is a piece of code example that could save us huge
>>> trial time. I like the way in SQL, you can always run "Set Passwords
>>> ,p1.,...,pn" once to get in the database to get rid of password restriction
>>> and run the any SQL statement later. So I think if possible there could be
>>> some advantage to set password/encryption on table with p.new so we can
>>> control the settings without using dictionary(too complicated sometimes).
>>>
>>> We just want to turn password on/off during a upgrade setup procedure so no
>>> one else is actually blocking the process. we use third party setup tool to
>>> build the setup script, once the database is encryptted, the size for the
>>> setup is significantlt increased so we need to add a lock/unlock password &
>>> encryption in our setup procedure.
>>>
>>> "William Owyong [NDX]" <no.spam.wo@k.n.o.w.a.l.l.com.au.or.die> wrote in
>>> message news:48dad9b4@77-37-8-25....
>>>> Setting and unsetting a table's encryption/password state could be done in
>>>> Delphi by modifying the table's data dictionary then restructuring. Setting
>>>> a table's encryption and password in SQL, as far as I've seen, is only done
>>>> at table creation. I don't think you can alter/remove the encryption via
>>>> SQL once it's in (for probably a good reason).
>>>>
>>>> Just out of curiosity, why would you want to do this anyway? (Just trying
>>>> to put this into context) While setting/unsetting a table's encryption
>>>> should be fine, each time you do it the whole table will need to be locked
>>>> so restructuring can take place. No datasets can be accessing it at the
>>>> time or beforehand.
>>>>
>>>> --
>>>> Regards,
>>>> William
>>>>
>>>> "Jeff Huang" <jhuang@prc.com.au> wrote in message
>>>> news:48d84a03@77-37-8-25....
>>>>> Hi, can someone help me on this?
>>>>>
>>>>> I try to programmatically encrypt and password protect a table in the
>>>>> NexusDB v2.07. I also want to remove encryption and password dynamically
>>>>> in program. Is there any function available with the database version that
>>>>> I can
>>>>> use in SQL or Delphi?
>>>>>
>>>>> Rgds
>>>>> Jeff Huang
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ALTER TABLE Diniz nexusdb.public.support.sql 4 23rd August 2008 06:46 AM
Alter Table Tyrone Nason nexusdb.public.support.sql 0 9th January 2008 08:09 PM
Alter table nexusdb.public.support.thirdparty 2 5th February 2006 09:26 PM
table encryption bruhmhaendoll nexusdb.public.support.sql 2 18th November 2003 05:50 AM
Alter Table Ole Willy Tuv nexusdb.public.support.sql 1 1st October 2003 02:49 PM


All times are GMT +11. The time now is 04:06 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.