Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Friday, March 23, 2012

MSDE 2000 database setup trouble

Hello
I am running a stand-alone test environment for an application in XP Pro
which I can only use MSDE to manage my databases.
I've successfully installed msde and am finally able to connect using 'osql
-Usa -Ppassword -S (local)\testmachine' , because I can get the '1>' command
prompt.
My trouble is when I try to create and/or restore a database for the test
application to use I'm running into trouble. For example enter this :
1> USE master
2> RESTORE DATABASE master FROM DISK='C:\master\master_db2.BAK'
3>GO
and I get an error message telling me that "RESTORE DATABASE must be used in
single user mode when trying to restore the master database" ...... I also
get a similar message when trying to create and restore a database called
'public'.
how do I successfully get into 'single user mode' ?
hi,
APB wrote:
> Hello
> I am running a stand-alone test environment for an application in XP
> Pro which I can only use MSDE to manage my databases.
> I've successfully installed msde and am finally able to connect using
> 'osql -Usa -Ppassword -S (local)\testmachine' , because I can get the
> '1>' command prompt.
> My trouble is when I try to create and/or restore a database for the
> test application to use I'm running into trouble. For example enter
> this :
> 1> USE master
> 2> RESTORE DATABASE master FROM DISK='C:\master\master_db2.BAK'
> 3>GO
> and I get an error message telling me that "RESTORE DATABASE must be
> used in single user mode when trying to restore the master database"
> ...... I also get a similar message when trying to create and
> restore a database called 'public'.
> how do I successfully get into 'single user mode' ?
have a look at http://msdn2.microsoft.com/en-us/library/ms180965.aspx ..
typically you open a command window, navigate to the \Binn folder of the
instance you want to start and execute something like
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\>sqlservr.exe -s
InstanceName -m
this will start the instance in single user modo, so that you'll be able to
restore the master database...
to restore "normal user's" database(s) the single user mode is not required,
but the database(s) to be restored must not be in use... so no active
connections must be running against the database(s) to be restored..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply

Wednesday, March 21, 2012

MSDE 2000

Hello!!
I have a application that creates an instance of MSDE 2000 called
MMSQL$EMMSDE. It uses its own login to pass inforamtion called embuser. This
company does not provide information on how to recover data from the
database. I have a client that had their motherboard crash and needed a new
computer and wanted to recover the data off the drive. I have the MDF and LDF
files all under the data folder. Everytime I copy these over to a new
installation says that it is no good and my aplication I use cannot connect
to it as well. Is there anyway that anybody knows of on how to reconnect the
MDF file to another computer that has a fresh install of this applciation and
instance so it can receover the data?
Any and all posts is appreciated.
Thanks,
Fred
After you copied the MDF and/or LDF files to the new computer, where an SQL
Server/MSDE is installed, did you attached the data file the the instance of
SQL Server/MSDE?
"Fred Boltz" <Fred Boltz@.discussions.microsoft.com> wrote in message
news:57576684-C93B-4BD3-AF85-6A03BB605A8D@.microsoft.com...
> Hello!!
> I have a application that creates an instance of MSDE 2000 called
> MMSQL$EMMSDE. It uses its own login to pass inforamtion called embuser.
> This
> company does not provide information on how to recover data from the
> database. I have a client that had their motherboard crash and needed a
> new
> computer and wanted to recover the data off the drive. I have the MDF and
> LDF
> files all under the data folder. Everytime I copy these over to a new
> installation says that it is no good and my aplication I use cannot
> connect
> to it as well. Is there anyway that anybody knows of on how to reconnect
> the
> MDF file to another computer that has a fresh install of this applciation
> and
> instance so it can receover the data?
> Any and all posts is appreciated.
> Thanks,
> Fred
|||I tried using a 3rd party software to attach the file but could not. Can you
tell me how to go about doing that?
"Norman Yuan" wrote:

