Installer installing on two machines - installation

I need to create one installer which will install components on two different machines.Windows services and web services on "APP Server" and database part on "DB Server". SQL Server 2005/2008 will be already present on DB SERVER. But it may use different port than default port for sql server.
What things I will require in order to implement this ?
Thanks in advance.

It is simply a matter of bundling a SQL script with the installer and executing the script by calling sqlcmd with ExecWait.
We can run a script using a trusted connection via:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -i _SCRIPT_FILE_
Or with a SQL Login:
sqlcmd -S _SERVER\_INSTANCE_ -d _DBNAME_ -U _USERNAME_ -P _PASSWORD_ -i _SCRIPT_FILE_
For performing actions on remote SQL Server engine native driver is required.In SQL Server 2005 or later the command line client is called sqlcmd.

I suggest to create 2 radio buttons:
(o) Install - App Server
( ) Install - DB Server
User select one item and appropriate components will be installed. (like .dlls, .exes, ... on app server and data files or sql scripts [also scripts can be executed] on db server).
Everything packed into single installer.
Also there should be some custom page(s) (created using nsDialogs) where user can set parameters(port, server name, name of db, path to db, ...)

Related

Oracle ODAC 18.3 for Windows Server 2019 Installation Errors

I am trying to install Oracle ODAC 18.3 on a Windows Server 2019 Standard so that I can create a data source connection to an Oracle database from a SQL Server 2019 instance, either by using Polybase or a Linked Server connection. The only components that I need installed are the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP. During the Perform Prerequisite Checks stage of the install, there are errors.
The errors are as follows:
PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ on nodes ""
Please select a different work area for the framework
[hostname] : PRKN-1014 : Failed to execute remote command "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\\exectask.exe" on node "[hostname]". Failed during connecting to service
[hostname] : Failed during connecting to service
Notes regarding error message above. [username] refers to my username that I am logging in with to Windows. It is an Active Directory account. [hostname] refers to the computer name that I am trying to install ODAC on. Also, I have tried installing this a few different times, all with the same error messages. On the second and third time installing I verified that during the installation the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory is getting created, so this should not be a permissions issue.
In the PRKN-1014 error message, I did notice that there is an extra backslash in the path, CVU_18.0.0.0.0_\[username]\\exectask.exe, so my suspicion is that there is an issue with the installer not being able to identify the correct path to find the exectask.exe. If I traverse to the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory I indeed find the exectask.exe file.
I have found a few different solutions online for others that worked for them, but none have worked for me. One solution was to add in the System Environment Variables the _JAVA_OPTIONS variable with a value of -Xmx512M. A second solution was to change the Environment Variables user variables TEMP and TMP to C:\TEMP. Neither of these worked and resulted in the exact same errors. I did in fact confirm that the Oracle Universal Installer extracted the files to the C:\TEMP directory.
Any and all suggestions would be very much appreciated!
I wasn't able to get the Oracle "Universal" Installer to work, like you. However, I was able to install the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP (same as you were trying to get) using the ODAC Xcopy installer.
I downloaded the ODAC Xcopy installer from here:
https://www.oracle.com/database/technologies/dotnet-odacdeploy-downloads.html
After downloading the installer, I ran the install batch file to install those two components. An extra undocumented step is that you must update the PATH environment variable on your system to include your install location and bin folder. In my case, "C:\Oracle" and "C:\Oracle\Bin".

Oracle connection test

We are developing java based web application, which runs on Ubuntu 12.04. At the start of installation, we prompt for Oracle server's Host, Port, user, password & SID details and then passed them to installer to build jdbc:oracle:thin url. Eventually, our installer connects to Oracle and creates some tables.
Now I am trying to write a script(shell or python) to quickly verify user entered Oracle settings are correct or not by simply connecting to Oracle and disconnecting before passing those to our installer. I tried to use echo "exit" | sqlplus -L user/password#//host:port/SID | grep Connected > /dev/null but sqlplus easy connect is only taking service-name not SID.
Is there any easy way to test Oracle connectivity. I need to write it in script, which needs to run automatically as a part of installation steps.
Thanks for all the help.
Read https://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:45033135081903
Oracle listener is expected to listen to your request for connection.
Here is the copy of Tom's answer
[tkyte#desktop tkyte]$ sh -vx test.sh
sqlplus
'scott/tiger#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=152
1)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ora9ir2.kyte.com)))'
Use your host, port and service_name.

