After Reboot, Some Db Were Detached, Some Not.

Aug 22, 2007

After reboot, some db were detached, some not.
How come?

View 3 Replies


ADVERTISEMENT

HELP... Need To MDF Only, But It Was Not Detached

May 18, 2001

Today we turned off SQL Server 7, copied the MDF file (a five-month, 245MB project) to the network, reformatted and installed Windows 2000 SBS with SQL Server 2000.

Lo and behold, SQL Server 2000 refuses to attach the MDF file, claiming it cannot find the accompanying LDF (no longer in existence). Using sp_attach_single_file_db did not help, nor did creating a database of the same name on the server, detaching it, and trying to swap the old MDF file for it.

Please help... if I have to get out a hex editor to get this database attached, I'm ready, but nothing I've tried works so far, and this is very important data--I can't believe the log file is THAT important, especially after committing anything left while shutting down the service.

View 1 Replies View Related

Why Can I Not See My Detached Database?

Mar 5, 2008

I feel that I have done something stupid here.I used SSMSE to detach my database so that I could create a copy - no problem here.But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.Please help - this is driving me crazy.ThanksChris

 

View 2 Replies View Related

Detached - Now Cannot Attach!

Mar 5, 2008

I feel that I have done something stupid here.

I used SSMSE to detach my database so that I could create a copy - no problem here.

But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!

I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.

Please help - this is driving me crazy.

Thanks

Chris

View 1 Replies View Related

Using Detached Database...

Nov 1, 2006

Hello,

I currently have an application that uses a Access/JET database for a desktop application. The application is single-user and outside of a few corrupt MDBs occasionally, the setup is working fine.

I am thinking about switching out from using the Access database to using a SQL Server Express detached database. I'm not sure if this is a "proper" usage of a detached database, but I've verified that I can access and query a detached one...

Is this something that is recommended? Are there any performance issues associated with it (I believe the detached would be faster than the JET database.) What kind of maintainence would be needed for the SQL Server file? (I currently have a "Repair and Compact" option for the Access file...anything along those lines needed?) Is there anything else I should be aware of?

Thank in advance!

View 4 Replies View Related

Where Are Detached Databases Kept?

Mar 9, 2008



I had to detach a databse for a project. I am now having trouble trying to find this database. It is no longer listed in the Sql Server management studio with the other databases that haven't been detached.

Is the database moved to some other folder when it is detached? Where is this database now?

thanks

View 19 Replies View Related

How To Attach The Detached Database

Oct 1, 2007

Dear All,
i've detached my database. how to attache thesame again?

Vinod
Even you learn 1%, Learn it with 100% confidence.

View 10 Replies View Related

Attached Vs Detached Database

Nov 11, 2007

Hello all,
I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server.
My question is this:
What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is.
Thanks

View 5 Replies View Related

Manage Detached Mdf File

Oct 13, 2006

I want to manage my sql express .mdf database file (e.g. set Roles) but I seem to only be working with a temporary instance of my database when I attach to .sqlexpress and manage in SQL Server Management Studio Express (SSMSE). The Role I set is gone when I detach and re-attach.

If I try to manage my file in Visual Studio under Server Explorer, I do not see the "Roles" folder to modify roles.

Any help is appreciated.

View 3 Replies View Related

Detached Vs Attached Database Files

Nov 11, 2007

Hello all,
I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server.
My question is this:
What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is.
Thanks

View 3 Replies View Related

Detached NAS Mdf/ndf Files Locked And Won't Reattach

Oct 22, 2007



Hi



I have a database consisting of multiple files on a remote server.

Both servers have the same user (bob) which is in the administrator group.

The directory that the mdf/ndf files exist on is shared as "nas" with full rights given to the user bob.

They are both in the same workgroup.

SQL server is running as this user (not ideal I know but server and services will be locked down later)



The script I used to create the database uses the following line to enable remote database files:



-- Enable the use of network drive for DB files

DBCC TRACEON(1807)

GO



I used SSMS to detatch the database and then modified my create script by removing database sizes and adding "FOR ATTACH" at the end. (I have also tried using sp_attach_db but no use)



So the script looks like this:



CREATE DATABASE [dbname] ON PRIMARY

( NAME = N'DBName', FILENAME = N'\123.45.67.89asDBName_FG.mdf' , MAXSIZE = UNLIMITED, FILEGROWTH = 10GB ),

