Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Create databse failed while creating from VB.net Custom Action with MSI

$
0
0

Hello,

I have a setup file which which has the VB.net windows project. I have added a vb.net exe to custom action whihc will create database and login while installing MSI.By using SQLCmd and command prompt we did this.

cmd.exe /c sqlcmd -S .\SQLEXPRESS -E -Q ""use master CREATE DATABASE Laptop collate SQL_Latin1_General_CP1_CI_AS

This is working fine with SQL Express versions 2005 and 2008. But when trying to work with SQL 2012 instance, it is failing with the error "CREATE DATABASE permission denied in database 'master'". But if I run the same commands from the command prompt (not with the admin previlege), it is creating database to the SQL Server successfully. The SQL 2012 instance is configured with Windows authentications ( DOMAIN\Administrator).

When I have tried the same  custom action code in a sample VB.net application, it is created successfully.

Please help me in resolving this issue.

Thanks in Advance.

Regards,

Karthik.K


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>