SQL Server Import and Export Wizard: Data destination issue - sql

I am trying to get familiar with SQL Server commands and procedures. So I have downloaded from my university's Dreamspark account the Visual Studio 2015 Enterprise Edition.
My idea (call it personal project) was to try and import an excel table with dimensions 34162x465. And then within Visual Studio to try and manipulate it. For that reason I downloaded the SSDT for Visual Studio 2015 in order to use the SQL Server Import and Export Wizard.
I successfully researched and solved the first shortcoming, which was a Microsoft.ACE.OLEDB.12.0 problem.
But then, after I chose the excel file as a source, and when I reached the next step, to pick a destination, I chose SQL Server Native Client 11.0. The problem is that I cannot assign a SQL server because the drop down list is empty.
**I have already set up a local server (C:) and a database in Visual Studio's SQL environment, but I have no idea why the Wizard cannot detect its name.
Apologies if the question sounds ambiguous or I have missed any crucial details. Also, I have searched in various forums and online for similar issues but I couldn't find a solution.

Related

"Add new table" option missing - Visual Studio 2015

I'm working on Visual Studio 2015 and whenever I try to add a table from the server explorer menu, it only shows two options Properties and Refresh.
There have been answers for this problem, but I have already tried them, like, adding SQL data tools and repairing visual studio.
SQL data tools were already installed and even after repairing the problem persists.
So please suggest me how can I add tables to the database.
Thanks for the comments, but i solved the problem.
Open the command prompt and type the command:
C:\sqllocaldb create "MyInstance"
MyInstance refers to your sql server instance, it can be v11.0 but for me it was mssqllocaldb .
If it runs successfully, it will show you result stating 'Instance created' and you will be able to add the tables.
But if you get error regarding creation of instance then delete the instance by typing the command in command prompt:
C:\sqllocaldb delete "MyInstance"
and then create the instance.
I hope this helps.
Close your visual studio.
Download SQL Server Data Tools
Install it in your pc
Then Close if successfully installation.
Now Open your visual studio.
Hope this will help.
Enjoy :)
Another reason "Add New table" Not showing is you don't have installed SQL server Data Tools.So just go ahed and downlaods SQL server data tool ISO from official Website
https://go.microsoft.com/fwlink/?linkid=863443&clcid=0x409
Install the SQL Server Data Tool And Restart Visual Studio
Download and Install SQL server data from the link given below,
https://download.microsoft.com/download/3/4/6/346DB3B9-B7BB-4997-A582-6D6008796846/Dev12/EN/SSDTSetup.exe
After installing the SQL server you will be able to add a new table.
Table > right click> Add new Table.

How to create a database project in Visual Studio 2013

I'm migrating a solution which contains some C# projects from Visual Studio 2008 to VS2013. The migration went fine, with a few adjustments, but there's also a .dbp project (database project, from VS2008), which refuses to migrate / load in VS2013.
The closest project type I found in this newer version is "SQL Server Database Project", I've created one and added my existing .sql script files, but this project type (.sqlproj) appears to be something different. For example, VS 2008's "database project" does not build. Also, I had a hard time trying to add a reference to my existing SQL database running under SQLExpress.
I've also set BuildAction = None to all my script files, and now I can open each of them manually and execute. But still, I'd like to select multiple files and execute them all at once. Seems I'm missing something.
So, is there a way to accomplish that?
I suggest you look at the following article to convert the dbp to dbproj: MSDN
And after that look at the following link to convert dbproj to sqlproj: Tentacle Software Blog

Databases and Visual Studio 2013

