September 19, 2003 at 8:37 am
Hello. I am trying to put together an unattended install of SQL Server 2000 Personal Edition. My aim is to include it on a single install CD along with an application created in-house. We want the unattended install to do all the work. That is, we don't want to have to do any configuration after the install.
I have the basics working (i.e. using my custom sqlcst.bat and setup.iss files). However, I am struggling with a few issues and due to a tight deadline, I'm seeking some tips from the field.
1. The SQL Server 2000 Personal CD is about 516 MBs in size. The developers are asking me if I could determine what directories on the install CD are necessary and copy them to their install CD. Assuming this is legal (we have the required license), what directories do I need? I know I don't need the BOOKS and MSOLAP directories. I am assuming I'll need at least the INSTALL and x86 directories. I'm not sure about MSDE and MSEQ. Does anybody have any documentation as to what the directories on the install CD are used for?
2. Is there a simple way to have the unattended install configure the SQLAgent service set to start up automatically? My present install has this service configured to start up manually.
3. Is there a simple way to establish and schedule a job to backup a particular database? I'm thinking of a sql script here I could call from a batch file and use OSQL.
4. One final question ... should I be able to connect to a machine running SQL Server 2000 Personal Edition from another machine on the same network?
Thanks in advance.
- Mike
September 19, 2003 at 9:01 am
From BOL.
"How to run an unattended installation of SQL Server 2000 (Command Prompt)
You can run an unattended installation by using sample batch files and setup initialization files included on the Microsoft® SQL Server™ 2000 compact disc. Or, you can run the Setup program directly from the command prompt in the appropriate directory for the edition of SQL Server you want to install, using arguments as needed.
To run an unattended installation using ready-made batch files
Locate the .bat and .iss files in the root directory of your SQL Server 2000 compact disc.
View the .bat and associated .iss files, and modify if necessary. For more information, see Creating a Specialized Setup File.
Run the appropriate batch and setup files from the command prompt:
For a standard unattended installation, run Sqlins.bat.
For a client-only unattended installation, run Sqlcli.bat.
For a custom unattended installation, run Sqlcst.bat.
To run an unattended installation directly from the command prompt
Run Setupsql.exe from the Setup directory in the appropriate architecture directory.
Use arguments as needed:
-f1 <initialization file path>
Selects an unattended setup initialization file.
start /wait command (with the -SMS option)
Returns control to the command prompt only after SQL Server Setup completes.
-s flag
Causes the Setup program to run in silent mode with no user interface.
For examples of command prompt options and arguments, see the sample .bat files on your SQL Server 2000 compact disc.
See Also
Performing an Unattended Installation
How to record an unattended installation file (Setup)"
quote:
2. Is there a simple way to have the unattended install configure the SQLAgent service set to start up automatically? My present install has this service configured to start up manually.
create batch file to run NET Start SQLServerAgent
quote:
3. Is there a simple way to establish and schedule a job to backup a particular database? I'm thinking of a sql script here I could call from a batch file and use OSQL.
Remember someone has script in this website, try to search that.
quote:
One final question ... should I be able to connect to a machine running SQL Server 2000 Personal Edition from another machine on the same network?
Sure you can.
September 19, 2003 at 10:35 am
Thank you for the responses Allen. Unfortunately, I was hoping for more information than what you provided.
#1 - CD install directories.
No need to cut & paste from BOL. I have been in there already. Can somebody answer the question directly? 🙂
#2 - Have SQLAgent start automatically.
While your answer is correct, it doesn't help me in the long run. That is, once the machine is restarted, this service won't start. I'm looking for a way to have it start automatically each time the machine starts. Again, I'm trying to achieve this via the unattended install. I understand how to do it manually from the Services applet.
#3 - Script to create backup.
I think I found that script in the scripts libary on this site. However, this script doesn't show how to create & schedule a job to do this. I guess I need to research it further on my own.
#4 - Connecting to SQL Server Personal Edition from another machine.
For some reason, I am getting the message 'SQL Server does not exist or access is denied'. A few items of note here ...
a) I can ping the machine, using both the computer name and the IP address
b) the MSSQLServer service is running on the remote machine
Thanks again.
September 19, 2003 at 12:31 pm
#4 - Connecting to SQL Server Personal Edition from another machine.
For some reason, I am getting the message 'SQL Server does not exist or access is denied'. A few items of note here ...
a) I can ping the machine, using both the computer name and the IP address
b) the MSSQLServer service is running on the remote machine
How are you connecting and are you using the computer's name or its fully qualified name ([computer name].[domain name].local)?
September 19, 2003 at 1:18 pm
Hello. Thanks for the response.
I am trying to connect via Enterprise Manager. I have also tried Query Analyzer.
I have tried both methods (i.e. the computer name AND the fully qualified name). Same message.
Also, I installed the Personal version using the TCP/IP and Named Pipes network protocols.
I hope I am not missing something obvious here. I have the remote workstation turned on! I'm also logged in to it & the MSSQLServer service is running.
- Mike
September 19, 2003 at 2:14 pm
Well, I'm not sure exactly what may be the problem, but here are some things to try out:
Open up a command prompt on the local workstation. Type "osql -L". This should list all of the SQL Server instances in your local network. See whats listed and try to use the osql command to connect to the remote workstation.
Make sure that if you are on the remote workstation that you can log in to SQL Server. I've seen an occurence or two where SQL says its running fine but you can't run any queries on it.
Make sure that both machines have the latest version of mdac installed
Make sure that both machines have the Server Service started.
Hope this helps, I know I've had lots of weird problems like the one your having before too.
Kevin
September 22, 2003 at 9:36 am
Thanks for the tips, Kevin.
Here are my responses to your ideas.
Using OSQL -L, the remote workstation shows up in the list but I cannot actually connect to it via OSQL. I get the original error I reported.
I can get in via OSQL while sitting at the remote workstation.
Both machines are using version 2.7 SP1 of MDAC.
Both machines have the Server Service started.
I'm going to uninstall and reinstall SQL Server Personal Edition. The first time I did this, I chose not to install Client Utilities such as Query Analyzer. I don't think that should matter though.
PS. If anybody is interested, I have answered part of my own original question (i.e. item #3 => setting up a job via T-SQL). You need to use sp_add_job, sp_add_jobstep, sp_add_jobschedule, and sp_addjobserver.
- Mike
September 22, 2003 at 9:56 am
I forgot one more thing, which I really should have stated/asked in the beginning. What type of security do you have set up on each machine? If its Windows authentication (the default for SQL 2k) you will need to make sure that the remote workstation has a login for the windows login you're using on the local workstation. Sorry to mention it, just something so automatic for me I forgot 🙂 If the osql -L command lists the server its not a connection problem, its a login problem.
Kevin
September 23, 2003 at 8:03 am
Hi Kevin.
Well, I sorted out my problem connecting to the remote workstation running SQL Server Personal Edition from another workstation.
Before I explain the problem, many thanks for your ideas and my apologies for possibly wasting your time!
I uninstalled SQL Server Personal Edition and went through the process of reinstalling it. I used the Advanced option to record an unattended install script. While doing this, I remembered what I did the first time. I had wanted to the install to use the default instance name (i.e. MSSQL) rather than an actual named instance. It is my understanding using MSSQL prevents you from having to supply an instance name when connecting, apart from the machine name, that is.
For some reason, I wasn't able to get use the default instance name when recording the unattended install script. I had to supply a name. I'm not sure if this is a result of using the Personal Edition or not. Anyway, I put in a name (e.g. MIKE), thinking I could tinker with it afterwards. After completing the uninstall script, I went into setup.iss and fiddled with the [DlgInstanceName-0] section. That is, I replaced MIKE with MSSQL.
I also noticed that MIKE was present in the [DlgServerNetwork-0] section, in the NMPPipeName entry. That is, \\.\pipe\MSSQL$MIKE\sql\query. I thought I simply had to change this to read \\.\pipe\MSSQL\sql\query and I would be okay. I believe this incorrect entry is what was preventing me from connecting to the remote workstation's Personal Edition of SQL Server in the first place. Once I corrected the entry to be \\.\pipe\sql\query and reinstalled SQL Server, all was well. I could connect remotely!
Again, sorry for the confusion. Maybe this whole exercise will be useful to somebody at some stage.
BTW, I also determined that I could get SQLAgent to start automatically (this was item #2 in my original message) as part of the install. To achieve this, during the recording of the unattended installation script, at the Services Accounts dialog, click the radio button labeled 'Customize the settings for each service' and then check the box labeled 'Auto Start Service' for each service.
- Mike
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply