here is my setup:
Sql server 2008 standard running on Vista - VMware running a XP machine with VS2008 inside it.
If I open a SQL database in my host computer in sql server management studio and make structure changes to the database and then go back to visual studio, my visual studio has lost connectin to the database (says a network error has occured) - refreshing does not work. Closing down VS and reopending fixes the problem.
Has anybody else noticed this or is there maybe something wrong in my setup I should be looking into?
I can query the database, add data, delete data with no issues - only if I change the structure such as relationships or add remove columns etc.
Thanks,
Joe
I don't know if your problem is the same as mine, but if it is you could probably fix it by resetting some settings in Visual Studio.
This might be a server faults question.
I had a similar issue with network sharing / SQL security in VMware (though mine was fusion on OS/X.) The issue seems to be the network drops and loses connections. In my case I was always able to resolve the issues with dhcp release / renew on the client.
I raised a support call with VMWare on it; the basic response was check your vmware is patched up-to-date and then make sure you have the right version of the vmware tools installed on the client. When that didn't work they had me change to full dhcp on the virtual machine and the host rather than fixed IP addresses.
I'd recommend NOT Attaching DB's as a file, but Attaching them to your local machine using SQL Server management studio express. You can use the following connectionstring:
connectionString="Data Source=(local)\sqlexpress;Initial Catalog=dbname;Integrated Security=SSPI;"
This will allow you to use the database from Visual Studio as well as in SQL Management studio....
edit the connectionstring is for SQL Express, you'd have to change it if you're running SQL Server 2008 (I believe change the Data Source to your machinename/ip)
Related
SQL Server Migration Assistant for access hangs after selecting MS Access database, it just shows 0% and nothing happens. Up to this point, everything worked fine, but after I configured encrypted connections on the server with a TLS certificate, for some reason starts to hang at 0%. At the same time, SQL Server Management Studio connects over an encrypted connection without issues and no other issues were[enter image description here noticed anymore.
Perhaps this information will help someone. I was able to solve my issue in the following way. I uninstall SSMA first, then uninstall Microsoft Access Database Engine 2016 Redistributable. Rebooted the machine, downloaded it again, and installed first SSMA then Microsoft Access Database Engine 2016 Redistributable.
BTW, what I reported earlier was on a Windows 10 machine. Just tried on a Windows Server box and did not run into any problem. That Windows Server box had the most recent defender patch, a slightly different version of course. Version 1.343.352.0
OK, I'm at wit's end here (not like I have many to start with, but that's a different story!). So (sigh)...
Somewhere along the line I get the distinct feeling that one or more of my database drivers have been corrupted or something, and I don't know how to fix the issue without a reinstall of Windows, which would be crazy. Here's the issue:
I am working on several web site projects, and I've been using Visual Studio 2015 Community and SQL Server 2014 Developer at home, with SQL Server Management Studio as the tool of choice for working with the databases, on a Windows 10 64-bit box. I've been developing code locally, and for the last couple weeks I haven't had need to connect to the (eventual) production SQL Server databases on my hosting provider's servers. The last time I connected (maybe two weeks ago) to them everything was fine and dandy, and I'd not had any issues before then with connectivity either.
Yesterday I needed to connect, and so I launched SSMS to sign in to the database. Instead of connecting, I got the error message about "network path not found", meaning SSMS couldn't find the database server. After several retries, I attempted to connect using Visual Studio's Server Explorer window, with the same resulting error message.
I tried to PING the server and was successful. I got a TELNET connection as well to port 1433, so the server name's correct, and I was able to resolve the name to the right IP. Still, I cannot make a DB connection to the remote databases.
I followed all of the suggestions for this basic issue, including turning off Windows Firewall, and I even turned off my cable modem's firewall, just to test whether it was something there. Still no joy.
As the ultimate step, I uninstalled SQL Server, SSMS, Visual Studio, and all of the accompanying bits, plus I deleted all of the folders for Visual Studio and SQL Server, to ensure everything I could find to delete was gone.
I opened a command prompt and ran cliconfg to make sure named that both TCP and named pipes were enabled, and they were.
I installed LinqPad after a reboot just to see if now I could connect, and still nothing.
Interestingly, I changed the connection string in the web.config file for my ASP.NET web site project on the local IIS box to point to the remote server's database, and it works.
So, now I have NO EARTHLY CLUE what's going on with my local machine that could be causing this. I've now spent almost two complete days on this. I haven't reinstalled SQL Server, SSMS or Visual Studio yet, but something's still not right that I can't get to the bottom of. Reinstalling Windows is not really an option if I can avoid it.
The question is, has anyone else run across something like this, and how can it be diagnosed or fixed?
To test connectivity try this
1. Create a blank text file in a folder
2. Rename the extensión to .udl to the text file (exmanple New textfile.udl)
3. Double click on New textfile.udl
The .udl file will show you input connection paremeters, fill them and click on Test connection. This can help you to test your drivers and SQL Server's
Interestingly, after two maddening days of pulling my hair out, I discovered that the .NET Data Provider For SQL Server was corrupted, evidently by a virus that made it past my AV software and was very stealthy, because the thing it affected was the SQL Server drivers.
The way I figured this out was to use the OLEDB data provider in Visual Studio to connect successfully to the remote database, which worked perfectly.
The fix to this was to run different AV software, which found and removed the virus, then I reinstalled SQL Server and Visual Studio, and it all works like a charm again!
This question may seems a bit silly. The thing is I'm programming a WPF using VS2010, which contains a .sdf database (connection is ADO.NET).
Someone told me that if I use a SQL Server Express database it can be run on any PC even it has no SQL Server installed. But after I tried executing in my virtual machine (win7 & win xp), seems it cannot even start up.
So, can someone brief me, what database do people normally use in developing WPF software? Is it true that my program using a SQL Server database file cannot execute on PC without SQL Server installed?
Much appreciate in advance!
Yes, it can!
SQL Server Compact (that produces and uses .sdf) is the only SQL Server edition that does not require a server to be installed. All its code and logic is contained in the handful of DLL's that you need to include with your application. Just ship your app with those DLL's and you should be fine.
Read more about SQL Server Compact and how to use and deploy it on MSDN.
SQL Server Express (and any of the other editions, like Web, Standard, Developer, Enterprise) on the other hand does require an installation of the SQL Server Express edition - either on that machine, or somewhere in the network where your app runs (remote connections from the network are disabled by default, but can be enabled).
I am trying to learn Asp.net MVC framework. I was looking at the video tutorial at the link below
http://www.asp.net/learn/mvc-videos/video-395.aspx
In this video the very first step is to add a new database to the example application.
I have visual studio installed on my development machine but the SqlServer Express is running on a different machine, so when I try and add a new database following the same steps as the video I get the following error
"Connections to SQL Server files(*.mdf) require SQL express 2005 to funciton properly. Please verify the installation of the component or download from the url"
I am assuming this is because Visual studio is looking for an instance of SQL express on my local machine and since it doesnt exist on the local machine,it errors out.
So how do i tell visual studio, to connect to a different machine and create the database there?
I am using Visual studio 2008 with .net 3.5 Sp1
Make sure that remote connections is enabled in your sql server express installation (http://www.linglom.com/2007/08/31/enable-remote-connection-to-sql-server-2005-express/). Then take a look at www.connectionstrings.com for the various ways to connect to the sql server as appropriate for your environment. Then configure the connectionstrings section in web.config and reference that configuration target when connecting to the db.
Alternatively you might try using LINQ to SQL which will streamline some of these tasks (still need to enable remote connections and get an appropriate connection string defined...LINQ to SQL wizard for the rest).
Open the Server Explorer and add a new Data connection. Same thing as adding a new .mdf. You can use it just the same.
create the database on the remote computer(edit: IIRC, you can also create it within visual studio when you add the connection)
ensure that it allow remote connections
add the connection in database explorer
I'm not sure what's happening in that video, but if you for instance are going to use linq2sql, visual studio will add the connectionstring to web.config when you drag the tables into the .dbml :)
What you'll have to do is attach the mdf to the database server you have running on your separate machine, and then open up your server explorer and navigate to that particular machine and select the database from there.
I am not going to see the video so I can't tell you what step to change. But it should be easy enough to write a connection string (or get it off the web) that connects to a database on the remote computer and not your PC.
I am so used to writing my own connection strings that I don't even know of any option in VS that automates this.
Instead of add a new database to a remote machine as you indicated on your local machine, you can try to create the database on the remote machine firstly, and then connect to that remote database within your visual studio.
I have two issues both related to (I believe) my SQL Server setup. I have installed SQL Server (the full thing) from MSDN downloads of the x64 version on my Vista 64 Home Premium box. After running into multiple issues I finally got it working. This is a new box so I ported over a database that I need to work on from another server. That also worked fine. My first issue however came when I tried to open a database in SQL Server Management Studio:
"Unable to find the requested .Net Framework Data Provider. It may not be installed. (System.Data)"
The box itself isn't new and definitely has .NET installed (version 3 I believe). I found that someone posted this as a bug but as the team (SQL Server team) could not reproduce it, they removed it. I've tried installing the recommended SP3 patch to no avail. It's only when I try to open a table for viewing the data (right-click and "Open Table"). I can even execute queries and retrieve results (from inside management studio). I'll follow pretty much any suggestion to try and get this working.
My second issue is that I cannot connect to the server. I thought I could just work around it (with queries), but I did not find that it added any ODBC connections on the box, just the drivers. Management Studio can access the DB just fine, but the machine itself doesn't appear to recognize that anything is running on it, at least on the default port (1433) and no, I do not have a named instance. When trying to manually add the server to the DSN or any datasources it cannot find the SQL server (under Control Panel > Administrative Tools > Data Sources (ODBC). Under SQL Server Management Studio it appears as a registered database server (I think this is because it connects on port 1434 from what I hear? not sure). This is my primary problem, and even if I can't open the tables (the first issue) I absolutely NEED to be able to set it up so that I can connect to it. The language source I am connecting from is ColdFusion which is set up as a stand-alone server (IIS not installed, not using it right now).
As for connecting to it, make sure all the services are running. SQL Server Agent in particular.
Also, check in the SQL Server 2005 Surface Area configuration for Services and Connections. Check under "Remote Connections" to see if "local and remote" connections are on. It might be set to "local only".
CF versions 6+ do not use the OS's ODBC connections. They use JDBC over IP to connect. You need to make sure you have allowed TCP/IP connections to the DB using the SQL Server Configuration Studio. Then, use the Data Sources page in the CF Administrator page (usually localhost:port/cfide/administrator, replacing "port" with the port you're using for the CF built-in server).
Why though, would it default to this
and why would this be an issue with my
own machine (local testing)?
SQL Server 2005 is meant to be more secure by default, so not all the protocols are opened up by default.
Sql Server Agent doesn't have anything
to do with remote connections, but I
seemed to recall there being an issue
with doing discovery on the network if
the Agent wasn't started
Maybe you're thinking of the SQL Browser with named instances.
Did you try this process?
http://oakleafblog.blogspot.com/2007/03/orcas-march-ctp-on-vista-database.html