Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Database...

Posted on 2000-03-07
7
Medium Priority
?
168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 300 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 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