Re: Creating/Populating DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



colbey@dreamwerx.net wrote:

This should be as simple as a PHP script that opens a connection to the
destination server (with rights to do all actions you mentioned)..

Opens a text file with all the SQL commands you want to issue, and starts
firing them off at the server 1 by 1...

Once you create the database, you need to make sure:

- might have to grant rights to it

I believe this is the chicken & the egg trap Im falling in.
If Im not mistaken, when a database is created, is the time when a user can be issued permissions to use it.
Unlike mysql, the database doesn't have to exist, when granting permissions to a user.
I don't think its feasable to write grant sql in the code, as it may or may not have the rights to execute as such.
If Im wrong, please shoot me down, but I just may end up, that an empty database be created before
hand for the installer to run on MSSQL.


- change it to the current database for that connection, or disconnect
 and reconnect to desired database.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux