Showing posts with label sqlexpress. Show all posts
Showing posts with label sqlexpress. Show all posts

Tuesday, March 20, 2012

Can not attach SQL Server 2005 Express database

I got the folllowin error while trying to attach database. The directory is there...

TITLE: Locate Database Files - H001335\SQLEXPRESS

C:\Documents and Settings\Administrator.H001335\My Documents\Visual Studio 2005\WebSites\Import\App_Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


BUTTONS:

OK

Moving thread to a more appropriate forum.|||where is it?|||please help, no idea why I can't attach this database|||Make sure you do not have VS open (as server manager creates a connection to sql server), and try stopping and restarting the sqlserver agen service. Then try to attach the database. Is the nme the same as the db name? You may need to copy over the log file aswell (daname_log.ldf).|||

Are you using "User Instance=True" in your connection string?

If so, you need to make sure that the user who is running the task has appropriate permissions to access files in that directory (by the looks ASPNET might be the user).

If you're not, then I try running the the sql server service as "Local System" instead of the default "Network Service", or give "Network Service" appropriate permissions for that location.

|||Yes you are right, seems this was related to the user ASP.NEt not having enough rights in the directory...sql

Can not attach SQL Server 2005 Express database

I got the folllowin error while trying to attach database. The directory is there...

TITLE: Locate Database Files - H001335\SQLEXPRESS

C:\Documents and Settings\Administrator.H001335\My Documents\Visual Studio 2005\WebSites\Import\App_Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


BUTTONS:

OK

Moving thread to a more appropriate forum.|||where is it?|||please help, no idea why I can't attach this database|||Make sure you do not have VS open (as server manager creates a connection to sql server), and try stopping and restarting the sqlserver agen service. Then try to attach the database. Is the nme the same as the db name? You may need to copy over the log file aswell (daname_log.ldf).|||

Are you using "User Instance=True" in your connection string?

If so, you need to make sure that the user who is running the task has appropriate permissions to access files in that directory (by the looks ASPNET might be the user).

If you're not, then I try running the the sql server service as "Local System" instead of the default "Network Service", or give "Network Service" appropriate permissions for that location.

|||Yes you are right, seems this was related to the user ASP.NEt not having enough rights in the directory...

Can not attach msde2000 db into sql express

I have side by side msde2000 and sqlexpress installed. I need to move a db that has been detached from msde2000 and where it works perfectly fine into sql express. After I select the .mdf file to attach I get this error:

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'LTBAHIA\SQLEXPRESS'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

SQL Server detected a logical consistency-based I/O error: torn page (expected signature: 0x55555555; actual signature: 0x55555551). It occurred during a read of page (1:97) in database ID 6 at offset 0x000000000c2000 in file 'C:\Memo2005\Diary\MEMO\bin\MEMOsql.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Converting database 'MEMOsql' from version 539 to the current version 611.
Database 'MEMOsql' running the upgrade step from version 539 to version 551. (Microsoft SQL Server, Error: 824)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476


BUTTONS:

OK

Thanks for any help,

Luis

The error is indicating a corruption of your databasefile. Could you run the suggested DBCC CHECKDB?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||The database is either not consistent or was not shutdown down / dettached the right way. Attach the database to SQL Server 2000 again, run CHECKDB, dettach is with either a command or the GUI and run attach it on the SQL Server Express, once beginning the attach process, the server will do an automatic conversion process which will need the database is a concistent state. if this does not work, try to make a backup on the SQL 2k database and restore it on the 2k5 (Express) server.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I have been trying to run CHECKDB but since it requires to have sql server in single user mode I have not been able to do it. If I start from a comand console with sqlservr -m and then I go to

Query Analyzer and try to connect to the server it refuses because it is in single user mode. It seems like a catch 22. Is there a way to start sql server in single user mode from within Sql Analyzer or Enterprise? Or better, how can I do the CHECKDB without running in these problems.

Thanks,

Luis

|||

Unless you do not use any REPAIR commands you do not have to have the db in single user mode only. If you want to set the USER DATABASE in single user mode, you do not have to start the server in single user mode. Just use the command

EXEC sp_dboption 'DATABASENAME', 'single user', 'TRUE'

-Or (for sql 2k5)

ALTER DATABASE DbName SET SINGLE_USER

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Thank you very much Jens. After a few tries it worked and now I have the DB converted.

Luis

Wednesday, March 7, 2012

Can I use SQL Express database inside full blown SQL 2005?

Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application, can I just deploy this to production (where SQL 2005) is running and it'll still work?
Probably. You may have to deal with some user mapping and permissions issue because your production system will have different logins than your SQL Express instance.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application, can I just deploy this to production (where SQL 2005) is running and it'll still work?
|||It does not work saying "The user instance login flag is not supported on this version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message news:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and permissions issue because your production system will have different logins than your SQL Express instance.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application, can I just deploy this to production (where SQL 2005) is running and it'll still work?
|||You will have to take the User Instance flag out of your connections strings, attach the database to the production system and then establish users and permissions in the production system.
There's some discussion of converting to User Instance to normal connections here:
http://msdn.microsoft.com/sql/expres...xpuserinst.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:ucH0y7SHGHA.3916@.TK2MSFTNGP10.phx.gbl...
It does not work saying "The user instance login flag is not supported on this version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message news:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and permissions issue because your production system will have different logins than your SQL Express instance.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application, can I just deploy this to production (where SQL 2005) is running and it'll still work?

Can I use SQL Express database inside full blown SQL 2005?

Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application,
can I just deploy this to production (where SQL 2005) is running and it'll s
till work?Probably. You may have to deal with some user mapping and permissions issue
because your production system will have different logins than your SQL Exp
ress instance.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP1
0.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application,
can I just deploy this to production (where SQL 2005) is running and it'll s
till work?|||It does not work saying "The user instance login flag is not supported on th
is version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message new
s:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and permissions issue
because your production system will have different logins than your SQL Exp
ress instance.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP1
0.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application,
can I just deploy this to production (where SQL 2005) is running and it'll s
till work?|||You will have to take the User Instance flag out of your connections strings
, attach the database to the production system and then establish users and
permissions in the production system.
There's some discussion of converting to User Instance to normal connections
here:
http://msdn.microsoft.com/sql/expre...expuserinst.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:ucH0y7SHGHA.3916@.TK2MSFTNGP1
0.phx.gbl...
It does not work saying "The user instance login flag is not supported on th
is version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message new
s:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and permissions issue
because your production system will have different logins than your SQL Exp
ress instance.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message news:uLSg2nQHGHA.2948@.TK2MSFTNGP1
0.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET application,
can I just deploy this to production (where SQL 2005) is running and it'll s
till work?