In Visual Studio, I have a database file connected to local db. However I need to make a dump file (.bak) of this database in order to bring it online on my provider that accepts only such files.
From the "Explore Objects of SQL Server" window in VS I find no option to do that.
I have such option in SQL Server Management Studio, but I am not able to make it see my database. How can I move the database to SQL Server Management Studio in order to make the dump file? Or is there any other option?
Related
hi i am not able to create ssis catalog in my management studio?
it is showing this error....
The catalog backup file 'C:\Program Files\Microsoft SQL Server\110\DTS\Binn\SSISDBBackup.bak' could not be accessed. Make sure the database file exists, and the SQL Server service account is able to access it. (Microsoft.SqlServer.IntegrationServices.Common.ObjectModel)
I have the same issue. Trying to google my way through it. Things I have noted in answers from other sites:
Integration Services has to be part of your SQL Server install
(update the product and add if missing, this will add the file)
Version of SQL Server Management Studio and SQL Server engine need to match
File may be in the wrong location, find it and copy it into where SQL Server is looking for it.
Run SQL Server Management Studio as Administrator to avoid permissions issues
My solution was that I was attempting to create the SSIS DB on a remote server and not the server I was logged into. Once I attempted on the local server it worked fine.
I am trying to create a database in Visual Studio 2015 MVC setup. When I create a new file in the "App_Data" folder and select SQL Server Database, a popup comes up that says the following:
"Connections to SQL Server database files (.mdf) require LocalDB or
SQL Server Express to be installed and running on the local computer.
You may need to modify the setup and ensure Microsoft SQL Server Data
Tools is selected."
I have already installed SQL Express in my computer. But Visual Studio still shows the same popup. Can anyone please give me a step by step instruction on how to create a DB through Visual Studio 2015?
(My thought was if I clicked on new file->SQL server Database, then a popup would launch allowing me to input my data and name it. But I obviously am unable to do that).
Make sure that SQL Server is up and running. Open up SQL Server Management Studios (installed with SQL Server) and try and connect to the instance that you created (should be the same as your machine name). If it fails to connect, SQL Server might not be running.
To turn it on, open SQL Server Configuration Manager (just do a search and it'll show up), go to SQL Server Services, and turn on the database engine. You should then be able to connect to the database.
I've created a new ASP.Net MVC 4 project in Visual Studio 2012 and figured out that it creates a file with a .mdf extension to store the data.
I would like to view the database schema and be able to query it manually the way I can query a SQL Server database with SQL Server Management Studio.
How to do that?
.mdf IS SQL Server ... just attach the .mdf to your SQL Server instance, and you can have a look at it using SQL Server Mgmt Studio.
This whole AttachDbFileName= features is crap - sorry. I would never use such an approach to fiddle around with .mdf files. Just attach the .mdf file to your SQL Server instance, and then the database will be on the server (where it belongs) and you can see it there (and use it from there - update your connection string to connect to the server and the database on the server).
I am trying to generate script for my sql local database created using visual studio 2010. When i open sql server manager and connect to localhost or SQLEXPRESS the database created does not seem to appear.
After you generated your .mdf with Visual Studio - did you attach it to your SQL Server instance??
In VS, you can setup stand-alone .mdf files which are not automatically visible inside SQL Server Management Studio. Those are typically referenced by your application using a connection string that contains
AttachDbFileName=(path)\Mydatabase.mdf;User Instance=true
If you have such an .mdf database - you need to first attach it to your SQL Server instance before you see it in SQL Server Management Studio.
The question is probably extremely easy to resolve, but I need to resolve it because I need to carry on with my project. I am using SQL Server Express 2008 at home, and I've been working on an ASP.NET MVC app that stores my DB in an mdf file in the project's folder. The problem is that the SQL Server in the Uni labs is SQL Server 2005, and when I try to open the mdf file with the VS Server Explorer,It says that the version of the mdf file is more than the server can accept.
The only option that comes to my mind is exporting the DB as an sql file, just like I've done it thousand times with phpmyadmin. the thing is that the SQL Management Studio Express is not the most usable tool in the world, and for some strange reason all the articles I could find in Google were irrelevant. Please, help.
It is not possible to attach database created on SQL Server 2008 to SQL Server 2005. The other direction is possible.
Your only option is to script the database and data and run the scripts on SQL 2005. If you have used any of new features of the SQL Server 2008, you will have to rewrite the scripts.
I haven't used it much, but right click on database -> Tasks... -> Generate Scripts... / Export Data... / Import Data... should do the job right.
Google "Database Publishing Wizard", it's a tool from Microsoft to script an entire database, both schema and data.
you can script your db and its data. then run it on the target server to create a new db that is compatible with 2005 version.
Tools like Red-Gate SQL Compare and SQL Data Compare can compare a live database to e.g. a backup file, so you could compare your SQL Server 2005 database against the SQL Server 2008 Express backup file, and move data that way.
Or you could possibly generate INSERT statements for your tables that have changed data using a tool like this one here or this one here. These can generate INSERT scripts for your tables, which you can take along and run on your SQL Server 2005 target system.