Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Filepath problem ? related to install issue

Author  Topic 

Liz Lyons
Starting Member

22 Posts

Posted - 2009-10-13 : 11:15:17
I uninstalled SQL Server Express using the Control Panel Uninstall feature and installed SQL Server Express Advanced Edition.

The main SQL Server Express files uninstalled ok, but I was left with two auxiliary files that wouldn't uninstall because the files they depended on no longer existed - I intended to move these and delete with regedit later.

The SQL Server Express Advanced installed without problem.

However............I now have a CREATE DATABASE problem and wonder whether it relates to the above.
When I used SSMSE to create databases it works fine.
When I use Query Editor and simply type CREATE DATABASE database_name it works fine.
When I used Query Editor and try to specify the FILENAME at the identical path to that used by SSMSE (C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\database_name.mdf) SSE returns an error message saying the pathway cannot be found.

Looking in Windows Explorer, the MSSQL.10.MSSQLEXPRESS folder is dated 7 October, whereas the all the other files and folders are dated 9 October.

Is there any diagnostic I can run to check whether this is the cause of SSE not finding the folder when prompted to do so by from the Query Editor window????

(The Parse tool checks the CREATE statement synthax as correct. The error message is the 123 filepath variety.)

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-13 : 11:35:31
You should try to use double quotes around this because there are dots and blanks in it.

"C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\database_name.mdf"


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Liz Lyons
Starting Member

22 Posts

Posted - 2009-10-14 : 11:14:01
thanks for the thought webfred, but i did - twas simply copying the pathway here that i left them out.
initially i wrote all the code properly in the db window - didn't work.
then i ran a test by creating the db through the gui and pasting the code for into the query window, then change the dbname througout both mdf and ldf sections - leave all the other code as written by the gui.
the code passed the parser but failed to find the pathway on execute.
the pathway code was the exact same as written originally by the gui default and executed by SSE.

if you look at the pathway above the Microsoft SQL Server folder and the MSSQL and DATA folders are all dated to my second download of SSE on 9 Oct. Only the intermediate MSSQL10.SQLEXPRESS folder is dated to the first download on 7 Oct.

I need to understand.............phew..............if this will pose an untractable problem further down the line - how to be sure this is the problem (transaction log or someone who understands the sql server engine processes), and if there are any measures short of uninstall, learning how to use regedit to clear out all sql files from both installations and reinstall.
Go to Top of Page

Liz Lyons
Starting Member

22 Posts

Posted - 2009-10-14 : 11:25:14
On the other hand, perhaps I should apologise...

I just tested again, using find and replace to change the database name on the code imported from the gui, and it executed ok....

a good night's sleep solves many problems.

*liz slinks off to the "newbies" forum!!!
Go to Top of Page

Liz Lyons
Starting Member

22 Posts

Posted - 2009-10-14 : 11:45:13
Aha!
When I wrote the pathway in query editor, I split it into two lines using a carriage return so as to check it in my small laptop window.

It seems that you can write statements on more than one line, but not pathways, because when I return the pathway to all on one line it executes ok.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-14 : 11:46:47
No reason to slink!
AND here is no "newbiesForum" existent and that is ok.

Quis custodiet ipsos custodes?
Who can decide if someone should went to the "newbiesForum"?

Have a nice day with your database


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-14 : 11:49:06
quote:
Originally posted by Liz Lyons

Aha!
When I wrote the pathway in query editor, I split it into two lines using a carriage return so as to check it in my small laptop window.

It seems that you can write statements on more than one line, but not pathways, because when I return the pathway to all on one line it executes ok.


Yes because a line break is a character too so it is the same as if you add a character like a,b,c or other to the path...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -