Accessing wrong Database with multiple named instances

  • I have a 2005 Express named instance and have just installed a second, 2014 Express named instance both running on the same Windows Server 2008 Std SP2 Server

    I have made a copy of my live asp.net app (separate IIS folder/website) and amended the web.config files to point to the new 2014 named instance (I think/hope). I have restored my 2005 app databases to my 2014 instance

    I have set up a DNS alias to enable me to test the app copy with the new 2014 restored databases.

    The application runs successfully but the data I see is still from the current production 2005 database and not from the backup taken 12 hours ago!

    What am I doing wrong, what have I missed?

    Mike Webb

  • office 6161 - Friday, April 20, 2018 7:18 AM

    I have a 2005 Express named instance and have just installed a second, 2014 Express named instance both running on the same Windows Server 2008 Std SP2 Server

    I have made a copy of my live asp.net app (separate IIS folder/website) and amended the web.config files to point to the new 2014 named instance (I think/hope). I have restored my 2005 app databases to my 2014 instance

    I have set up a DNS alias to enable me to test the app copy with the new 2014 restored databases.

    The application runs successfully but the data I see is still from the current production 2005 database and not from the backup taken 12 hours ago!

    What am I doing wrong, what have I missed?

    Mike Webb

    Did you restart your site in IIS?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • PRINT @@SERVERNAME to confirm you're connected to the correct server.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • I have restarted my new app in IIS, yes.
    Running PRINT @@SERVERNAME in 2014 SSMS shows servername\SQLEXPRESS2014 - which is what I'd expect

  • office 6161 - Friday, April 20, 2018 7:33 AM

    I have restarted my new app in IIS, yes.
    Running PRINT @@SERVERNAME in 2014 SSMS shows servername\SQLEXPRESS2014 - which is what I'd expect

    I suspect that Eric meant from within the app!
    I'd be tempted to stop the 2005 instance completely while you are doing this troubleshooting. You might get a useful error message.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Is your DNS alias definitely pointing to the right instance?

  • DNS Alias is definitely pointing to new/copy ASP.NET app with amended web.config files Have tried it with a regular .htm file as a test

    But Web.Config-wise both old and new apps are looking at the same TCP Port number???

    I have now checked 2014 SQL Server config mgr and 2005 server looks at 1433 while 2014 server is blank ALSO TCP/IP protocol is disabled for new server

    I'm guessing I need to enable TCP/IP for 2014 (as it is for 2005) and set a different port for 2014 and use that in my new web.configs?

    I can also try the 2005 down tests later once users have gone home 🙂

    Mike

  • Aha that was it!

    I've pointed 2014 instance at Port 1436 and enabled the TCP/IP protocol, restarted the 2014 service and amended the new web.config files to use port 1436 and now ..
    App doesn't connect BUT that's because of an error in a server login permission and hence I think I'm now using the new databases

    So that's it unless anyone can tell me why I can't add User Mappings to an existing user - failing with user already exists error!

    Thanks all for the pointers

    Mike

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply