SQL Server 2012 Express checking and silent installation - installshield

We need to perform the following using InstallShield 2013, can someone please guide me:
Check if SQL Server Express is installed in the user's machine or not.
If present, what is the version that is present.
If the version is not 2012, then we need to install SQL Server Express 2012 silently in the background.
Give write access on a folder for a particular login (Sql service)
After installation of SQL Express 2012, we need to restore a database from a .bak file.
After restoring the db, how to run some sql scripts?
Please provide me any link or guidance on how to acheive the above objectives. I am also parallely trying to read the documentation and blogs, but they are vast.
Thanks in advance,
Pavan

There are different ways to achieve it. You can do a check using prerequisite and get it installed. You can use custom action or install script to do the silent install of SQL server after doing registry check.
once installed, using the script you can restore the database, and installshiled basic msi provides options to include the sql scripts and run it or using the installscript you can run the sql scripts .

Related

How to connect Excel to Oracle with PowerQuery

I am trying to connect Excel to my company's Oracle Database. According to the following instructions it should be fairly easy: https://www.wikihow.com/Connect-Excel-to-an-Oracle-Database.
However it has been impossible and quite frustrating so far.
I have followed two different approaches that I've found online.
FIRST APPROACH: installed ODAC from Oracle's Universal Installer
I went to this site https://www.oracle.com/database/technologies/dotnet-odacdev-downloads.html and downloaded the ODAC 12.2.0.1.1 file.
Then, I went through the installation process basically just clicking 'next' on every step.
Note 1: (I don't know if this might be important), in the Database Connection configuration tab I did not fill in any of the information (simply because I didn't know what to put there). It said that if information wasn't filled in, it would not create the TNSNAMES.ORA file.
Note 2: After finishing the installation it says 'run the SQL scripts located in the ... directory after the install'. Which I didn't do, again, because I didn't know how.
After the installation finished a directory was created in the following location: C:\app\client\myUserName\.
The directory goes all the way down to C:\app\client\myUserName\product\12.2.0\client_1, and it contains a bunch of files and folders.
I noticed that no environmental variable was created.
SECOND APPROACH: installed ODBC instant client
I went to this site https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip.
Then I created the directory C:\Oracle\instantclient_19_6 and unziped both folders contents into it.
Finally, I ran odbc_install from the command_line, as an administrator, but got Oracle ODBC Driver with same name already exists.
Note: in this case I also noticed that no environmental variable was created.
RESULTS:
When I go to Excel and click on Data\From Database\From Oracle Database I keep getting the same error as before: The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly.".
I was able to solve it by installing the 64 bits version of Oracle's client. Its located at https://www.oracle.com/database/technologies/112010-win64soft.html, file win64_11gR2_client.zip.
Although the message "The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly." remained, I was able to connect after ignoring it.
I have also tried a bunch of approaches and finally got rid of the 'Oracle.DataAccess.Client is not installed' error.
Install Oracle Client for Microsoft Tools:
ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC
https://www.oracle.com/database/technologies/net-downloads.html
Oracle Client for Microsoft Tools installs and configures ODP.NET to support 64-bit Microsoft tool connections with Oracle database. It supports connecting with Power BI Desktop, Power BI service, Excel, SQL Server Analysis Services, SQL Server Data Tools, SQL Server Integration Services, SQL Server Reporting Services, and BizTalk Server.
I have installed Oracle Client for Microsoft Tools 19.17 for (Microsoft Windows x64 (64-bit)) (V1032890-01.exe).
Alternatively, you could follow the learn more link:
Connect Microsoft Tools to Oracle Databases
https://www.oracle.com/database/technologies/appdev/ocmt.html
Tutorials > Power BI Desktop: Connect to Oracle Database
https://www.oracle.com/a/ocom/docs/database/microsoft-powerbi-connection-adw.pdf

Updating MS Azure SQL T-SQL stored procedures, functions, tables and Views online in a chromebook without SSMS?

