I am using Visual Studio 2017. From data connection when I create new SQL Server database, a pop up open and ask for server name. I refreshed but no server name display. What is the solution?
I found my answer. From the SQL Server Object Explore, Right Click "Add New Server" Then click to local and select server. After selecting the server i found server name. I copy the servername from here
and paste it to paste it to
"create new sql server database" server name field.. And set database name. Finally it works!
Install SQL Server, SQL Server Express, or LocalDB on your current computer or a computer in your network.
Explanation
SQL Server Data Tools provides you with a client application that you can use to connect to SQL Server instances.
However, it does not include a server instance (a Database Engine Instance). In order to have anything populate that list (namely servers), you have to install one of the above options on a machine in your network that you can connect to.
you can use localDb...
create a new connection with the following in your connection string:
Data Source=(localdb)\MSSQLLocalDB;
Integrated Security=True;
then you can create new DB inside visual studio:
Related
I have reset/formatted the system, then I installed Visual Studio 2019 and SQL Server 2019, but I am not able to connection SQL Server. Then I followed this link
https://www.mytecbits.com/microsoft/sql-server/where-is-sql-server-configuration-manager
But in step 3: SQL Server Configuration manager /SQLServerManager15.msc not able find in add or Remove Snap-ins popup window in my system.
What I should do?
In Visual Studio, go to View, Server Explorer, Data Connections. You can see existing connections there.
Or you can create a new connection. If MSSQL is properly installed then you can put in localhost for the server name and connect.
I have created a local db and I want to connect some tables to Microsoft Access. I'm doing this via Microsoft Access's "Link to the data source by creating a linked table" feature" and in order to do that I need to create a DSN. However I'm getting an error where it says
"Server does not exist or access denied"
At the moment I'm trying to create a new DSN and i'm stuck during the below step which I need to specify my server. I've tried two different server names and they both don't work.
Note: It's definitely not an access denied issue because I've tested the login myself and they all work fine.
Can someone please tell me what I'm doing wrong or is it not possible to link Access to a local db.
Resolution
When choosing a driver for the new data source, use either the ODBC Driver...for SQL Server or the SQL Server Native Client. (note: I am also able to get the "SQL Server" driver to work, but only by specifying the named pipe address of the instance in the next step/image where specifying the SQL Server to connect to.)
The SQL Server to connect to in the "Create a New Data Source to SQL Server" should be "(LocalDB)\instancename"; in this case "(LocalDB)\MSSQLLocalDB"
Caveats
As the LocalDB name itself implies, connections to it can only be
made from the local machine. If you need to access an instance on a
different machine, and need a free solution, you should use SQL
Server Express.
These results were obtained using Access 2016. My
experience with other software indicates it should work with Access
2010 as well, but I did not test that. If you have trouble, try using
the named pipe address for the instance instead of the
"(localdb)\MSSQLLocalDB" moniker in the image above.
Results
Here are the results of testing the connection, then adding links to two tables in the master database
Instead of using a LocalDB I used SQLExpress which worked fine.
I have installed the Sql server 2008 express edition with tools. After Installing sql server 2008 and sql server management studio. When i open the sql management studio it shows a window, Connect to server. Here I got already filled boxes like that:
Server type: Database Engine
Sever name: (local)
Authentication: Windows Authentication
When i click on the Connect button it displays an error message box, and nothing will be created. What can i do. Would someone help me to fix it.
Open run--> CMD
execute this code : NET START MSSQLSERVER for default instance and NET START MSSQL$<INSTANCENAME> for named instance.
I agree with user2196728, you should be able to connect using the SA account specified during installation. At that point you should be able to setup an account using your domain account (windows authentication)
Confirm that this is turned to on (2008R2):
Click on the Start Menu.
Go to the folder Microsoft SQL Server 2008 R2
Click on the folder Configuration Tools
Launch SQL Server Configuration Manager
When that loads, on the far left menu, click on SQL Server Services
You should see at least three items on the right window, probably SQL Server (SQLEXPRESS), SQL Server Agent (SQLEXPRESS), and SQL Server Browser. Right click on SQL Server (SQLEXPRESS) and click Start (if it's highlighted out, that means it's running).
Then try logging into local again using Windows Authentication.
I use Microsoft Visual Studio 2010 Professional (I installed all components).
Here is what I'm trying to do. I create a new ASP.NET project. Then I open Server Explorer (View->Server Explorer), right click on Data Connections and choose Add Connection. Then I choose Microsoft SQL Server and press Continue, but the 'Server name' list is empty.
I launch Sql Server Configuration Manager and it shows that SQL Server is in running state (Agent and Browser are stopped)
Why there is no any Sql Server in Add Connection list?
--------------------------------------------------------------
I allow remote filestream for SQl Server, so no I can choose server in the list, but when I enter new database name and click Ok I get a error "sql server was not found or was not accessible"
--------------------------------------------------------------
Here is a list of installed programs with 'SQL' filter
Have you configured SQL Server to allow remote connections? By default, SQL Server Express Edition and SQL Server Developer Edition do not allow remote connections.
For SQL Server 2005:
How to configure SQL Server 2005 to allow remote connections
For SQL Server 2008:
From start menu of SQL Server 2008, run SQL Server Configuration Manager.
From left side view of SQL Server Configuration Manager, expand SQL Server Network Configuration.
In the right view, you will see the list of SQL Server protocols. By default only Shared Memory is enabled. Enable the other protocols to get your SQL server to accept connections over the network.
Your problem appears to be that you have more than one SQL Server instance installed locally. You will need to use the fully qualified name.
I'm using VB 2008 Express for our College Project. I'm also running SQL Server 2008 Express and have installed SQL Server Management Studio and used it to create my database.
Both software have been installed and running locally. I'm trying to connect to the database from VB 2008 Express. Database connection wizard have 3 options:
connecting to Access db
connecting to SQL Server 3.5 compact db and
connecting to SQL Server db file.
There are no problems connecting to the first two but when I try to connect to my SQL server DB file (.mdf) it throws the following error ("Unable to open the physical file .... Operating system error 32:(failed to retrieve text for this error. reason:1815.......an attempt to attach an auto-named database for file ...... .mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share")
I appreciate if anyone who had the same experience and overcome the problem could point me in the right direction.
Thanks very much.
Little Critter.
You need to detach your database from the server. Since you created the file there it is already running on the SQL Express server. Operating System Error 32 is a sharing violation and it means that the file is in use.
Try this:
Open Sql Express 2008 Managment Studio and find your database in the Object Explorer tree.
Right click on your database, choose tasks, and then select "Detach"
When the "Detach Database" dialog appears, select the checkbox that says "Drop Connections"
Click ok.
Your database should detach from the database server. Now the server will no longer bring that database up automatically and you should be able to get exclusive access to it.
Note that if you want to make more edits to the MDF you will have to reattach the database or you will need to use the tools built into VB 2008 Express. Because of this most people would choose to leave the database attached and not run it as a "User Instance". Check out this link for alternative ways to get to your data: How to: Access and Initialize Server Explorer/Database Explorer.
Anyway, you may have your reasons for setting it up this way. The steps outlined above should fix you up. Good luck with your project!