-- Filegroups for the Alerts Table and Indexes.

FILEGROUP [FG_DBFile2]

( NAME = N'DBFile2_FG', FILENAME = N'\123.45.67.89asDBFile2_FG.ndf' , MAXSIZE = UNLIMITED, FILEGROWTH = 5GB ),

FILEGROUP [FG_AlertsIndexes]

( NAME = N'DBFile3_FG', FILENAME = N'\123.45.67.89asDBFile3_FG.ndf' , MAXSIZE = UNLIMITED, FILEGROWTH = 5GB )



LOG ON

( NAME = N'DBName_log', FILENAME = N'\123.45.67.89asDBName_log.ldf' ,MAXSIZE = 13GB , FILEGROWTH = 0%)

FOR ATTACH

GO



When I run the script I get the following error:



DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Msg 5120, Level 16, State 101, Line 5

Unable to open the physical file "\123.45.67.89asDBName_FG.mdf". Operating system error 5: "5(error not found)".



I know the permissions are ok as I can map a drive without being prompted.

SQL server is running as the user bob which is the same user I log onto the server as.



I am running Windows 2003 Server R2 Standard Edition on server with SQL Server 2005 SP2.

The NAS box is running SQL Server R2 Storage Edition.



One thing I noticed was that the mdf/ndf files on the NAS box are locked as if SQL is still using them, i.e. I cannot rename them, move them, alter any properties etc. I just get "Access Denied".



I've tried rebooting both servers but still no luck. I've also tried stopping SQL server then renaming the files, but again "Access Denied".



I know there has been a problem in the past detaching and attaching db files on a NAS, but the Hotfix is included in SP2, which I am using.



I hope I have included enough info but if I've missed anything, it can be provided.

(Event Log basically replicates what the error message says.)



Any help or ideas would be greatly appreciated.



Thanks



Steve


View 2 Replies View Related

Copying Detached Databases Over The Network With T-SQL

Jul 25, 2006

I have a T-SQL script which deataches and attaches the database. Now here is what I want to do:
I
want to create a SQL Server Job and schedule it to run at a particular
time of the month to Detach all the databases on my local machine and
*Copy all the deatched databases over a network machine* and then
Attach those Database.

All this should be done in T-SQL. I
already have the T-SQLs for Attaching and Detaching. All I need is to
know the T-SQL (example) which will copy the *Detached Databases* from
mu local computer to my Network Computer. How do I achieve that?

Thanks

View 7 Replies View Related

Physical Files Can Not Be Deleted After Database Detached

Oct 10, 2007

I have detached the database via sp_detach_db in a job, (I was trying to use a job to detach the database, then make copies of the mdf file, then attach the databases as different copies, somehow the job failed due to file locked) I tried to delete the physical files, but they were still locked. I tried several times, two of them I was able to delete the mdf files, but not the ldf file. The other one both mdf file and ldf file can not be deleted. I was not able to see the database via Management studio.

Can anyone help?

Thanks

View 3 Replies View Related

How Do I Recover Database From A Detached Backup Device?

Nov 29, 2007

I ran into a problem today where I had to pull a backup file from an older tape. The file was originally is a backup that was stored in a device like :

EXEC sp_addumpdevice
'disk', --type
'c2000_BackupDevice', --logical name
'\UNCPathackupFile.bak' --physical location


I put the file from the tape on a File Server and then tried to create a new backup device pointing to the file. That's easy enough, but when I try to restore from it I get an device error saying it's offline.

How can I get that device attached to my server and then extract the backup files stored inside it?

Please advise b/c this is an interesting problem I hadn't anticipated and it argues that I should change my backup strategy .

Thanks for any advice/experience you can provide,

alex8675

View 2 Replies View Related

Transact SQL :: Moving MDF And NDF Files After Database Is Detached

Aug 19, 2015

I am using SQL 2012 SE. I am trying to move .mdf and .ndf files after a database is detached. Here is my code that is just to copy the mdf file. I am testing it against this file now and if it worked then I would do the move ldf file the same way.

EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXEC master.dbo.sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
DECLARE @cmd nvarchar(4000)

[Code] ...

The only message is I see while the query is executing is :Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

If I manually copy over the file it takes 30 seconds since the file is only 2GB and the script takes 45 minutes and still executing.

View 7 Replies View Related

User Instance Db File Not Get Detached After Connection Has Been Closed

Aug 21, 2007