I support some MS Azure cloud solutions that are Azure SQL + Azure Functions C# + Azure Web + JS frameworks. I've been working remote from a Chromebook am able to support 90% of the solution with the exception of SQL stored procedures, tables and views as i cannot install SSMS or SSDT.
Azure has a Query Editor feature in my database i can use to test and query my data, but it won't let me update DDL. The feature warns that it has limited capabilities and to open SSDT for full features.
Any good option to edit my MS-SQL DDL online/web based without a Microsoft Client?
incidently... Is it possible to update Azure SQL DDL from a Azure Function in code with enough rights?
Use the Linux applications and install Azure Data Studio.
Firstly, you need to enable Linux applications on your Chromebook. You can do so in Settings, Linux (Beta). The Chromebook will then take a little while setting up the environment.
Once done, download the latest version of Azure Data Studio and download the .deb version of the file: https://learn.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15.
Once Downloaded, open Files on your Chromebook and then copy it to the Linux Files Folder you will now see over on the left hand side. Then open your applications menu and open the (new) terminal application. Then run the command:
sudo apt update && sudo apt dist-upgrade
Answer yes if there are any updates to install. Then run:
sudo dpkg --install azuredatastudio-linux-1.16.1.deb
Obviously replace the name of the file if it differs, and I assume that you put the file in the linux area not in a directory.
You may need to run sudo apt install -f afterwards, to fix any dependancies, and then the dpkg command again.
Once done, you can then find Azure Data Studio in your applications and run it; like so:
Note, some commands are harder to do on a Chromebook if you retain the Search key as the Search Key, and don't enable the Function buttons are the top. If you do, I suggest setting up some custom shortcut keys for command commands. For example, on my Chromebook, I use Ctrl+K,Ctrl+R for execute query.

Unable to import SQL Azure V12 BACPAC: "type Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider is not valid"

I am trying to import the exported BACPAC from an SQL Azure (v12) database into a local SQL Server 2012 instance, but I keep getting the error below. I have tried installing the DAC and SSDT updates linked from this blog post, but it's not helping.
How can I fix this?
TITLE: Microsoft SQL Server Management Studio
------------------------------
Count not load schema model from package. (Microsoft.SqlServer.Dac)
------------------------------
ADDITIONAL INFORMATION:
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service. (Microsoft.Data.Tools.Schema.Sql)
------------------------------
BUTTONS:
OK
------------------------------
Updated: The new SQL Server Management Studio Preview is the best way to Import to Azure SQL DB. It has support for all the latest Azure SQL DB features and validations. In addition it has a standalone web installer that is automatically updated each month as new features become available. Given comments below mentioning the difficulty of installing a CU update, this would be a simpler & quicker solution to the problem.
Original Answer:
If you are using SQL Server Management Studio to perform the Import, you must have SSMS 2014 CU5 or CU6 installed. Information on installing CU6 is available here. The error shown in your question indicates you're using an older version of SSMS.
**Update: **
In response to Martin's answer below, I'd like to clarify 2 things.
SSMS for SQL Server 2014 is the only version of SSMS with full support of the new Azure SQL DB v12 features, notably Import/Export against this target. This is because v12 has (almost) feature parity with SQL Server 2014 and older versions of the tooling do not have support for this. Note that SSMS 2014 is fully backwards compatible with SQL Server 2005 and up.
There was a separate, temporary issue that caused problems with databases upgraded Azure SQL DB v12. This has been resolved and the correct place to find information about solving this are in section C3 of the Plan and Prepare to Upgrade page. In summary if you've exported a bacpac that is failing to import due to this issue you can download the latest DacFramework.msi from here to fix this issue in SSMS.
Full disclosure: I work on the SQL Server tools team.
To fix import error with [sys].[script_deployment_databases] from exported V12 Database you have to install:
CU13
Microsoft SQL Server Data-Tier Application Framework (February 2015) (you must install BOTH the x64 and x86 versions).
EDIT: CU13 is not necessary, just try second link first!
Install the following and it will work!
1) Have you installed Cumulative Update 5 for SQL Server Management Studio 2014. http://support2.microsoft.com/kb/3011055
2) Microsoft SQL Server Data-Tier Application Framework (February 2015) (you must install BOTH the x64 and x86 versions). http://www.microsoft.com/en-us/download/details.aspx?id=45886
I had the same problem with my dataabse backup from SQL Azure (v12).
I've installed Microsoft® SQL Server® Data-Tier Application Framework (February 2015) (in order to work correctly you will need install BOTH the x64 and x86 versions).
First I've installed x64 version and tried to restore the DB - but it didn't work. After that I've installed x86 version and I could successfully restore the database.
My SQL Server version: Microsoft SQL Server 2014 - 12.0.2269.0 (X64). OS: Windows 10 x64 build 10240.
Tnanks.
BacPac restore from Azure DB fails after installing latest SQL Server Management Studio 2016 Preview. Solution was to set "Contained Database Authentication" = 1 for my local SQL DB instance. Read about solution here or run this script on your local instance:
USE master
GO
RECONFIGURE
GO
sp_configure 'CONTAINED DATABASE AUTHENTICATION', 1
I was using wrong SqlPackage.exe path.
Does not work:
C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe
Works:
C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin\SqlPackage.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\SqlPackage.exe
I'm having the same issue.
Installing Cumulative update package 6 as suggested here helps to avoid the first bug but just to get stuck in the next one.
Related to this topic:
SQL Azure import of bacpac does not work after upgrade to v12
it's a bug Microsoft has no fix or workaround yet.
Edit: SQL Management Studio 2014 is required to restore (2012 doesn't work)
If there's one, I think the thread will be updated.
Edit: In the above mentioned link you now can find a workaround: You need to create a copy of your V12 database. This copy can be exported and reimported on your local sql server 2014.
Just updating the tools doesn't help.
I'm using version 11.0.2100.60 and had the same issue. Installed Microsoft® SQL Server® Data-Tier Application Framework (February 2015). All worked fine after that.

How to install Sql server 2008 during installation in InstallShield

I suppose i can check if some sql server is installed, then i want to install one if no one present.
How this can be done?
Prerequisites are not an option because the user can choose installation type were sql server is not required.
Thanks.
You can include sql server installer exe in your project and you can use LaunchAppAndWait and initiate the exe along with the required parameters.

Setup a Sharepoint Developer's Machine

I am setting up a Virtual Machine for Sharepoint 2010 development (and then subsequently learn Sharepoint development). I have a freshly installed Windows Server 2008 R2 Enterprise VM.
Are there any good blog posts or tutorials on what to install and how to configure all the Sharepoint stuff for development? Or should I just install Sharepoint and SQL Server with the default options and that will be good enough?
There's an extremely good guide on this MSDN page:
http://msdn.microsoft.com/en-us/library/ee554869.aspx
You don't need a separate installation of SQL Server, as the "stand-alone" installation option will install a SQL Server Express instance for you.
Don't forget to install the Microsoft SharePoint 2010 SDK from the Microsoft download centre:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f&displaylang=en
And don't forget to also install Visual Studio 2010.
Try
http://www.sharepointnutsandbolts.com/2010/05/tips-for-building-sharepoint-2010-base.html
You can combine it all into one machine if you want too.
The default options are sufficient unless they point out otherwise in the articles. For learning you can just "click next" for the installs and be fine.
Fortunately doing a SharePoint 2010 dev build is a little more straightforward than previous versions. However, here's guidance straight from the horse's mouth!
Happy SharePointing!
MSDN Channel9
Go to the below blog, all your doubts will be clarified.. You no need to install Sql Server seperately, while installing SP2010, it will install Sql server express by default.

Resources