connect to oracle which is hosted on different machine

Hi I am working on a project in which we have oracle DB that is hosted on one machine and java application on other machine. both machines have UNIX OS.i want to develop a shell script that will use DB query and generate a report but i dont have any client(SQLplus) installed on both the machine. so let me know how can i connect to DB and where shud i develop scirpt like on DB unix machine or application machine.
sqlplus -s "/as sysdba
this is use of sql plus i dont have on any machine..
if you have ssh access on both the machines you could run virtually any command(through ssh) you could on the machine itself:
ssh user#server1 "ls ~/"
for example the above will give you a listing of files in "user"s home directory on server1..

migrate sdf file to sql server

I created code first approach application mvc and it created sdf file db. Now I want to migrate that sdf file to sql server.
When I double click on sdf, It says message like This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine.
I want to migrate,sync data to sql server of any better approach for future, how can I migrate db?
A possible reason for the error message is that you do not have the correct version of SQL Server Compact installed on your development machine.
The current version is 4.0, but your application might still be using 3.5. Find out which version it is and check the folder C:\Program Files\Microsoft SQL Server Compact Edition to see if there's a directory with that version name. If there isn't, download and install it (3.5, 4.0).
If you are using SqlCE 4.0 and Visual Studio 2010 Pro or higher, you can migrate the sdf's structure and data using ErikEJ's SQL Server Compact Toolbox 3.3.0.4 which is available through Visual Studio's Extension Manager.
After you have installed the Toolbox, the migration steps are as follows:
Using the Toolbox, connect to your sdf file within Visual Studio.
From the context menu, choose Script Database > Script Database Schema and Data (do not choose Script Database Schema and Data with BLOBS). This will save one or more '.sqlce' script files, depending on how large your sdf is.
In your SQL Server instance, create an empty target database.
Locate the SQLCMD.exe of your Sql Server installation. For SQL Server 2008 it typically is at C:\Program Files\Microsoft SQL Server\100\Tools\Binn. Open a regular cmd.exe with administrator rights and navigate to the directory containing SQLCMD.exe.
From there, execute:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename].sqlce
If you have multiple sqlce files, you can reference them in the same command like this:
sqlcmd -S [sql server instance name] /d [target database name] -i
[full path][filename_0].sqlce -i [full path][filename_1].sqlce -i
[full path][filename_2].sqlce
The server option -S needs to be a capital. Good luck.

Oracle moving / transferring schemas from one server to another

I am having to move databases from one server to another.
Oracle on Server A has died so I can't back up the existing databases in order to move them across.
I was wondering if there is another way to move databases across servers in Oracle.
There is a way of coping some data and control files and installing them in a new server.
See: User-Managed Backup and Recovery Guide
http://download.oracle.com/docs/cd/B10501_01/server.920/a96572/toc.htm
( but look for the correct version of your database)
For example something like:
% cp /disk1/oracle/dbs/*.dbf /disk2/backup
% cp /disk1/oracle/dbs/*.cf /disk2/backup
% cp /disk1/oracle/network/admin/*.ora /disk2/backup
% cp /disk1/oracle/rdbms/admin/*.ora /disk2/backup
If the old database shut down relatively cleanly you should be able to just copy the db files over to the new host. "db files" includes datafiles, tempfiles, control files, and online redo logs (off the top of my head). If you can make the directory structures on the new host the same as the old ones, you should then just be able to source the correct environment (including ORACLE_SID) and then issue a startup from SQL*Plus. You use the phrase "Oracle service" in your answer to my question, so I'm guessing you are on Windows - I don't know how you go about re-registering it as a Windows service.
If the servers are the same os then yes. You can create the same directory structure on the new server as the old. Install the oracle software and patch it to the same version as on the old window server. Copy all the datafiles, control files, spfile , etc to their respective location on the new server. Using the account you install oracle which has administrator privelege and belonging to the dba group, run oradim to add the service to windows to start oracle, point it to the spfile of your database.
ORADIMxx -NEW -SID -INTPWD -STARTMODE
-PFILE
or with newer database version:
ORADIM -NEW -SID | -ASMSID [-SYSPWD password]
[-STARTMODE auto | manual] [-SRVCSTART system | demand]
[-PFILE filename | -SPFILE]

Resources