Hi experts,
I have sql express installed on my machine and i'm using visual studio to create database files. After i've build a connection to my database file thru Server Explorer (choose Add attach files) i opened Management Studio Express and  found that the new database has been attached to sqlexpress database engine----technically speaking it's under the user instance which i use to run my visual studio. right?? that's totally fine.My question is, after i'v closed the connection in visual studio, that attached database file still exist.I want it to be detached immediately after i've closed the connection in visual studio.How can i do that?
 I've searched through internet and was told that sp_config can solve this problem by setting the user instance time out. I ran sp_config against my database but did not find that item. Could anybody give me some directions? thanks in advance.

View 2 Replies View Related

Cannot Connect To Sql Express Via ASP.NET After I Attached And Detached My Db To Sql Management Studio

Jun 6, 2006

Hello everybody,

I have an ASP.NET 2.0 website running on a windows server 2003 - sql express management studio installed. Today I had to make some changes in my database, add some columns, and so on...

So I put the app_offline.htm into the root of the web application, so the IIS unloaded the application domain, attached it in the sql management studio, made the changes I had to do and detached the db. Ok - then I removed the app_offline.html from the root of the application and looked at my internet explorer telling me that the user NT_network... cannot login...

What did I do wrong? I attached it, detached it, and at once something went wrong...

I tried everything, at least I copied the whole application to another directory and.... It worked fine again!

So, can anybody help me, I don`t know what I did wrong or rather how to make changes in my sql express for the future, not having trouble with any security issues...

regards

Simon

View 5 Replies View Related

The Need To Reboot SQL 2000

Mar 26, 2002

Our NT person thinks that rebooting the SQL 2000 (on WIn 2000) server every month is a good idea (this is a client production box). I am strongly against it. For starters any trends I am trying to capture with performance monitor become useless every time we do this. I am willing to listen to every one's opinion, but I hope by now that SQL 2000 is stable enough not to have to do this.

View 1 Replies View Related

Server Reboot

Oct 15, 2004

I seem to recall somewhere that a Microsoft Windows Server (2000 for example) should be rebooted once a week.

Is this an urban myth? If so....I can't seem to find a doc on it.

googled:

microsoft server maintenance reboot schedule recommendation

thoughts?

View 2 Replies View Related

To Reboot The Server

Jan 25, 2006

I'm very new to SQL Server. I need to reboot the server for some reason. I need your help to list out what a the step that I need to follow to perform this process.

Regards,
Ilmi

View 5 Replies View Related

Server Reboot

Jul 23, 2005

Hello,I have a server running Windows 2000 Advanced and Sql Server. Thesystems runs fine throughout the day but reboots at night, somtimesmultiple times. The event log has a message that reads "The previoussystem shutdown at X:XX PM was unexpected."Any ideas?Paul

View 3 Replies View Related

Reboot Notification

Jul 20, 2005

Hi all,I wanted SQL server to sent me an email when it reboots. I created an Alertbut doesn't seem to be working. Any suggestions.Thanks,

View 1 Replies View Related

MSDE Installation Without Reboot

Aug 5, 2004

Hi all, I'm trying to install MSDE in silent mode and without using a .ini file (on a machine with windows 2000 server and SQL 2000 already insatalled).
At the end of the installation, the machine reboot automatically, but I need to stop this reboot.
Someone can help me?
Thanks all

View 2 Replies View Related

How To Reboot A Publication Server ?

Jul 16, 2004

We have to add some hardware and I was wondering if someone could provide a stepwise tip to do it .

It is a 3 Server Environment Pub/Dist/Sub
All three running under SQL2K
Here is what I am planning.

a. Uncheck the Enable in Distributed Agent for each replication
b. Wait for all replications to complete
c. Shut down Publisher ? Or do I have to do something else before that.

Please explain a little .

Thanks

View 2 Replies View Related

SQL 2005 Reboot Schedule

Apr 28, 2008

Do you guys reboot your SQL 2005 servers at a set schedule? If so, how often are you rebooting the servers?

-A

View 2 Replies View Related

Connection Problem After Reboot

May 24, 2007

I've just rebooting the db server and I've currently got 82 connections open to the server. vb6 apps connect fine but .Net apps are sruggling - sa is sql200 query analyzer. they can't get a connection to the server - it just hangs for ages. any idea?

View 2 Replies View Related

Executing A Reboot Command From SQL

Jul 20, 2005

Here is the block of the sproc that I?ve created. All lines executefine except for the ?exec master..xp_cmdshell @reboottc?. In order tomake this work from the query analyzer I had to set the MSSQLSERVERservice to have the same credentials as the thin clients we are tryingto shut down, that means the service is running as an Administrator onthe sql server with the same u/p as administrator on thin clients.declare @RoomNumber varchar(6) -- for testingset @RoomNumber = '1144' -- for testingDECLARE @RoomIP varchar(15), @RebootTCvarchar(120), @shutdownStart varchar(20), @shutdownEnd varchar(85)-- @ShutDownStart and @ShutDownEnd will be usedwith the @RoomIP to build the shutdown command sent to the thinclientsSET @ShutDownStart = 'shutdown -r -f -m \'SET @ShutDownEnd = ' -t 5 -c "MandatoryiConnect Reboot issued during guest check in/out process"'SELECT @RoomIP = IP FROM Rooms WHERERoomNumber = cast(@RoomNumber AS INT)SET @RebootTC = @ShutDownStart + @RoomIP +@ShutDownEnd-- print @RebootTC -- for testing-- @RebootTC ends up looking like the line below based on the@RoomNumber-- shutdown -r -f -m \172.18.16.103 -t 5 -c "Mandatory iConnectReboot issued during guest check in/out process?-- Also the command below runs correctly when executed from SQL QueryAnalyzerEXEC master..xp_cmdshell @RebootTC

View 1 Replies View Related

Best Practice: How Often To Reboot SQL Server

Feb 15, 2008

An IT dept. I have been consulting with has started to reboot SQL server every night. They are saying that this is the best practices. I would like to know if anyone has any other ideas on this subject. What is the best practices for how often a SQL server should be rebooted, daily, weekly, monthly ... ?

Thanks

View 9 Replies View Related

Pending Reboot Requirement

Feb 20, 2007

I just installed SP2. I wanted to install the AdventureWorksDW database as part of the Database Engine Tuning Advisor tutorial. It said my install was not finished and I had a "pending reboot requirement." I shut down, and 8 different updates ran. When I tried to install the AdventureWorksDW database again, I got the same message. I'll see if there are still more updates to run.

View 10 Replies View Related

SQL2k5 SP1 Installation And Reboot

Feb 20, 2007

I installed SP1 for SS 2005 on a quasi-production server, which is why I didn't mind rebooting the server. Unfortunately, it's been 5 hours and the server still hasn't rebooted. (I see a gray screen and a pointer, and that's it... but there's still disk access happening. I'm not really sure what it's doing.)

What's the best way to avoid the 5 hour reboot in the future?

Thanks,
Robert

View 3 Replies View Related

Windows 2k Server Slow Reboot

Nov 7, 2002

It takes my server forever to reboot, does anyone know how to fix this or is this a problem with the system or just how it is? Thanks

View 12 Replies View Related

Service Manager Won't Start After Reboot

Jun 30, 2004

Got an issue:

I am running SQL Server 7.0 on a Web server and recently the SQL Server has been acting up. Basically what happens is every time the server is restarted the Service Manager fails to restart. I even get an error telling me that the service failed to start. So, when I log back in I have to physically restart the Service Manager. I have the services set to start automatically. Can anyone direct me where to look...perhaps a SQL Server log that might give me a clue. My application and error logs only tell me that it stops. Any ideas?

View 2 Replies View Related

Replication Stops After Server Reboot????

May 2, 2004

Hi,

I have transactional replication set up between two dedicated servers. Server A is the PDC and Server B is a BDC (they are both Win2000 boxes). Both the servers are brand new, and replaced the two that were running like clock work (replication wise) for the last 12 months. I never had this problem with the old servers....

When the servers are shut down (as the case was a couple of weeks back with a power failure) or just recently when they were move to another room. Both servers boot up at the same time. Server B (which is the server holding the db being replicated) boots quicker and as a result replication fails and is then 'sucessfully stopped'. Unless I am aware of the server being rebooted and can monitor this potential problem, within 2 days the logfile grows to large and everything comes to a crashing halt.

I just remove replication, truncate and shrink the log, reset replication and we're away.... BUT I really need to know why it is happening in the first place. I figure there must be a setting that I have forgotten about or something.

Both servers are Win2000 (SP4) and SQL2000(SP3a).

Any help would be appreciated.

Thanks
Casper

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved