Just got a new machine and moved everything from my old pc to the new using PCMover.
I got VS 2019 up and working (I thought). Down loaded VS 2022 Community today and just tried testing creating a simple database app. But I could not get the Server Explored to connect to a SQL Server database file (mdf). I keep getting an error. So I tried my VB 2019 and the same error. I checked the SQL Server objecct explored and it showed a LocalDb SQL Server was there. Here is the error I keep getting. These are VB.Net framework projects.
Having never used or looked into what PCMover does, I'm going to assume that it "attempts" to transfer installed programs from one computer to another without needing to actually go through the installation process on the new computer.
If that is the case, I imagine that it would work for almost all "simple" program installations, but would not always work for "complex" installed programs, which I would categorize SQL server as.
You'll probably need to "re"-install SQL on the new PC, but again, this is just my opinion with zero knowledge of what PCMover is or the specifics of what it does.
Edit to add: It could also be something as simple as some config file or registry setting somewhere that SQL uses still has information about the "old" PC Name or old IP address, and simply updating those settings on the new PC would solve the problem. No idea what or where those might be, just brainstorming.
This version of SQL Server is not the full version, it's what comes with VS/Windows. I've never installed SQL Server. As I mentioned The Server Explore and SQL Server object explored show a localdb SQL Server.
I'd be glad to reinstall what ever is necessary. I guess I'd have to reinstall VS 2022.
BTW - I did go into the VS Installer and check if I had installed SQL Server. It shower they were selected under the Data Storage component.
Well I'm stumped. Finally found the SQL Server Cconfiguratin Manager (wasn't where doc's said, I tried both the system32 and syswow64 versions), started it and could see that SQLExpress was stopped, tried to start but got this error. see below. Tried to find the event logs but couldn't find them. When Googled the examples said to right click Server log but I don't have that.
Last edited by wes4dbt; Mar 14th, 2023 at 04:02 AM.
Have you installed the SQL UI ?
You say server configuration manager but no mention of Server Management Studio (SSMS).
Install it and the logs are on Management -- SQL Server Logs
Well I'm stumped. Finally found the SQL Server Cconfiguratin Manager (wasn't where doc's said, I tried both the system32 and syswow64 versions), started it and could see that SQLExpress was stopped, tried to start but got this error. see below. Tried to find the event logs but couldn't find them. When Googled the examples said to right click Server log but I don't have that.
I would imagine that things like custom event logs that an application uses are things that "PCMover" don't handle properly.
Have you contacted PCMover support to see if migrating a Visual Studio+SQL installation is supposed to just work or is known to fail?
Had you tried any database work from VS2019 prior to installing VS2022?
Sounds like you might have a mess on your hands. My only suggestion at this point would be the drastic:
Remove 2022, remove 2019, make sure SQL is removed after all of that (which it may not be, if it isn't properly "installed" to begin with), and then install 2019 (which should reinstall SQL) and then see if it is working.
Not saying there aren't things to try before going down that road, but I have none to suggest at the moment.
I've never used the 'included' SQL Server. That one has always felt a little...ephemeral, to me. I'd be inclined to go with SQL Server Express (the free version). Of course, that doesn't solve your problem exactly, but it might bypass it.
There are a bunch of SQL Servers installed on this machine. I justed looked in the Installed Apps and I got various SQL Server apps ranging from 2005 to 2019. I'm affraid to uninstall all of them, worried that maybe some of my other software might be using one of them.
Though in the VS IDE only one version shows up. SQL Server 15.0.453 - WESHP!\ADMIN
Not sure what to do, maybe I'll just go back to Access. lol
Last edited by wes4dbt; Mar 14th, 2023 at 12:28 PM.
There are a bunch of SQL Servers installed on this machine. I justed looked in the Installed Apps and I got various SQL Server apps ranging from 2005 to 2019. I'm affraid to uninstall all of them, worried that maybe some of my other software might be using one of them.
Though in the VS IDE only one version shows up. SQL Server 15.0.453 - WESHP!\ADMIN
Not sure what to do, maybe I'll just go back to Access. lol
Is WESHP! the name of your new PC or your old PC (or both?)?
I don't blame you for not wanting to go down the road of uninstall-palooza. Your situation is exactly why I have dedicated VM's for different VS versions.
I downloaded the newest SQL Server Express. I'm able to run my VB 2019 app after I changed the connection string to use SQLExpress. Still can get the MSSQLLocalDB to work. And when I connect to the database using the VS Server Explorer, i can't run my app. And when I try to use the Server Eplorer to work with the db tables I get "Failed to retrieve server version" error.
So still got bugs to work out. Might help if I knew what I was doing.
I downloaded the newest SQL Server Express. I'm able to run my VB 2019 app after I changed the connection string to use SQLExpress. Still can get the MSSQLLocalDB to work. And when I connect to the database using the VS Server Explorer, i can't run my app. And when I try to use the Server Eplorer to work with the db tables I get "Failed to retrieve server version" error.
So still got bugs to work out. Might help if I knew what I was doing.
Yeah, I have to tap out of this one. Way too much unknown conditions happening for me to feel remotely confident that any suggestion I give would be helpful and not detrimental.
Well, VB 2022 is working good. I don't have the problems with the Server Explorer that I do in VB 2019. But still can't use LoccalDB, I have to use SQLExpress.
EDIT - Just an update. When I open the SSMS login screen, it gives me three choices. Two are Express versions and the other is WESHP1, which is my machine name so that seems strange. Plus WESHP1 gives me an error when I try to connect, the same error at VS Server Explorer gives me. From what I've read it seem like I have a invalid server name. So I went to the Command prompt and ran Services.msc, I scrolled down and found three versions of SQL Server. Two Express and one that was "MSSQLSERVER". It wasn't running so I clicked Start but it gave me an error 17113. Told me to look at the Event Log, but I still haven't found them. It seems most of my search results are for a different SSMS.
Also, I uninstalled and reinstalled SQL Server 2019 LocalDb.
Last edited by wes4dbt; Mar 14th, 2023 at 05:21 PM.
Well I think I got the localdb up and running but now theres a problem because SQL Express is version 957 and localDb is 904. Which doesn't make sense to me but I guess that shows how little I know about SQL Server. Anyway, I guess I really don't need to use LocalDb. I'm not doing anything but playing around a little, plus there's always SQLite. lol I'm a little overloaded on this thing right now, so I'll give it a rest.
I'm not sure that anybody knows all that much about SQL Server, including Microsoft.
Not all that long ago, I felt that SQL Server was the most miserable thing that Microsoft made, as far as installation was concerned. The installation step was terribly fiddly and opaque. There were loads of steps, options, and so forth, most of which were not all that well documented. Heck, when you tried to install, you were presented with a menu, and had to know which of the options would lead to installation, since it wasn't obvious. Getting SSMS installed at a later date was also a chore.
Things improved greatly about half a decade back. Now, installing SQL Server still has lots of choices that aren't always very clear, but the documentation is better, the steps are more clearly laid out, and SSMS is super easy to install. Still, there are so many quirks and oddities with SQL Server that it's still the most difficult installation for any Microsoft product. For example, I installed SQL Server Express using some default settings, then wanted to create a named instance...and screwed that up, so I wanted to change the name of the installed instance, or the default instance. That is technically possible, but sufficiently complicated that I didn't feel it was worth the trouble...and getting rid of the messed up, named instance, was even worse, so that's still there. It's unusable, but it's still there.
MS has made the installation of SQL Server better, over the years, but it's still largely an arcane black box.
Yeah, I now have three named instances of SQL Express on my machine. lol
The silly thing is, I don't really need to use LocalDb. But I have a tendency to get sucked into solving an issue so deeply that I can't let it go. Whether it's important or not.
Finding the correct answers to your questions on this subject is very difficult. It's hard to filter which answers apply to your situation. SQL Server full version, SQL Server free version, Windows Professional, Windows Home, Express vs localDb, which VS version, which method to install, which features .....
I would suggest (since you are experimenting), uninstall every single SQL version you have in there and install some Microsoft SQL Server Express version.
And you just need that. If you don't run heavy business DB's (like at my work), the Express version has 10GB database limit that is more than adequate.
Also I would not jump into the latest version but that is my opinion. The newer is slow even on my new PC, so a 2016-17 would be fine. Also from what I can see later you can upgrade and the past version databases are supported.
At least on 2014 that I use , I can view all the past databases (our oldest is 2005, haven't tried older, no point).
Actually I have it all working now. i was just complaining about how stupid I get about unimportant things. Also, about spending a day and a half solving this issue and still not totally understanding what's going on.
I haven't marked this thread resolved just in case someone want to share there experience or knowledge on the subject.