i have been having this problem and wondering if u guys could steer me in the right direction. i have created a web app, and i have the .mdf files in the App_Data folder. i have create a web setup project for this. everything installs 100%. But because the server( or machine ) that i install the project on doesnt have user instances because this is disabled by default. how then can i deploy a Database with my installer? bare in mind that this must be a simple installation process, as the end users 9/10 times will not have a DBA, or even knowledge of what a Database is?
Any Ideas?
Thanks in advance...
EDIT: Appearantly user instances are on by default, but only available in SQL Server Express 2005 and earlier. For it to work, it depends on the connection string, which you control:
Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\Database1.mdf;
Integrated Security=True;
User Instance=True
You still have to make sure the web server has SQL Server Express installed; if they have SQL Server, you're screwed.
The full details can be found in this MSDN Article.
By the way, you know that user instances is a feature that's being deprecated?
Related
Hi All and thanks in advance.
I have an application developed in WebDev 22, and I was able to successfully upload it to my own personal Home Web server, The Application works fine however it cannot read the data because it does not have the analysis.
This application Analysis uses an MSSQL Server Database via the Analysis utilizing MSQL Server Machine ODBC (Means that I am not using the PCSoft Native MS SQL Drivers).
How can place the analysis when creating the Deployment Setup Install File, and how to configure it so that when I am installing the Application in the Site it will talk to the same database I have installed on the Windows Web Server at Home?
Does anyone knows, can this be possible?
Thanks
Regards,
Carlos
I got my own situation resolved.
It turns out that when a Setup Disk is created in PC Soft WebDev, it will automatically include the Database analysis inside the package, in my case I used the option of creating a Media Setup disk to run it in the Web Server, and install the application there. I thought that a very special configuration was needed to be done to connect the Analysis to the MS SQL Data Server in the Web Server, and is none of that.
Let me explain how I got it solved and I would like to explain that everything
was done in the Analysis connection to make possible this connection.
Open the Analysis and Click Connections.
These are the Parameter:
Name: Your Connection Name.
Caption: Your Connection Name here if you want.
Connection By: SQL Server (Microsoft OLE DB Provider for SQL Server).
Data Source: Your MSSQL Database Server Name.
Database: Your Database Name.
User Name: User you created to connect to this database.
Password: The User Password for the User.
Click on Test, if the Connection is successful you are good to Go.
MAKE SURE YOU HAVE VISUAL ON THE SERVER YOU ARE TRYING TO CONNECT
Save the Analysis and Synchronize.
Create the Setup disk and install on the Web Server.
That is it.!!
Why?
Because of when the WebDev application starts, it will Automatically open the Analysis.
The Analysis will then automatically look at the settings you have provided in the Analysis Connection Settings, and it makes the connection.
That is it, I hope this has help.
Best regards,
Carlos
experiencing an odd issue I've yet to see on any of my other machines. This is a fresh laptop, so I have installed VS 2017, SQL Server 2017 express, then created a quick sample project using one of the stock .net core projects (with authentication stored "in-app"). This, of course, creates some basic entity migrations and DB context.
When I run I'm getting access denied errors. So, of course, I checked SQL service default user which is an admin. I then run basic migration commands and receive this
So, of course, my next step was to double check the default data locations of SQL since it appears to be trying to store it in C:\Users root?! I have never had to bother touching this during install, but worth a look. And of course, they are as I expected in their default locations of C:\Program Files\ etc
Rapidly running out of things to try at this point - and considering this is a fresh windows 10 install, with bare-bones vs 2017 and SQL express 2017 it feels a lot like a bug here. Everything is a default if you were to File -> New Project -> .NET Core Web Application with INdividual accounts.
Anyone have any thoughts or things worth trying? Why is it trying to store my DB in C:\Users? Connection string -
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebApplication3-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"
Thanks!
-Marc
You are not using SQL Server Express.
The local string says (localdb), which is the SQL Server engine running in user space. This is a big difference. Usually SQL Server or SQL Server express runs as service. (localdb) is not an alias for localhost (loopback address). It's a special name for a minified version of SQL Server which runs in user space.
When SQL Server runs as a service, it needs to have read/write permissions to the folder it writes. This is usually NOT THE CASE when the file is located within the User folder.
LocalDB on the other side, is always started when you start debugging your application and runs with the permissions of the user. So if your file was created by an admin user or outside of a directory you have write permissions.
Also, when you mount a database to SQL Server (Express), then the file is protected from write access to other applications, so LocalDB can't open it neither.
LocalDB is made for development to offer most of the SQL Server features but without all the hard setup and permanently running service in the background.
Essentially you have two options:
Use the SQL Server connection string as #TanvirArjel suggested
Detach the database from SQL Server express, copy it to your user folder (C:\Users\<myusername>\) and then correct the path to it
Then it should just work.
Notice that LocalDB is not meant to run in production, so you will likely experience issues when trying to run it in IIS (IIS Express and Console applications and WPF work fine).
Reasons for LocalDb not working with IIS is because ASP.NET (Core) applications within IIS run with a special user, but LocalDbs are always created in the users profile folder. Now, the accounts used by IIS don't have a profile and can't create the database and can't access any database outside (since localDbs are stored in user folder only the user who created it has access to it).
Here some source on it and the reasons behind it.
Using LocalDb with IIS
Write the connection string as follows.Hope it will work...
"DefaultConnection": "Server=YourPcName\\SQLExpressInstanceName;Database=aspnet-WebApplication3-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"
I am unsure about how to best resolve this issue. I have been working on a MVC application that requires user authentication, so I set up the project to use individual accounts, all well and good, it works fine.
However it saves the account data into a local db instance. I am at the stage where I want to host the application on a amazon web server I am renting. Publishing it to here has been fine, but now it can't connect to the local db so the sign up / register is no longer working.
My question is, can I somehow take this local db with me to the server, or do I need to generate a SQL script from it and deploy it on a local instance of SQL Express, and if so, how? I have had no luck with my attempts at either and would greatly appreciate any help.
Thank you.
I've never done this as Local DB is not recommended for anything in production so I'm not sure if it's allowed in AWS. In Visual Studio at the top of the solution explorer window there is a button to "Show all files" you should then see the hidden MDF local db file within the App_Data folder. Ensure that this file is being published to AWS.
I am trying to find a solution to three issues I have encountered recently relating to SQL Server 2014. I am not an expert with this stuff by any means, but I've sort of fallen into needing to learn it in my current role. I went from never using SSMS a few months ago to (Trying) to teach myself how to use SSIS and SSRS. I've made a ton of progress, but now I'm stuck actually getting everything automated the way I want it.
The biggest challenge, and root of all my problems, stems from the fact that I am not a local admin on my machine. It was great to finally get IT to install the programs, but they do not want to give me, or anyone not in IT in my company, local admin access. Apart from asking my director to try to convince them to do so, I'm hoping for some solutions that would mean I don't have to call them every day to run these programs.
My integration server is running, I've got my SSIS packages built, but I can't connect to the Integration Server through SSMS, as I am not a local admin on my machine. I've read about going through dcomcnfg settings for REMOTE access issues, but I'm worried that won't help here since I'm trying to do this from the local machine and it still doesn't work. Any ideas as to how I can change the settings so that it runs for non-admin accounts or just make it work?
SSRS: I've built a report, and want to deploy it, but I don't have access to the reporting services configuration manager either. For whatever reason my reporting server is stopped in the server configuration manager. When I click on it, it says to use reporting services config mgr to tweak settings, so a bit stuck. Appears to be the same issue - not a local admin. Again, are there any settings I can change (getting IT to log in as an admin and walking them through what to change is my only choice, essentially).
SQL Server agent appears to be the same issue...
I could probably run my reports now, but it would be so much nicer to use these programs to the full extent. Any help would be appreciated here. I tried to research as much as possible, but most solutions seem to relate to logging on myself as an admin, running things as admin, etc, and I just can't do that.
Thanks!
You do not need to be local admin on your machine, SSIS and SSAS require Windows Authentication to log on remotely to the server via SSMS and publishing anything to the server from BIDS / SSDT Visual Studio Shell also requires WinAuth, though you can work locally and then swap the package to the server via Ctrl-C, and also instead of deploying SSRS you can login directly to the report manager and upload an RDL file (report). To start and stop SQL Agent services you need Windows Authentication via SSMS (in your setup), but to view the SQL Agent you must be in the SQL Server SysAdmin role (or at a grain level SQL Agent Reader via the MSDB rights.
I recommend you attempt to not get local administrator rights and instead ask 'merely' for rights to read and write to the server drives, and to manage only the aspects of SQL Server and it's services with a domain login on the server. You will require this anyway to check ingress and egress file locations and debug production issues (unless you have FTP to the box).
You do not have access to stop or start SQL Agent from your client SSMS also because I believe you are accessing it via SQL Authentication, which is not ideal or secure. But if you do not see the agent on the bottom left of SSMS it is because you do not have rights. If you see the Agent and it is red then the service is disabled and must be started.
You will need to get direct access to the SQL box (and you do not need local admin to manage SQL Server, just a domain account with some service rights and drive rights). If your system administrators are running SQL Server under Local Admin, then they should not be managing SQL Server in the first place (see my write up hyperlinked below).
The SSRS Team at Microsoft has merged into the SharePoint team, and SharePoint 2013 wraps up all of the BI tools right into it, so that is something you should also consider if you plan on building out a BI shop at your firm, i.e. you may not have to if you already have SharePoint installed.
Good luck, don't get discouraged.
What user account would you recommend running the SQL Server Express 2008 services in a development environment?
I am trying to install and configure SSRS on SQL 2005.
When I click Reporting Services Configuration, I get a message saying
No report servers were found on the specified machine - Details
Invalid namespace.
How can I resolve this?
You don't "configure SSRS on SQL Server 2005", as such.
It's a component that you choose at install time (like Analysis Services, Integration Services etc). For SSRS, then you require IIS as a prerequsite and it won't be installed if IIS is not present.
The error itself is 100% correct if SSRS is not installed...
Is it actually installed?
Edit:
Just got this on one of my feeds: KB 960374 that describes the exact error above
Quite simple. Place your disc with SQL in and run setup. Add features to your existing instance and select Reporting Services. Once installed it would have created 2 databases on your SQL Server named ReportServer and ReportServerTempDB
Open the services configuration and you should be prompted to connect to an instance of Reporting Services.
If you see this screen then you are ready to go.
--Read this only if you might have questions to ask
Setup a service account for Network Service (save the .snk key and it will create your IIS entries etc. If you don't have IIS then upgrade your OS to a compatible version. It can be installed via Add or Remove Windows Features)
Make sure your new database is selected in the Database section. If not, then follow the screen to add it
Open the Report Manager URL and click on the link. (You may need to be in as an administrator)
When you want to deploy reports, simply update your solution properties with the TargetURL pointing to the Web Service URL that is available after setting up the Service Account)
Ask anything further if you need the guidance. I've done this to about 5 servers in the past month already, so I know what can go wrong.
Cheers,