> After you copied the MDF and/or LDF files to the new computer, where an SQL
> Server/MSDE is installed, did you attached the data file the the instance of
> SQL Server/MSDE?
>
> "Fred Boltz" <Fred Boltz@.discussions.microsoft.com> wrote in message
> news:57576684-C93B-4BD3-AF85-6A03BB605A8D@.microsoft.com...
>
>
|||hi Fred,
Fred Boltz wrote:
> I tried using a 3rd party software to attach the file but could not.
> Can you tell me how to go about doing that?
>
have you been reported with an exception? what is the message?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
|||Andrea,
I am not sure of your question. What do you mean by have I been reported
with an exception? Here was the original message I wrote:
Hello!!
I have a application that creates an instance of MSDE 2000 called
MMSQL$EMMSDE. It uses its own login to pass inforamtion called embuser. This
company does not provide information on how to recover data from the
database. I have a client that had their motherboard crash and needed a new
computer and wanted to recover the data off the drive. I have the MDF and LDF
files all under the data folder. Everytime I copy these over to a new
installation says that it is no good and my aplication I use cannot connect
to it as well. Is there anyway that anybody knows of on how to reconnect the
MDF file to another computer that has a fresh install of this applciation and
instance so it can receover the data?
Any and all posts is appreciated.
Thanks,
Fred
"Andrea Montanari" wrote:

> hi Fred,
> Fred Boltz wrote:
> have you been reported with an exception? what is the message?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://italy.mvps.org
> DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
> -- remove DMO to reply
>
>
|||hi Fred,
Fred Boltz wrote:
> Andrea,
> I am not sure of your question. What do you mean by have I been
> reported with an exception? Here was the original message I wrote:
you answered to Norman:
>I tried using a 3rd party software to attach the file but could not. Can
>you
>tell me how to go about doing that?
did the tool you used to re-attach the database reported you an exception?
anyway, you can use oSql.exe, the command line tool provided with MSDE to
reattach the database..
you have to log in as a sysadmin member so to have admin permissions granted
in MSDE using a truste connection, or you have to provide credentials of a
standard SQL Server login member of the sysadmin SQL Server group (like
"sa")..
once you are connected, you have to execute the sp_attach_db
(http://msdn2.microsoft.com/en-us/library/aa259611(SQL.80).aspx) system
stored procedure like
1>EXECUTE master..sp_attach_db @.dbname = 'the_database_name',
2>@.filename1 = N'ful_path_to_the_mdf_file.Mdf',
3>@.filename2 = N'ful_path_to_the_ldf_file.Ldf'
4>GO
then you can quit oSql.exe.. see
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q325003 for further
info about oSql.ex and MSDE uses
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply

Monday, March 12, 2012

MSDE - Start Databases

Hello

I'm using SQL Server 2000 - 8.00.760 Desktop Engine.

When the SQL Server starts, it just start databases master, model and tempdb. The databases that I have created don't start. They just start when I connect to them for the first time.

What I can do to start my own database when the SQL Server starts?

Thank you.

All databases are opened at startup if they are attached to SQl Server. If you have switched on the autoclose option, they are in common closed (but not stopped) after the last user disconnected.

jens Suessmeyer.

http://www.sqlserver2005.de

|||I did't switched on the autoclose option - it is off, but my database just start on first use, causing a delay on my application while it starts. When it is already started, I have no delay. I need start my database when SQLServer (MSDE) starts. Is there anything to do to start my database on start of SQLServer (MSDE)?|||

The Service is autostart, but my own databases just start when I connect to them to the first time.

Is there anything to do to auto start databases?

Thanks.

|||Are you sure you are using a MSDE database not a sqlserver express database. This sounds like you are using user instances which are only available after connecting the first time. Where do you actually administer the SQL server databases ? After starting the server do you see the entries in sysdatabase tables / views using SELECT * from sysdatabases ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

I am using MSDE database. To administer SQL Server I use OSQL.

After start the server I ran SELECT * from sysdatabases. My own databases are listed.

|||If the databases are listed they should be available. use the SELECT name, mode, status,status2 from sysdatabases to check their current status. What is currently displayed ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

I have three databases. They are listed and the databases master, model, msdb and tempdb are listed too.

After start SQLServer, the SELECT results the same values for my three databases: mode = 0, status = 1073741848 and status2 = 16777216.

Here, my own databases are not started. In the first connect to the database I has a delay, because they are not started.

Then, I connect to one and the value for status changes to 24. Now, it is started.

Any idea?