Solved

SQL Database...

Posted on 2000-03-07
7
160 Views
Last Modified: 2013-11-23
I have an application I'm working on that uses an MS SQL 7.0 database. This application will installed on many machines.  What I would like to know is if there is a way to not have to use the Enterprise Manager to re-create the database on those machines after the softwares installed.  I would prefer to just include the database with the install, even though I'll still need to set the permissions.  Is there any easy way of doing this?
0
Comment
Question by:dokken
7 Comments
 
LVL 2

Expert Comment

by:kubeerja
ID: 2593791
an easy way is to generate a full script of your DataBase and make your application run this script once installed to create the Database and other Database objects.
0
 
LVL 1

Expert Comment

by:yk030299
ID: 2594236
since all client can connect to the same DBMS server, so I think re-creating database manytimes is not necessary. you just need to create database by sa and grant premessions to all users who need this db.
As Kubeerja said, you can make a script if you still want to re-do anything.
0
 
LVL 1

Expert Comment

by:chengjian
ID: 2594681
In enterprise manager, click the database you need, and click Generate SQL Script, and in option tab, check all options. Now, not only use script all database object but also the permissions.

To give permission to roll instead of single user, so, what you want to do after installation is add user to roll not give specified user permissions.

if all servers is online, what you need perhaps is a DTS Import/Export

good luc
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:dokken
ID: 2596035
Doesn't sound like there's any easy way.  The program will be installed on machines at locations which aren't hooked up to any network so they will require their own database.  Since there will be many people installing the software I had wanted to make this part of it as easy as possible.  How do shareware authors include a MS SQL database?
0
 

Expert Comment

by:Chelly_the_dog
ID: 2601105
Why do you use a MS SQL Database ?
If i understand you correctly you have written a Single user application, that does not need a Client/Server-Database.
Nevertheless, if you want to use MS SQL and you can make it sure, that MS SQL ist installed correctly on the local machine, you can connect within your application and execute the script after you have installed the BDE or a direct access driver.
You can also include this part in your installation program if you do not want your application to do this on first startup. InstallShield can handle this for you !
0
 

Accepted Solution

by:
johnstoned earned 150 total points
ID: 2628576
I would consider converting the program to use MS Access or Paradox tables.  You can then include a blank database with the distrabution and it will just work.  There is no need to even have a database engine installed, as the BDE will work with these types of database as standard.

If you are still determined to use SQL Server, you can do this...

Create a registry setting in HKEY_Local_Machine so that you can tell if your program is running for the first time or not.  If it is, run an SQL statement like..

create database MyDatabase
(name = MyDBData,
 filename = 'c:\mssql7\mydb.mdf',
 size=20mb,
 filegrowth = 10mb)
log on
(name = MyDBLog,
 FileName = 'c:\mssql7\mydb.ldf',
 size = 5mb,
 filegrowth = 1mb)

Executing that will create a new database.
You can then use create table to add tables to the database from within Delphi.

Hope that's of some use,
Dave.
0
 

Author Comment

by:dokken
ID: 2645564
The program is going to be a multi-user program and the data needs to be searchable on the web.  This is why I wanted to use MS SQL.  Unfortunately, after converting my application over to using it, it's way too slow.  I think the problem is ODBC, which is the only way I connect to it with the Delphi Professional, right?

I'll give the points to anyone who can answer this for me... I need a database, which doesn't have the 2 gig size limitation, and preferably the machine it's installed on (it won't always be through a network) doesn't need anything special to use it. And connecting to it through ODBC is not an options since it seems to really slow things down.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 60
Working with hours 3 57
Not able to call Delphi XE10 dll function from Delphi 6.0 4 26
Installshield for Embarcadero EX 10.1 Berlin 4 40
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question