I am collaborating on a project with several other people in Visual Studio 2013. We are using Tortoise SVN to share the project so that we are all working on the same files. I was in charge of constructing the database, which I did. But after making the database in the SQL Server Object Explorer under (localdb)\Projects(SQL Server 11.0.3000-THE-DRAGON-DEN\Dragonfett), I can not seem to find the database in the solution folder for the project.
How do I get the database into the project folder?
That is merely a link to a SQL Server database.
If you want the database in the solution folder then you will need some form of project. SQL Server Data Tools (SSDT http://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx) is what you are looking for. AFAIK this is installed with VS2012 and VS2013. For VS2010 you will need to install SSDT manually.
Select File->New->Project and in the templates look for SQL Server Database Project under the SQL Server Template group. SSDT has a great import facility which will let you import the contents of an existing database with no fuss. SSDT as a project can then be checked into and controlled by SVN.
Other that that, Installing, configuring and using SSDAT is beyond the scope of the question. I would suggest you do a bit of homework and read up on SSDT and how it works.

Latest recommendations for Import\Export of SQl Server bacpac files [duplicate]

This question already has answers here:
Azure SQL Database Bacpac Local Restore
(6 answers)
Closed 9 years ago.
I'm trying to get up and running with Windows Azure but finding the database side extremely frustrating. I need to export my local database to a bacpac file from SQL 2008 and then import into Azure. I would also like to be able to export from Azure and then import to my local database for debugging.
I have found a few tutorials online for achieving this but every time I get part way through one of them I eventually hit a section that requires a step where the information or download is marked as outdated! it seems to have changed quite a bit over time and I can't find an up to date resource
Can anyone provide an updated link on how to do this?
Thanks
I had the same issues, all documentation on importing/exporting .bacpac mostly reference SQL 2012. I needed to export a sql 2008 R2 express database to azure as well as to be able to export from azure to my local devlopment environment.
I found the SQL Database Migration Wizard v3.9.9 & v4.0.12 to do the trick.
Download Link: http://sqlazuremw.codeplex.com/releases/view/32334
Also download the documentation and it will go through the migration of .bacpac to and from the azure and your local server. What is great about the tool is it will perform a compatibility check on the database to ensure it is ready to deploy to azure.
There is also another command line tool I investigated sqlpackage.exe that can be downloaded as part of Microsoft SQL Server Data Tools
Download Link: http://msdn.microsoft.com/en-us/data/hh297027
Below is an example of exporting a .bacpac file:
sqlpackage.exe /a:Export /ssn:SERVERNAME\sqlexpress /sdn:SOURCEDATABASENAME /su:DATABASEUSER /sp:DATABASEPASSWORD /tf:c:\SOURCEDATABASENAME.bacpac
I needed to export a SQL Azure database and then import it into a local SQL 2008 R2 server (Note I am also using Visual Studio 2010). Microsoft certainly went out of their way to make this a painful task, however, I was able to do it by doing the following:
Goto think link http://msdn.microsoft.com/en-us/jj650014 and install the SQL Server Data Tools for Visual Studio 2010
This will install on your local drive. In my case here is where it put it: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
Browse to this via the command line or powershell
You are going to want to execute the SqlPackage.exe
Open up this link to see a list of all the parameter options for SqlPackage.exe (http://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx)
Here is my command line that I needed to execute to import a .bacpac file into my local SQL 2008 R2 server:
.\SqlPackage.exe /a:Import /sf:C:\mydatabasefile.bacpac /tdn:NorthWind /tsn:BINGBONG
/tdn is the name of the database you want your bacpac file to restore to.
/tsn is the name of your SQL server.
You can see all these parameter descriptions on the link from #5.

Visual Studio error when trying to open dbproj files

I have Visual Studio 2008 Database Edition, and everything worked great until the first time I tried to load a .dbproj file. These database project files work for the other developers I work with, but when I try to open it, I just get an error message "Object reference ot set to an instance of an object."
It's probably the same problem this guy is having, although he didn't do a good job of describing it and has no solution.
Every other kind of project file loads and builds and runs normally. dbproj files all generate this cryptic error. I just tried a fresh removal and reinstall of Visual Studio 2008 DE to no avail. Could this have something to do with my SQL 2005 installation? (This also works normally through SQL Server Management Studio.)
**
UPDATE
**
Probably even more importantly, this same error occurs when I try to make a new dbproj file. Every other type of project can be created no problem.
You need to tell Visual Studio the correct instance of SQL Server to use for validation.
Tools>Options>DatabaseTools
Change the settings in "Data Connections" and "Design-time Validation Database" to reflect the correct instance.
After many failed re-configurations and re-installations, a member of my team discovered the problem!
Under Tools > Options > Database Tools > Design-time Validation Database, there is an option to set your SQL Server Instance Name. Visual Studio automatically picks this when it's installed.
The key is that Visual Studio doesn't necessarily pick the right one. I happen to have 3 SQL server instances on my machine. SQLEXPRESS (a 2005 instance that Visual Studio installed alongside itself), SQLEXPRESS2005, a 2005 instance I installed, and SQLEXPRESS2008, which I also installed.
Visual Studio had configured itself to connect to the SQLEXPRESS2008 instance, even though it only supports SQL2005 dbproj files by default. By opening this dialogue, and updating the server instance name, the error no longer appeared and I was able to open dbproj files: