Accessing Amazon RDS Oracle database from Visual Studio 2013 - asp.net

I have set up an Oracle database on Amazon RDS and am attempting to build an asp.net webpage to access it. I am using Visual Studio 2013 and have the AWS Toolkit installed. I'm able to see my database instance in the AWS Explorer and can even modify it but I'm not able to add the database to the server explorer so I can utilize it from a webpage project.
If I right click on the database instance in the AWS Explorer and choose 'Add to Server Explorer...' nothing happens. When I open the DB Instances window and right click on the database the 'Add to Server Explorer...' option is greyed out.
I did try setting up a SQL Server database and was able to connect to that so I think it must be something specific about Oracle. I installed ODAC and it didn't help. I would be very appreciative for any advice you could offer.
Thank you.

You can't add an Oracle database to Server Explorer without the proper tools. Each database vendor provides different management capabilities and APIs. Server Explorer works with SQL Server out of the box because it already includes the proper integration provider.
You can download Oracle Developer Tools for Visual Studio from Oracle's site.

Related

How to know if Entity was using SQL Server or not?

I have followed through a tutorial using a "Code First" approach with Entity framework. It seems like Visual Studio was smart enough to create the database for me and setup the tables and everything based on my classes. I have a question about the database that was created.
I notice that the database was automatically set up and I could see it in my Server Explorer window in Visual Studio. In my Web.config, under the connection string, I see Data Source=(localdb)\v11.0;.... There is also a .mdf file created in a folder called App_Data.
My question is:
Was Entity framework using MS SQL Server or SQL Express for the database it has created?
If it wasn't using MS SQL Server or SQL Express, what was the database that Entity used?
I don't remember installing SQL Server or SQL Express. Does installing Visual Studio automatically install MS SQL Server or SQL Server Express?
PS: I will appreciate if you can help me to clear up my doubts. Coming from a PHP background, I'm very new to .NET and its ecosystem.
The connection string indicate that you are using SQL Server Local DB.
With Microsoft SQL Server 2012, Microsoft has introduced a feature called LocalDB which is a new edition of SQL Express. LocalDB is created specifically for developers and it is much easier to install (no service) and manage than standard editions. Developers initiate a connection by using a special connection string. It supports AttachDbFileName property, which allows you to specify a database file location.
When connecting, the server is automatically created and started, enabling the application to use the database without complex configuration tasks. This edition uses the same sqlservr.exe as the regular SQL Express and other editions of SQL Server.
http://msdn.microsoft.com/en-US/evalcenter/dn434042.aspx
http://technet.microsoft.com/en-us/library/hh212961.aspx

Getting started with SQL Server Reporting Services

I'd like to set up SQL Server Reporting Services but I don't know where to start. The books out there are okay but don't seem to fit what I need to do. That is, I want to set up my ASP.NET 3.5 application to be able to view reports I create, both in a web report viewer and downloadable as PDF/Excel.
What are the basic steps to do this? Do I need IIS installed on the SQL box?
Reporting Services for SQL Server 2005 is built on top of IIS. Reporting Services for SQL Server 2008 is not, but you may still need IIS installed anyway; I seem to remember that the install process checked for IIS as a precondition.
What version of SQL Server are you using? I assume that you have a version with reporting services, but just to verify, the Express editions don't have it. SQL Server developer edition is the cheapest way to go; it's usually available on Amazon for something like $45. Developer edition has everything, but with a restricted license.
I haven't messed with reporting services much (it's on my list, but never seems to get to the top of the list). However, the 2008 version uses Visual Studio 2008 for developing reports (renamed as SQL Server Business Intelligence Development Studio). Once you have all that installed, you should be good to go.
You can access the SSRS implementation via a SOAP API.
http://msdn.microsoft.com/en-us/library/aa256607(SQL.80).aspx
This should allow you access to reports via a report viewer which you has built in means for exporting to pdf / excel etc.
Install it from the main SQL Server installer. Make sure you also install the client tools on the machine you'll be using for development.
Use Visual Studio (or BIDS) to create and deploy your reports. There are standard templates to get you started.
When you access the reports over the web, you will have the option of downloading them as PDF or Excel (no special settings or code is required)
Embedding reports in an ASPX page takes a little more work. When you get past the items above, post another question about the details (it mainly involves a couple of special controls).
The ASP.NET ReportViewer control can operarate in two modes, local or remote. In remote mode it will display reports from a SSRS server, in local mode you can add the reports directly to your visual studio project and the control will handle the rendering. This might be more suitable if you don't want to install IIS.
In my experience it is easier to create the reports in remote mode but in local mode you can use business objects as a data source.
Have a look at http://www.gotreportviewer.com, this has a good explanation and links to other resources and sample code.

SQL server express backend for ASP.NET web service

