Friday, March 23, 2012
Help Crash!
directory with all of the MDF and LDF files in it for the databases. Backups
directory was completely lost and as I understand it there are no outside
copies of backups. How if it is at all possible does one get these mounted
in such a way that they can be recovered in a new machine?Hi,
If you have all the Physical DAT files , including Master database . Then
all you have to do is..
1. Take a copy of all DAT files to a safe location
2. Install SQL 7 in the same folder as old installation
3. apply the same service pack as old
4. stop sql server and SQL Server Agent service
5. Copy all the DAT files to the same folder
6. Start SQl server and SQL Server Agent service.
Now your SQl server will be back as old.
Note:
Now onwards please prepare and backup strategy to backup your databases.
Thanks
Hari
MCDBA
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Read about sp_attach_db and sp_attach_single_file_db in Books Online. These are only guaranteed to work if you
properly detached the databases first. But if you are lucky...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases. Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||You can try using sp_attach_db, but if the database wasn't closed properly,
there is no guarantee.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Copy the LDF and MDF files onto another computer with SQ Lon it and then run
sp_attach_db to attach each DB.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Will it have to be a SQL 7 installation since these came from SQL 7? Or will
it work with SQL 2000 as there are several machines with this installation,
but this may have been the last one remaining with SQL 7 on it :)
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Copy the LDF and MDF files onto another computer with SQ Lon it and then
run
> sp_attach_db to attach each DB.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Johannesburg, South Africa
> Mobile: +27-82-552-0268
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
> news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> > Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> > directory with all of the MDF and LDF files in it for the databases.
> Backups
> > directory was completely lost and as I understand it there are no
outside
> > copies of backups. How if it is at all possible does one get these
mounted
> > in such a way that they can be recovered in a new machine?
> >
> >
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Worked without a hitch! Thanks everyone.
"Martin Ha" <martin.ha@.gmx.net> wrote in message
news:410FB18D.10706@.gmx.net...
> Hi,
> You can also attach a sql 7 db to an sql 2000 server without data loss.
> Bradley M. Small wrote:
> > Will it have to be a SQL 7 installation since these came from SQL 7? Or
will
> > it work with SQL 2000 as there are several machines with this
installation,
> > but this may have been the last one remaining with SQL 7 on it :)
> >
> >
> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> > news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
> >
> >>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> >
> > run
> >
> >>sp_attach_db to attach each DB.
> >>
> >>--
> >>--
> >>Mike Epprecht, Microsoft SQL Server MVP
> >>Johannesburg, South Africa
> >>Mobile: +27-82-552-0268
> >>IM: mike@.epprecht.net
> >>
> >>MVP Program: http://www.microsoft.com/mvp
> >>
> >>Blog: http://www.msmvps.com/epprecht/
> >>
> >>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
> >>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> >>
> >>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> >>directory with all of the MDF and LDF files in it for the databases.
> >>
> >>Backups
> >>
> >>directory was completely lost and as I understand it there are no
> >
> > outside
> >
> >>copies of backups. How if it is at all possible does one get these
> >
> > mounted
> >
> >>in such a way that they can be recovered in a new machine?
> >>
> >>
> >>
> >>
> >
> >
Wednesday, March 7, 2012
HELP - my virtual directory is not working!
I cannot access my virtual directory through url query
(404 page not found error). I am sure that I have allowed
the virtual directory to be queried through url. No
matter where I create the actual path to my virtual
directory, I still got error.
Before setting up the virtual directory, I can access the
files in C:\Inetpub\wwwroot\mydb through url, but after
setting up the virtual directory, what I can get is only
404 error. Could anyone help'What I typed is:
http://myservername/mydb?
sql=select+*+from+tablename+for+xml+uto+root=ROOT
I've got a file named index.htm in
C:\Inetpub\wwwroot\mydb, before settting it as virtual
directory, it works, but after, no luck
>--Original Message--
>When I follow carefully the instruction inside the book,
>I cannot access my virtual directory through url query
>(404 page not found error). I am sure that I have
allowed
>the virtual directory to be queried through url. No
>matter where I create the actual path to my virtual
>directory, I still got error.
>Before setting up the virtual directory, I can access
the
>files in C:\Inetpub\wwwroot\mydb through url, but after
>setting up the virtual directory, what I can get is only
>404 error. Could anyone help'
>.
>
Monday, February 27, 2012
Help -- How do I exit a Foreach Loop
I have a foreach loop that is processing files in a directory. One of the tasks is the execute sql task that calls a stored proc. If this stored proc returns a certain value then I need to exit the loop and not process any more files. But I have been unable to figure out how to make this happen.
Any help would be greatly appreciated.
Thanks!
GN
Hi,
I am not sure whether this will work or not. But just try. In the 'Foreach loop' container, select 'Expressions' tab and assign a boolean variable to the propery 'Disable'. Then based on the result, when required, set the value of the variable to 'True'. If it does not work, try this option for 'ForceExectionResult' also.
Let me know if any one of it works.
|||have you considered using the script task instead?|||GN wrote:
I have a foreach loop that is processing files in a directory. One of the tasks is the execute sql task that calls a stored proc. If this stored proc returns a certain value then I need to exit the loop and not process any more files. But I have been unable to figure out how to make this happen.
Any help would be greatly appreciated.
Thanks!
GN
Place the workflow in a sequence inside the ForEach Loop.
Place a script task at the beginning of the loop with a precedence constraint going to the sequence.
Place an expression on the precedence constraint to only execute if a variable is true, call the variable, "ExecuteBody". ExecuteBody==true
Set op to expression only
When the loop should terminate, set the ExecuteBody variable to false. The loop will traverse the entire remaining collection, but because there is nothing to execute, it will rip through it extremely fast and terminate.
K