Showing posts with label attempting. Show all posts
Showing posts with label attempting. Show all posts

Sunday, March 25, 2012

Can't Attach Database using SQL Server Management Studio Express

I am having a problem Attaching, well actually not being able to see a database when attempting to attach it. I suspect this is more of a security issue rather than a problem with Management Studio, but I can't figure out what is happening.

If I copy a database to Documents and Settings\All Users\... and attempt to attach I can see the file in the selection tree. This also is the case if I copy it to Documents and Settings\Default User\... But if I copy it to Documents and Settings\ADynarski\... which is the account I normally log into, when I expand the folder in the selection tree, nothing is visible. And the same thing occurs if I copy the file to Documents and Settings\Guest\...

I've looked at the security settings and everything appears to be normal. This is on a box with XP Home and SQL Server Express. Can anyone tell me what I'm missing?

Thanks,

Al

What is the account your SQL Server service running under?

If it's domain account, make sure the account has access to the folder you are trying attach database from.

|||Thanks for your input. It is a domain account and the account does have access to the folder. What is really strange is that I used Visual Web Developer Express to create the database in C:\Documents and Settings\Al Dynarski\My Documents\... and it functions properly. But logged into the same account, Server Management Studio sees nothing in the folder C:\Documents and Settings\Al Dynarski or below. I can copy the database out to another folder and then use Server Manangement Studio to work on it. Very strange. I'll continue to look around. Thanks again.|||

Why are you copying the database files to a user folder rather than a common system folder ? If you want to attach the database files not via the userinstance feature, the SQL Server Service need to have access to the specified file for the database, so make sure that the service the SQL Server Account is running on, has access to this file destination.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thanks for your suggestion. I don't want to have to copy it; I only tried that to be sure it was in fact a valid database. And I agree with your assessment about SQL service having access rights to the folder containing the database. My problem appears to be figuring out why it doesn't Thanks again.|||

I got it working. I switched SQL Server Express to Local System Login and I now can see the database files and attach them. Since this server instance is just for my local testing, this configuration should work for me. Thanks to all for your suggestions.

Al

|||

Hi Al,

I am having the same problem.... how do you switch SQL Server Express to Local System Login, and in doing so what else does this affect?

Thanks,

Claude.

|||

Go to the SCM (Service Control Manager) of Windows, sleect the service you want to change the logon settings for, right click properties, go to the LogOn Tab and change the account to "Local System". Keep in min d that the service needs a restart after changing the settings.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi Claude,

The solution Jens indicated is exactly what I did.

Good Luck!

Al

Sunday, March 11, 2012

Cannot use file for clustered server

I have a clustered server with a clustered instance of SQL Server 2000
running on it. I'm attempting to restore several databases to the clustered
server from our production, non-clustered database server. I also want to do
a move of log files at the same time. On the production server, the database
and log files are on the same raid array. On the clustered server, I've
created two raid arrays, drive H: for the databases which is in cluster group
0 and drive g: for the logs which is in cluster group 1. The database server
on the cluster is in group 0, by the way. I'm doing a restore using an sql
file that works restoring databases and logs to a backup server on different
drives so I'm reasonably sure that the restore syntax is correct. When I
attempt to do a restore of the log files on the cluster server, I receive the
following error.
Msg 5184, Level 16, State 2, Line 1
Cannot use file g:\logs\ims.ldf for clustered server. Only formatted files
on which the cluster resource of the server has a dependency can be used.
What does that mean? Does that mean that I have to put the log array in the
same group as the clustered instance of sql server? If that's the case, how
do I do that?
TIA
Ernie
Move the G: Drive into the SQL Group (group 0 from you post).
Stop the SQL clustered group.
Double click SQL Server resource and add G: Drive as a dependency.
Bring the SQL Group back online.
Restore away
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://www.msmvps.com/clustering - Blog
"ebferro" <ebferro@.discussions.microsoft.com> wrote in message
news:24628F06-9C5C-4B4F-B7C6-50E82D24CF8F@.microsoft.com...
>I have a clustered server with a clustered instance of SQL Server 2000
> running on it. I'm attempting to restore several databases to the
> clustered
> server from our production, non-clustered database server. I also want to
> do
> a move of log files at the same time. On the production server, the
> database
> and log files are on the same raid array. On the clustered server, I've
> created two raid arrays, drive H: for the databases which is in cluster
> group
> 0 and drive g: for the logs which is in cluster group 1. The database
> server
> on the cluster is in group 0, by the way. I'm doing a restore using an
> sql
> file that works restoring databases and logs to a backup server on
> different
> drives so I'm reasonably sure that the restore syntax is correct. When I
> attempt to do a restore of the log files on the cluster server, I receive
> the
> following error.
> Msg 5184, Level 16, State 2, Line 1
> Cannot use file g:\logs\ims.ldf for clustered server. Only formatted
> files
> on which the cluster resource of the server has a dependency can be used.
> What does that mean? Does that mean that I have to put the log array in
> the
> same group as the clustered instance of sql server? If that's the case,
> how
> do I do that?
> TIA
> Ernie
|||Rod:
Many thanks for the help. My restore appears to be running nicely right now
so I think that fixed the problem.
"Rodney R. Fournier [MVP]" wrote:

> Move the G: Drive into the SQL Group (group 0 from you post).
> Stop the SQL clustered group.
> Double click SQL Server resource and add G: Drive as a dependency.
> Bring the SQL Group back online.
> Restore away
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> http://www.msmvps.com/clustering - Blog
>
> "ebferro" <ebferro@.discussions.microsoft.com> wrote in message
> news:24628F06-9C5C-4B4F-B7C6-50E82D24CF8F@.microsoft.com...
>
>