I come from a linux/apache/php/mysql background. For my current project, I am forced to write web services using ASP.NET. I have installed visual studio and created an ASP.NET web service project. The web service I'm creating will use a SQL database backend. I see that visual studio installed "SQL Server Express 2008." I can see that there is a service called "SQL Server (SQLEXPRESS)" that is running. My question is, how do I run queries against this database? Where's the front end? What tool do I use to create databases and tables? Is there something else I have to install?
I feel completely lost and my google-fu fails me. There are so many different SQL products from microsoft that I can't tell what is the easiest path to just having a simple database with tables I can query from my development machine. With MySQL, I would install the MySQL database, download MySQL query browser and start firing queries at it. How can I do that with Visual Studio/SQL Server Express?
You can download SQL Server Management Studio from here. This is the GUI for working with SQL Server. It will let you create databases, tables, stored procedures, etc. as well as writing queries and manually edit data in the tables.
Aside from SQL Server Management Studio, you can use the Server Explorer tab in Visual Studio (by default on the right side, next to Solution Explorer) to add a data connection. You can do most of the most common database tasks (create/query tables, create views, etc) from there.
there's a command line tool that installs with SQL Server (all versions) called SQLCMD.exe, should be in your install path.
Visual Studio also lets you create dbs, run queries, look at table structures and data (including creating and deleting them, etc), you do that by opening your Server explorer window and making a connection to your local instance (.\SQLExpress by default).
Finally, as the other person mentioned, SQL Server Management Studio Express is a free download, and well worth the time it takes to install.

SQL server won't open DB created by Visual Studio

I've built an ASP.Net site in Visual Studio, and created the DB inside it (the .mdf file is in the APP_data folder).
Now, when I want to deploy in the customer site, I think about maintaining the DB without open Visual Studio, and by using the SQL Server Express tools (back up etc.).
I've searched how to do this, and learned that I should attach the .mdf file to sql server.
I've tried to do this and failed!
The error is: Unable to open the physical file "< .mdf >". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
Google didn't helped me to solve the problem.
Now I have 2 options:
1. To give up and deploy the site in the current situation where the DB is an .mdf file and ASP.Net can connect to it by the SQL server express compact (in the proccess).
To extract all the data (I need to think how...) and import it to new DB, this time in SQL Server DB.
Wat would you recommend doing?
Thank you in advance.
If on Windows Vista or higher, try opening SQL Server Management Studio by right clicking and saying "Run as Administrator". As Mitch mentioned maybe it is just a permissions issue. Then try attaching to the database.
Error 5 is usually permissions related. Do you have permissions to access the file in it's location?
If you've created it in Visual Studio, it's most likely an Express database. SQL Server does not support "user mode" database connections which SQL Server Express use. Despite sharing a name, they are two fairly distinctive and different technologies.
To view the contents of an SQL Express database (ie- created in Visual Studio) I just use the Visual Studio server explorer.

How do I create my first database for .NET development?

Ok! I'm ready to embark on some .NET development for the first time.
I've recently installed Microsoft Visual Studio which included Microsoft SQL Sever 2005.
What is the prefered method for programming against a development database? I want to write an ASP.NET application that uses a database and I'm not sure how to create one. In my start menu for SQL Server 2005 all I have is:
SQL Server Configuration Manager
SQL Server Error and Usage Reports
SQL Server Surface Area Config
I don't see an intuitive program to create and design databases on that list, so how do I do it?! Will I be creating a full fledged SQL Server database or a "flat-file" fake database to program against?
Can someone please tell me what is up on creating my first MS SQL Server 2005 database?
If you've Visual Studio, just goto server explorer, Add a new database connection to your database, and start off.
Or, create a new website project in Visual studio, right click the App_Data folder->Add New Item and add a SQL Server database mdf file, which will be attached to the sql server when you run the app. You need to deploy the mdf file when doing a production release :)
You might want to watch the videos in ASP.NET website http://www.asp.net/learn/
Otherwise, consider using Microsoft SQL Server Management Studio (an express edition is also available).
You are looking for Microsoft SQL Server Management Studio Express. Its pretty easy to add a database once you get your head around it.
To be clear, the SQL Server included with Visual Studio is an express edition. However, the one thing it is lacking is the SQL Server Management Studio (Express). I'd download and install the express edition that included the management studio (note that VS 2005 and 2008 include SQL Express 2005, you can use either SQL Express 2005 or 2008 for your purposes).
You can create a new database and do everything you need to from within the VS IDE but you'll probably find the SQL Management Studio environment much more intuitive and simpler to use as a beginner.
A quick note on SQL Express - Microsoft doesn't suggest it for 'production' environments due to limitations placed on the amount of RAM that Express can see/use and a few other factors. This is one of the few cases in which I agree - if you're doing anything complex that involves large databases or dozens of users then invest in MSSQL Workgroup Edition at least, or for Enterprise projects use MSSQL Standard or Enterprise versions.

Resources