Solved

SQL Database...

Posted on 2000-03-07
7
165 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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