Automated Database Setup (GUI Version)

Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,544
Reaction score
1,320
[SIZE=+2]Priston Tale Database Setup GUI[/SIZE]​
Okay... so it still needs SQLCMD, but there's no complex working out of paths and command line options with this one.

From my point of view, this is easier to use, but harder to maintain and modify. Having said that, it does still come, like all my releases, with complete source code.

It's basically a re-write of my original batch script using AutoIt and Koda. If you want to make a custom version, you don't have to use Koda, but it would be useful if you want to change the UI in any way, because it lets you design the GUI graphically. (Visual Development)

I don't recommend building it to an x64 binary, even if you have an x64 server setup, because SQLCMD is not x64, and will install to the virtual x86 Program Files folder, which an x86 build will pick up and find no problem, but an x64 build will find the real x64 Program Files folder... I hope that makes sense.:/: (Server 2008 is available in x64 versions and I will be looking into the possibility of making this practical)

Enjoy... please don't steal and claim as your own, give me some credit. ;)

Also please let me know any bugs you find so I can fix0r them. :thumbup:

Version 3 is now available!
Version 3 now supports SQL Server 2000, 2005 or 2008, but still only supports 32-bit versions on 32-bit platforms, or (untested) 64-bit versions on 64-bit platforms. (I've not included logic to find a 32-bit app in the "Program Files (x86)" folder on an x64 OS)

Additional improvements include the fact that the password entry field is now starred out... so you can create your databases with someone looking over your shoulder, without compromising your password... not that I think you would.
>>View attachment SetupPT_MSSQL_Database.zip Attached<<
>> <<
>> <<
>> <<

Older Version 2 file.
>> <<
>> <<
 
Last edited:
This is good,out for 3 days and no1 even says thanks? I dont like that, i mean even if you aint gonna use it you ould atleast say thanks for someone taking so much time to help the community.

Thanks man,
Unzubaru!
 
Aww. Thanks Unzubaru...:blush: I was starting to feel a little that way.

I was happy with the batch file command line version, and this was adapted from it due to feedback from that release by others... I thought "Okay, so what did I do wrong?".:ehh:
 
I'm thinking of setting up a testserver too....

Thanks =]

*edit*
The GUI version tells me the operation was successful, but it doesn't create any databases. I tried the same information as the commandline one; which works properly.
 
Last edited:
The GUI version tells me the operation was successful, but it doesn't create any databases. I tried the same information as the commandline one; which works properly.

That's interesting, thanks for the report... I'll have to see if I can reproduce the result, there was less beta testing on this version, but with the setup guide I'm producing I have an opportunity to test more thoroughly.

Please grab the new version files.

Fixed the bugs... couple of typos and some timing errors.

There is now more error checking in the source, so if the command doesn't complete there will be a message window pop up.

If any form of error is presented by SQLCMD (wrong password, database already exists, named pipe problems etc) then that will show up in the log at the bottom of the window too.
 
Last edited:
Hey great job with this. Im actually trying to install the PT server on my other computer so i can localize the problem to see if its a problem with the ODBC or with the server files so if it works on this computer i know its the ODBC. So since i'm installing the server a new i tried this and it worked like a charm. Great job you are a great help to the community. Keep up the good work!
 
Thank you... just occasionally I have had this version miss a database, so a tip for people using this version over the command line batch file (which I've never seen miss a beat) is to watch the log it produces, and if it has missed one, just re-run it. It will then error on all the ones that succeeded the first time around, but should catch the ones that timed out on the first run. :wink:

The error on existing databases is normal, and will cause no harm to the set up. :):
 
Last edited:
thank you for this release. I'm just wondering, is it compatible with ms sql 2000? and also, could you please provide a reference on how to make one like this because I will use it to my other private servers. Thanks again!
 
thank you for this release.
You're most welcome.
I'm just wondering, is it compatible with ms sql 2000?
I've not tried SQL Server 2000 just yet... if it contains the ncli sqlcmd.exe command tool, then it will work.

As mentioned earlier (in the command line version) older SQL versions had one of two alternate command line database manipulation tools which use the exact same syntax.

So if SQL2000 has either isql.exe or osql.exe, you can just search and replace sqlcmd.exe with one of those in the source, and rebuild with AutoIt.
and also, could you please provide a reference on how to make one like this because I will use it to my other private servers. Thanks again!
Make one what? Sorry, I don't really unerstand what you are asking... I try to be pretty open and transparent with my tools (no black boxes) so the source code is available in the download, if you have user registration, clan or SoD databases that you want to set up along with the main game, you can add them pretty simply to the source code, I would think.

If your database is reformatted (same data in different places) then I would think you have .sql files for that format, and just replacing the .sql files will set up what ever format you have.
 
sorry for not making it clear for you. I would like to know how to modify your source code in order to accept bak files rather than the sql one. One example is mu online private server which dbs are in bak extension. Thanks!
 
This program does not process the SQL files. It passes them to MS-SQL server to process. SQL server processes sequences of SQL code in text files with ANY extension... but the convention is ".sql" or ".txt" which will still work, but isn't as informative as ".sql".

There are similar command line utilities to sqlcmd.exe for Oracle, DBase, PostgreSQL, MySQL etc etc. The problem is that MS SQL doesn't understand the same "standard" SQL syntax to the others, as I understand it. It uses the same "broken" SQL that FoxPro and Access use.

Q: How many Microsoft Engineers does it take to change a light bulb?
A: None. They just declare darkness as the "Microsoft standard".
:lol:

Anyway... the point is that my program doesn't do what you are asking to change the source for... that is in the closed source Microsoft code of sqlcmd.exe. This is just a pretty GUI which Macros typing in a lot of complex commands, and again I urge you to look at the command line version, which is just a "DOS" style batch file (.bat) which does the same in terms of Macroing the complex commands, but a batch file can't produce a pretty GUI... AutoIt is really good at making pretty GUIs and Macroing any repetitive manual task.

File extensions in them self are a Microsoft lie. Changing the extension of a file name does not change the contents of a file, or it's ability to be processed by one or the other program... it only stops Windows from recognising which program to pass it to. Most other operating systems rely on a MIME type, which is either embedded in the file systems meta data, or determined from the files content... which is "correct". The file type "extension" is a Microsoft short hand.

".bak" is a standard "backup"... but like ".txt" doesn't tell you what the text is, or how it should be used... it could be a "readme" it could be SQL, it could be in English, French, Dutch, html, BBCode or anything. Most programs create a .bak of any data they are working on... so a .bak could be a Word document, a DOS backup of your hard disk, an older version of your C source, a jpeg you where working on in an art package or absolutely any data at all.

The other big "IDK what this file is" extension is ".bin" which suggests only that it's contents is NOT ".txt" other than that, it could be any Binary data... it's often used for CD, DVD, Floppy or hard disk Dumps, compiler output that is not yet linked, "core dump" data from a crash, boot sector machine code, BIOS flash files etc.
 
Last edited:
i tested it on ms sql 2000. It works but it seems it only creates the empty database, or it is supposed to work that way? Can it be use to automatically execute all sql files for their specified databases? thanks.
 
I've attached it to the OP too. I'll add SunnyZ' host. TY. :D:
 
Maybe it is different... it's what I have on my drive. We should check each out, as I'm not sure mine isn't beta-ish. ;)
 
Well this is the one I had:

This is the one I just dl'd from you:
 
Back