Showing posts with label attached. Show all posts
Showing posts with label attached. Show all posts

Sunday, February 19, 2012

Attaching, Restoreing, Backup DB in MSDE , How?

Hi all;

I created a DB in MS SQL Server 2000.. (has Tables, SPs, Views..etc.) and I want to attached to a customer that has ONLY MSDE?

How?

Also, how can my customer make Backup & Restore from his MSDE? (BTW: can I do that in code (VB.NET/ASP.NET)??

Thanks in advanced!UP :(

Plz, help me!!

Thursday, February 16, 2012

attaching system database

Hi,
I would like to ask if system database from other server can be
attached to other server. So basically, the process is, the existing
system database(including user databases) will be replaced by other
set of database(system and user databases) the new set of the
databases are just located in a separate drive in a cluster
environment. Will this procedure can apply?
http://support.microsoft.com/kb/224071
I am not sure if this will work. Just need to verify.
Thanks.This will work. In some cases, you can simply copy the MDF/LDF files on the
same location where the system database files exist while the SQL Server
service is stopped. Once it starts, it should see those files. I used this
approach when I needed to set the collation settings for my tempdb. Instead
of rebuilding the master database, I just copied the model database files
from one server which has the same collation settings I need for my tempdb
and it worked
"Bry" <fqies_bry@.yahoo.com> wrote in message
news:1186108853.215054.30080@.j4g2000prf.googlegroups.com...
> Hi,
> I would like to ask if system database from other server can be
> attached to other server. So basically, the process is, the existing
> system database(including user databases) will be replaced by other
> set of database(system and user databases) the new set of the
> databases are just located in a separate drive in a cluster
> environment. Will this procedure can apply?
> http://support.microsoft.com/kb/224071
> I am not sure if this will work. Just need to verify.
> Thanks.
>|||What if I have to use the other drive where they put the database
files? like I will modify the SQL(as KB said) to modify the drive of
the system database. will there be implications/problems?|||Hi,
Make sure that your destination SQL Server instance is patched up to the
same build as the instance from which you are taking the system databases.
Jonathan
Bry wrote:
> Hi,
> I would like to ask if system database from other server can be
> attached to other server. So basically, the process is, the existing
> system database(including user databases) will be replaced by other
> set of database(system and user databases) the new set of the
> databases are just located in a separate drive in a cluster
> environment. Will this procedure can apply?
> http://support.microsoft.com/kb/224071
> I am not sure if this will work. Just need to verify.
> Thanks.
>|||I was about to say this...this is very important as your backups will not
work
"Jonathan Psaila-Depasquale" <nospam@.nospamplease.com> wrote in message
news:OLlqTka1HHA.3916@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Make sure that your destination SQL Server instance is patched up to the
> same build as the instance from which you are taking the system databases.
> Jonathan
>
> Bry wrote:
>> Hi,
>> I would like to ask if system database from other server can be
>> attached to other server. So basically, the process is, the existing
>> system database(including user databases) will be replaced by other
>> set of database(system and user databases) the new set of the
>> databases are just located in a separate drive in a cluster
>> environment. Will this procedure can apply?
>> http://support.microsoft.com/kb/224071
>> I am not sure if this will work. Just need to verify.
>> Thanks.

Sunday, February 12, 2012

Attaching a database with MSDE2000A

Hello,
I want to get an already build database attached to the MSDE2000 SQL Server. I do not have the SQL Server Enterprise Explorer. Any help appreciated !
Hartmut
You can use OSQL.EXE and execute sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"hMelchin" <hMelchin@.discussions.microsoft.com> wrote in message
news:A78B08E2-4072-4E4A-94B4-9951472D486E@.microsoft.com...
> Hello,
> I want to get an already build database attached to the MSDE2000 SQL Server. I do not have the SQL
Server Enterprise Explorer. Any help appreciated !
> Hartmut

Attaching a database with MSDE2000A

Hello,
I want to get an already build database attached to the MSDE2000 SQL Server.
I do not have the SQL Server Enterprise Explorer. Any help appreciated !
HartmutYou can use OSQL.EXE and execute sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"hMelchin" <hMelchin@.discussions.microsoft.com> wrote in message
news:A78B08E2-4072-4E4A-94B4-9951472D486E@.microsoft.com...
> Hello,
> I want to get an already build database attached to the MSDE2000 SQL Server. I do
not have the SQL
Server Enterprise Explorer. Any help appreciated !
> Hartmut

attaching a database in SQL 2005 Express

I am trying to following the instructions in the online books to attached the
sample northwnd.mdf database to an instance of sql 2005 express. Here are the
instructions from online books:
USE [master]
GO
CREATE DATABASE [database_name] ON
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\<database name>.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\<database name>.ldf' )
FOR ATTACH ;
GO
Where database_name is the name of the database you want to attach, FileName
is the path and filename of the database file and the log file, and FOR
ATTACH specifies that the database is created by attaching an existing set of
operating system files.
Apparently I am not substituting the right values in place of
"database_name" and/or "FileName" because I keep getting an error. See below
for what I am typing in and the error that I receive. What am I doing wrong?
1> CREATE DATABASE [northwnd]
2> ( northwnd.mdf = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
3> ( northwnd.ldf = N'C:\sql server 2000 sample databases\northwnd.ldf' )
4> FOR ATTACH ;
5> go
Msg 102, Level 15, State 1, Server CANDACE\SQLEXPRESS, Line 2
Incorrect syntax near 'northwnd'.
1>
The first thing I noticed was that the ON was missing. The second
thing was that the keyword FILENAME had been replaced with the logical
file name.
Roy
On Fri, 1 Dec 2006 06:24:00 -0800, Candace
<Candace@.discussions.microsoft.com> wrote:

>I am trying to following the instructions in the online books to attached the
>sample northwnd.mdf database to an instance of sql 2005 express. Here are the
>instructions from online books:
>USE [master]
>GO
>CREATE DATABASE [database_name] ON
>( FILENAME = N'C:\Program Files\Microsoft SQL
>Server\MSSQL.1\MSSQL\Data\<database name>.mdf' ),
>( FILENAME = N'C:\Program Files\Microsoft SQL
>Server\MSSQL.1\MSSQL\Data\<database name>.ldf' )
> FOR ATTACH ;
>GO
>
>Where database_name is the name of the database you want to attach, FileName
>is the path and filename of the database file and the log file, and FOR
>ATTACH specifies that the database is created by attaching an existing set of
>operating system files.
>
>Apparently I am not substituting the right values in place of
>"database_name" and/or "FileName" because I keep getting an error. See below
>for what I am typing in and the error that I receive. What am I doing wrong?
>1> CREATE DATABASE [northwnd]
>2> ( northwnd.mdf = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
>3> ( northwnd.ldf = N'C:\sql server 2000 sample databases\northwnd.ldf' )
>4> FOR ATTACH ;
>5> go
>Msg 102, Level 15, State 1, Server CANDACE\SQLEXPRESS, Line 2
>Incorrect syntax near 'northwnd'.
>1>
|||For future reference, the documentation conventions for SQL Server say that
anything is a command syntax in all capital letters is a keyword that must
be included exactly as specified in the syntax. in the example, CREATE,
DATABASE, ON, FILENAME, FOR, and ATTACH are all keywords which must be
entered as specified.
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
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23sZw2uVFHHA.1080@.TK2MSFTNGP05.phx.gbl...
> One thing I see is that you are missing the word ON after the database
> name. Also, you should specify the word FILENAME, not substitute it toe
> something else. Try below:
>
> CREATE DATABASE [northwnd] ON
> ( FILENAME = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
> ( FILENAME = N'C:\sql server 2000 sample databases\northwnd.ldf' )
> FOR ATTACH ;
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Candace" <Candace@.discussions.microsoft.com> wrote in message
> news:C65CAD32-150B-4534-8E4F-A4A6B8267A00@.microsoft.com...
>

attaching a database in SQL 2005 Express

I am trying to following the instructions in the online books to attached th
e
sample northwnd.mdf database to an instance of sql 2005 express. Here are th
e
instructions from online books:
USE [master]
GO
CREATE DATABASE [database_name] ON
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\<database name>.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\<database name>.ldf' )
FOR ATTACH ;
GO
Where database_name is the name of the database you want to attach, FileName
is the path and filename of the database file and the log file, and FOR
ATTACH specifies that the database is created by attaching an existing set o
f
operating system files.
Apparently I am not substituting the right values in place of
"database_name" and/or "FileName" because I keep getting an error. See below
for what I am typing in and the error that I receive. What am I doing wrong?
1> CREATE DATABASE [northwnd]
2> ( northwnd.mdf = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
3> ( northwnd.ldf = N'C:\sql server 2000 sample databases\northwnd.ldf' )
4> FOR ATTACH ;
5> go
Msg 102, Level 15, State 1, Server CANDACE\SQLEXPRESS, Line 2
Incorrect syntax near 'northwnd'.
1>The first thing I noticed was that the ON was missing. The second
thing was that the keyword FILENAME had been replaced with the logical
file name.
Roy
On Fri, 1 Dec 2006 06:24:00 -0800, Candace
<Candace@.discussions.microsoft.com> wrote:

>I am trying to following the instructions in the online books to attached t
he
>sample northwnd.mdf database to an instance of sql 2005 express. Here are t
he
>instructions from online books:
>USE [master]
>GO
>CREATE DATABASE [database_name] ON
>( FILENAME = N'C:\Program Files\Microsoft SQL
>Server\MSSQL.1\MSSQL\Data\<database name>.mdf' ),
>( FILENAME = N'C:\Program Files\Microsoft SQL
>Server\MSSQL.1\MSSQL\Data\<database name>.ldf' )
> FOR ATTACH ;
>GO
>
>Where database_name is the name of the database you want to attach, FileNam
e
>is the path and filename of the database file and the log file, and FOR
>ATTACH specifies that the database is created by attaching an existing set
of
>operating system files.
>
>Apparently I am not substituting the right values in place of
>"database_name" and/or "FileName" because I keep getting an error. See belo
w
>for what I am typing in and the error that I receive. What am I doing wrong
?
>1> CREATE DATABASE [northwnd]
>2> ( northwnd.mdf = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
>3> ( northwnd.ldf = N'C:\sql server 2000 sample databases\northwnd.ldf' )
>4> FOR ATTACH ;
>5> go
>Msg 102, Level 15, State 1, Server CANDACE\SQLEXPRESS, Line 2
>Incorrect syntax near 'northwnd'.
>1>|||One thing I see is that you are missing the word ON after the database name.
Also, you should
specify the word FILENAME, not substitute it toe something else. Try below:
CREATE DATABASE [northwnd] ON
( FILENAME = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
( FILENAME = N'C:\sql server 2000 sample databases\northwnd.ldf' )
FOR ATTACH ;
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Candace" <Candace@.discussions.microsoft.com> wrote in message
news:C65CAD32-150B-4534-8E4F-A4A6B8267A00@.microsoft.com...
>I am trying to following the instructions in the online books to attached t
he
> sample northwnd.mdf database to an instance of sql 2005 express. Here are
the
> instructions from online books:
> USE [master]
> GO
> CREATE DATABASE [database_name] ON
> ( FILENAME = N'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\<database name>.mdf' ),
> ( FILENAME = N'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\<database name>.ldf' )
> FOR ATTACH ;
> GO
>
> Where database_name is the name of the database you want to attach, FileNa
me
> is the path and filename of the database file and the log file, and FOR
> ATTACH specifies that the database is created by attaching an existing set
of
> operating system files.
>
> Apparently I am not substituting the right values in place of
> "database_name" and/or "FileName" because I keep getting an error. See bel
ow
> for what I am typing in and the error that I receive. What am I doing wron
g?
> 1> CREATE DATABASE [northwnd]
> 2> ( northwnd.mdf = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
> 3> ( northwnd.ldf = N'C:\sql server 2000 sample databases\northwnd.ldf' )
> 4> FOR ATTACH ;
> 5> go
> Msg 102, Level 15, State 1, Server CANDACE\SQLEXPRESS, Line 2
> Incorrect syntax near 'northwnd'.
> 1>|||For future reference, the documentation conventions for SQL Server say that
anything is a command syntax in all capital letters is a keyword that must
be included exactly as specified in the syntax. in the example, CREATE,
DATABASE, ON, FILENAME, FOR, and ATTACH are all keywords which must be
entered as specified.
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
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23sZw2uVFHHA.1080@.TK2MSFTNGP05.phx.gbl...
> One thing I see is that you are missing the word ON after the database
> name. Also, you should specify the word FILENAME, not substitute it toe
> something else. Try below:
>
> CREATE DATABASE [northwnd] ON
> ( FILENAME = N'C:\sql server 2000 sample databases\northwnd.mdf' ),
> ( FILENAME = N'C:\sql server 2000 sample databases\northwnd.ldf' )
> FOR ATTACH ;
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Candace" <Candace@.discussions.microsoft.com> wrote in message
> news:C65CAD32-150B-4534-8E4F-A4A6B8267A00@.microsoft.com...
>

Attached Northwind to SQL Express but no data in tables

I installed Northwind sample database by running the install script within server management sudio express and the database and tables show up, but there are no records. Once executed, it says it was successful.

Am I missing something?

The data is there. I had built some code to extract the customer data to a datagrid and it was only pulling the column headers and no data. I opened the managment studio and asked it to open a table and the records were there. Sorry for the post.

attached in vb8 vs vb6 incompatability

I have two programs which access sql server 2005. One was written in vb6 the other in vb8 (aka vb.net 2005).

vb6 works well with this connection string:

Provider=SQLNCLI;Integrated Security=SSPI;Persist Security Info=False;Database=MyDbName;Data Source=.\MyServerInstanceName

vb8 (in vs2005) generated the following connection string which works well in the vb8 application:

Data Source=.\MyServerInstanceName;AttachDbFilename='C:\MyDbPath\MyDbName.mdf';Integrated Security=True

Within their own programs each connection string works well. However, if I use one program and then the other (e.g., vb8 program then vb6), I get an error message:

Unable to open the physical file "C:\MyDbPath\MyDbName.mdf". Operating system error 32: "32(The process cannot acces the file because it is being used by another process.)".

If I detach the database using SSMS, I can then access it with the other program. Obviously, this is not an ideal situation and not something I would want the end user to have to do.

Also, when using the vb6 connection string, SSMS lists the database in Object Explorer as: MyDbName. When using the vb8, the database is listed as C:\MyDbPath\MyDbName.mdf. BTW, the database is set for multi-user.

How can I get the two programs to place nice together?

YOu can either use the database file with one process or attach the database to a SQL Server (Express) instance to make it accessible for more than one application.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

When you use the attach command in the connection string the application that is running the command has exclusive access to the files, If you want the database to be used by multiple applications you will need to first make sure that the database will allow remote connections then attach the database to the database engine using the management tools or the command line tools. Once this is done you would then just connect using the following string

"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"

The above connection string was taken from www.connectionstrings.com

|||

The database absolutely must be used by more than one program. SQL Server Express is not an option because of its 4gb limit. Perhaps I'm not understanding something here. It sounds as tho you are saying an SQL Server database cannot be used by more than one program at the same time unless the database is so small that it is unusable for all except the simplest of applications.

|||

Again, perhaps I am missing something. Are you saying SQL Server 2005 cannot be used by multiple users unless they are all using the same program, or they have enough database management experience to use tools such as SSMS, or even more shocking still: they have to use command line tools? This is starting sound like Linux and MySQL.

It is shocking to imagine that everyday users would have to have such extensive skills just to use database enabled Windows XP? applications.

|||Yes, you are right, you got me wrong :-)

OK, a database file which is not attached can be attached as a user instance with a SQL Server Express instance. As a user instance, only the application which opened the connection to the user instance is able to access the database. If you attach the database file to a server instance, you can access the data through the SQL Server Express Service as you already know it from the common SQL Server database access.

Hope that clarifies things.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Sorry, but no. I don't understand why you are talking about SQL Server Express. I'm not using the Express version; it is totally unusable for the project I'm working on.|||I was talking about Express because you are using the user instance feature.|||

Where am I using the user instance feature?

|||Data Source=.\MyServerInstanceName;AttachDbFilename='C:\MyDbPath\MyDbName.mdf';Integrated Security=True|||

Now, I am confused ! The .\MyServerInstanceName refers to an instance of SQL Server 2005 and not .\sqlexpress . Also, in VS2005, if I try to change the connection string to User Instance = True (it is currently set to False), I get the following error message:

The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

|||I resolved the problem by starting both vb6 & vb8 programs with a check for whether or not the database is attached. If it is not, I use sp_attach_single_file_db to attach it. Then I changed the part of the vb8 connection AttachDbFilename= to Database=.

Attached DBs coming online as READ-ONLY - SQL Server 2000 on Server 2003 R2

Had a server that went belly up. ALL database files were on the SAN and were "supposedly" ok.

We rebuilt the server to have Windows Advanced Server 2003 R2. Install went fine.

Installed SQL Server 2000 SP4 + latest builds to 2187 and SQL Server 2005 SP1.
That all went well.

We attached a few of our DBs in SS2K and ALL of them are coming up in read only mode. We try to put then in normal mode my unchecking the read only option on the properties of the DB but we get the following error:

ERROR 5105: Device activation error. The physical file named 'D:\myDB.mdf' may be incorrect.
Device activation error. The physical file named 'D:\myDB.ldf' may be incorrect.
Could not restart database 'myDB'. Reverting back to old status.
ALTER DATABASE statement failed.
Device activation error. The physical file named 'D:\myDB.ldf' may be incorrect.
sp_dboption failed.

The D: drive in this example is a LOCAL drive. I moved this DB from the SAN. The MDF was on on volume and the LDF was on another volume.

I did receieve the same error when the database files were in the SAN locations.

I thought by moving both the MDF and LDF to a local drive I could elimitate the possibility that the SAN was causing the issue BUT that seems not to be the case.

The account being used for the SQL Server services is a Domain Admin account that has also been added to the Admins group on the server.

All persmission are set and look good on the shares and volumes.

As a side note, I copied over a small test DB from another server (copied the MDF & LDF).

I attached the DB and IT TOO attached in a READ-ONLY mode.

Thanks ALL!

I have the same error|||Damn thing was all caused by a faulty SCSI card - DOH!!!

I am by means NO Systems Engineer BUT from what I was relayed here is what happened:

The throughput of the connection to the SAN is usually running at 320 mbits. We found that our throughput was at 80 mbits, only 75% of the throughput the "system" knows it should see.

Now I am told applications query this throughput metric the System has stored away and expects data to be pulled/pushed at a rate in ms that corresponds to the last know throughput speed. So let’s say for 320 mbits response time should be .001 ms or so with some acceptable deviation.

Of course the ms number I threw out is made up (I will see if I can get the real mbits/ms ratios later).

SO ... when SQL Server was given the command to attach the DB files which resided on the SAN ... the throughput speed was not what SQL Server was expecting and it took longer to attach the files and in some manner put the DBs in READ_ONLY mode.

In saying this though ... I still have one question my SE is tracking down and one question I have M$ chewing on and they are:

1. Since the locals drives (C: & D:) ARE NOT on the SCSI
controller and cable ... why did the DBs I attached
from those drives also come up READ_ONLY

2. FOR M$: If this is indeed a SCSI controller/cable
issue ... what caused the attached DBs to go into
READ_ONLY mode.

Aside from that ... the DBs are now attaching and are online and are not READ_ONLY!

GO FIGURE!

I will post updates as I gather more pertinent details.

Attached DB not working properly in Vista Ultimate enviroment

hi,

i have installed SQLEXPRESS (SQL Server 9.0.3042) on my windows ultimate laptop. of late am facing this issue of database. this database is from SQl 7.0 Desktop edition(the one that i use in my office machine with Xp SP2). As such it works fine in SQL 2000 server after attachment (for test).

i have run SQLEXPRESS as administrator to make/attach new database. i can attach the database easily and can even view tables and other stuffs inside database in administrator mode. the issue pops up when i run SQLEXPRESS in normal mode. when i try to open and view the same DB's content, error pops up stating

"The database XXX is not accessible. (Micorosoft.sqlserver.express.objectExplorer)"

i cannot access this DB via VB 6 form as it dosnt show up at all in database list when tried to connect via ADODC.

i want to make this DB accessibility as normal operation, not previliged only to administrator as application run on normal mode only.

the issue dosnt arise when i locally make a new database as it can be accessed when run in normal mode also. why does this happen to database that is attached and not to ones locally made.

pls guide me as i usually do my works at home and making whole database again will surely take lots of pain. why not it just attach then start working, not asking for preveliged mode.

thanks in adv
Nyaken

Hi,

Try checking the owner of the attached database. I found that when i restored a db I had to then set the ownership afferwards otherwise I couldn't access it.

Chris

|||

hi,

thanks for the prompt re. well, as per ur suggestion i have explored all possibiliites to find a way to change the ownership of database but alas!!! i just couldnt make it. can you pls guide me to take this corrective measure, please. i hope everything must be done in administrative mode only, isnt it?

awaiting for your re

regs

ken

|||

Hi,

If you right click on the attached database and select properties then go the the files page, you should see that the second text box down (the owner field) is blank. If so, set an owner by clicking the elipsis next to the box. After you have clicked all the ok's you can check the owner was set by going back to the files page, and if the box now is not empty then the owner was set. You should be able to use the database now.

Hope this helps,

Chris

P.s. I did try to post this yesterday several times but the forum kept giving me an "unkown error"

Attached DB and SQL Express: Now you see it, Now you don't!!!

After installing SQL Express 2005, I attached a DB of mine, with success.

I can see it from the lagacy enterprise manager, and if I launch the query analyzer fromm within SQL Ent. Manager that DB appear in the DB pane list ans THAT IS FINE.

Now when I launch the Query Analyzer directly from Windows, the attached DB doesn't appear. Same when I try to create an ODBC DataSource pointing to that DB: Is DOESN'T APPEAR and THAT IS NOT FINE!!!

Anybody have a clue?

Thanks in advanceCan you still use the database in Query Analyzer or osql? (What I'm trying to understand if this is a UI issue or something else).

Do you have SQL Server 2000 installed on the same machine (since you have older tools)? While it is a supported scenario (both SQL Server 2000 and 2005 on the same machine), there may be interaction between installed components that affect how the information is displayed in tools.

Boris.|||I have the exact same problem my sqlexpress db shows up in the

Enterprise manager and in the new Management Studio Express. It

does not however show up when I create an ODBC data source. I can

type in the machine name and the server name and it works.|||It sounds like you are using SQL2K tools against SQL 2005 Express edition, try using SQL Server Management Studio and Query Editor instead.

Attached DB and SQL Express: Now you see it, Now you don't!!!

After installing SQL Express 2005, I attached a DB of mine, with success.

I can see it from the lagacy enterprise manager, and if I launch the query analyzer fromm within SQL Ent. Manager that DB appear in the DB pane list ans THAT IS FINE.

Now when I launch the Query Analyzer directly from Windows, the attached DB doesn't appear. Same when I try to create an ODBC DataSource pointing to that DB: Is DOESN'T APPEAR and THAT IS NOT FINE!!!

Anybody have a clue?

Thanks in advanceCan you still use the database in Query Analyzer or osql? (What I'm trying to understand if this is a UI issue or something else).

Do you have SQL Server 2000 installed on the same machine (since you have older tools)? While it is a supported scenario (both SQL Server 2000 and 2005 on the same machine), there may be interaction between installed components that affect how the information is displayed in tools.

Boris.|||I have the exact same problem my sqlexpress db shows up in the Enterprise manager and in the new Management Studio Express. It does not however show up when I create an ODBC data source. I can type in the machine name and the server name and it works.
|||It sounds like you are using SQL2K tools against SQL 2005 Express edition, try using SQL Server Management Studio and Query Editor instead.

Attached DB and SQL Express: Now you see it, Now you don't!!!

After installing SQL Express 2005, I attached a DB of mine, with success.

I can see it from the lagacy enterprise manager, and if I launch the query analyzer fromm within SQL Ent. Manager that DB appear in the DB pane list ans THAT IS FINE.

Now when I launch the Query Analyzer directly from Windows, the attached DB doesn't appear. Same when I try to create an ODBC DataSource pointing to that DB: Is DOESN'T APPEAR and THAT IS NOT FINE!!!

Anybody have a clue?

Thanks in advanceCan you still use the database in Query Analyzer or osql? (What I'm trying to understand if this is a UI issue or something else).

Do you have SQL Server 2000 installed on the same machine (since you have older tools)? While it is a supported scenario (both SQL Server 2000 and 2005 on the same machine), there may be interaction between installed components that affect how the information is displayed in tools.

Boris.|||I have the exact same problem my sqlexpress db shows up in the Enterprise manager and in the new Management Studio Express. It does not however show up when I create an ODBC data source. I can type in the machine name and the server name and it works.
|||It sounds like you are using SQL2K tools against SQL 2005 Express edition, try using SQL Server Management Studio and Query Editor instead.

Attached DB and SQL Express: Now you see it, Now you don't!!!

After installing SQL Express 2005, I attached a DB of mine, with success.

I can see it from the lagacy enterprise manager, and if I launch the query analyzer fromm within SQL Ent. Manager that DB appear in the DB pane list ans THAT IS FINE.

Now when I launch the Query Analyzer directly from Windows, the attached DB doesn't appear. Same when I try to create an ODBC DataSource pointing to that DB: Is DOESN'T APPEAR and THAT IS NOT FINE!!!

Anybody have a clue?

Thanks in advanceCan you still use the database in Query Analyzer or osql? (What I'm trying to understand if this is a UI issue or something else).

Do you have SQL Server 2000 installed on the same machine (since you have older tools)? While it is a supported scenario (both SQL Server 2000 and 2005 on the same machine), there may be interaction between installed components that affect how the information is displayed in tools.

Boris.|||I have the exact same problem my sqlexpress db shows up in the Enterprise manager and in the new Management Studio Express. It does not however show up when I create an ODBC data source. I can type in the machine name and the server name and it works.
|||It sounds like you are using SQL2K tools against SQL 2005 Express edition, try using SQL Server Management Studio and Query Editor instead.

Attached .mdf file security settings

I'm having some problems with SQL Server 2005. I installed the Personal Starter kit but don't have the Express edition installed so I attached the .mdf file to SQL Server 2005. That's ok and I also changed the connection string to integrated security.
<add name="Personal" connectionString="Data Source=MyTestServer;Initial Catalog=Personal;Integrated Security=True" providerName="System.Data.SqlClient"/>
I tried setting the security settings in the Management studio under Security | Logins | BUILTIN\Administrators where I select the User mapping and check the checkbox before the Personal.mdf file. But this doesn't seem to do the trick. How can I set the correct security settings?
Please, does someone here know an answer for this?
|||It seemed that the attached .mdf file got the position on the hard drive (c:\...\personal.mdf) instead of the proper name. After changing that with the sp_renamedb command I could get it to work.

Attached

I have attached JFDB1.mdf and JFDB1.ldf file but database shown Readonly
status. I have deselect the readonly from the options tab but it gave me
following error. Can idea what should I do ?
Microsoft SQL-DMO (ODBC SQLState: 42000)
Error 5105: Device activation error. The physical file name 'C:\JFDB1.mdf'
may be incorrect.
Device activation error. The physical file name 'C:\JFDB1.ldf' may be
incorrect.
Could not restart database 'JFDB1'. Reverting back to old status.
ALTER DATABASE statement failed.
Device activation error. The physical file name 'C:\JFDB1.ldf' may be
incorrect.
sp_dboption command failed.
OK
Thanks
NOOR
Check the file properties for the mdf and ldf at the
operating system level and make sure the files themselves
are not set to read only for the file properties.
-Sue
..
On Mon, 25 Oct 2004 23:58:26 -0700, "Noor" <noor@.ngsol.com>
wrote:

>I have attached JFDB1.mdf and JFDB1.ldf file but database shown Readonly
>status. I have deselect the readonly from the options tab but it gave me
>following error. Can idea what should I do ?
>--
>Microsoft SQL-DMO (ODBC SQLState: 42000)
>--
>Error 5105: Device activation error. The physical file name 'C:\JFDB1.mdf'
>may be incorrect.
>Device activation error. The physical file name 'C:\JFDB1.ldf' may be
>incorrect.
>Could not restart database 'JFDB1'. Reverting back to old status.
>ALTER DATABASE statement failed.
>Device activation error. The physical file name 'C:\JFDB1.ldf' may be
>incorrect.
>sp_dboption command failed.
>--
>OK
>--
>
>Thanks
>NOOR
>
|||Thanks Sue .. you are right.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:pufsn0ta44btpj3cociiqdq8i2lrm5ue5p@.4ax.com... [vbcol=seagreen]
> Check the file properties for the mdf and ldf at the
> operating system level and make sure the files themselves
> are not set to read only for the file properties.
> -Sue
> .
> On Mon, 25 Oct 2004 23:58:26 -0700, "Noor" <noor@.ngsol.com>
> wrote:
'C:\JFDB1.mdf'
>