Microsoft SQL Server Error 5123

Discussion in 'ASP .Net' started by thersitz, Dec 29, 2006.

  1. thersitz

    thersitz Guest


    I have VStudio2005, SQLServer 2005 dev edition loaded on a windowsXP Pro

    I installed it ok. I just attempted to load the Personal Web Site Starter
    Kit (I downloaded off Microsoft's site) to use with VStudio 2005 --
    Installing it from the MS site failed without any error messages. When I
    used VSTudio to open, it loaded ok, but when I went to view the
    default.aspx page I got this error:

    An error has occurred while establishing a connection to the server. When
    connecting to SQL Server 2005, this failure may be caused by the fact that
    under the default settings SQL Server does not allow remote connections.
    (provider: SQL Network Interfaces, error: 26 - Error Locating
    Server/Instance Specified)

    So I tried to attach the database itself to my SQL 2005 instance and
    received this error:

    Attach database failed for Server 'XXXXXXX'. (Microsoft.SqlServer.Smo)

    Additional Information

    An exception occurred while executing a Transact-SQL statement or batch.

    CREATE FILE encountered operating system error 123(The filename, directory
    name or volume label syntax is incorrect.) while attempting to open or
    create the physical file 'C:\Documents and Settings\thisUser\My
    Documents\Visual Studio 2005\WebSites\WebSite1\App_Data\D:\Documents and
    Settings\JKING\My Documents\Visual Studio
    2005\WebSites\WebSite1\App_Data\Personal.MDF_log.LDF'. Could not open new
    database 'D:\Documents and Settings\JKING\My Documents\Visual Studio
    2005\WebSites\WebSite1\App_Data\Personal.MDF'. CREATE DATABASE is aborted.
    File activation failure. The physical file name D:\Documents and
    Settings\jking\My Documents\Visual Studio
    2005\WebSites\WebSite1\App_Data\Personal+log.LDF" may be incorrect.
    (Microsoft SQL Server, Error:5123)


    I don't have a clue who JKING is and my D: drive is my dvd drive.

    I googled error 5123 and found this page: -- and began the workaround section
    titled : Use SQL Server Enterprise Manager. I located the property sheet in
    my SQL 2005 Server Management Studio for the default location of the db and
    logs -- those fields were empty. I did not change as of yet -- because I
    would like a little clarity on what is going on before I proceed.

    Can anyone illuminate why I am getting these errors? Why attaching a db
    errors because of a JKING user that does not even exist? Why the property
    sheet on my SQL 2005 install has no default db and log entries?

    thersitz, Dec 29, 2006
    1. Advertisements

  2. thersitz

    sloan Guest

    When you restore a database, it defaults to the physical paths used by the
    original person.
    You have to override those......

    C:\Program Files\Microsoft SQL Server\MSSQL\Data is typical.

    C:\Program Files\Microsoft SQL Server\MSSQL\Data\Mydatabase.mdf and

    You have options here, because in a production environment, you want the mdf
    and ldf(log) on seperate disk drives.
    sloan, Dec 29, 2006
    1. Advertisements

  3. thersitz

    thersitz Guest

    Thanks Sloan. That at leasts verifies what I was able to cipher via google.
    This is a new install on a new machine, though, so there is no previous user
    or no restored db. Does that account for why the property sheet had no
    default directories for the db and log files? Shouldn't those directories
    have been inputted upon install?

    I've been doing a lot of googling and have found numerous folk come across
    these errors I cited below -- though no definite explanation on how to
    confront them or what they are. Apparently the Starter Kit I downloaded and
    installed is faulty -- even though I downloaded it from a Microsoft site --
    and maybe this jking is or was a Microsoft employee and the starter kit was
    developed on his desktop. Regardless, I dumped it.

    Before getting VStudio 2005 and SQLServer 2005 developer edition -- I toyed
    a bit with the Express versions Microsoft offers up. I had no problems
    installing some starter kits with those apps. Do you know if these Starter
    Kits by chance work only with the express editions of the apps?

    thanks again.
    thersitz, Dec 29, 2006
  4. thersitz

    Feb 17, 2014
    Likes Received:
    Bangalore , India

    While attaching database your file path is wrong. Please use Gui to avoid that.
    , Feb 17, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.