Sunday, March 25, 2012
Base64
is there a way to extract data in base64 ...
i'd like to do something like : select cast(A_PHOTO as binary base 64) from
article
does anyone know a way to do it.
Best regards.Franck Fouache wrote:
> Hi,
> is there a way to extract data in base64 ...
> i'd like to do something like : select cast(A_PHOTO as binary base 64) fro
m
> article
> does anyone know a way to do it.
What's the version of SQL Server?
In SQL Server 2005 I would implement a simple scalar CLR function
returning base64 encoded string. The function could be used in that way:
SELECT dbo.base64_encode(A_PHOTO) from article
In SQL Server 2000 CLR integration is not available.
In that case please refer to:
http://www.sqlservercentral.com/col...eencryption.asp
Best regards,
Marcin Guzowski
http://guzowski.info|||"Marcin A. Guzowski" <tu_wstaw_moje_imie@.guzowski.info> wrote in message
news:em986e$mkl$1@.atlantis.news.tpi.pl...
> In SQL Server 2000 CLR integration is not available.
> In that case please refer to:
> http://www.sqlservercentral.com/col...eencryption.asp
>
There's an updated version at
http://www.sqlservercentral.com/col...oolkitpart4.asp
as well.sql
Base64
is there a way to extract data in base64 ...
i'd like to do something like : select cast(A_PHOTO as binary base 64) from
article
does anyone know a way to do it.
Best regards.Franck Fouache wrote:
> Hi,
> is there a way to extract data in base64 ...
> i'd like to do something like : select cast(A_PHOTO as binary base 64) from
> article
> does anyone know a way to do it.
What's the version of SQL Server?
In SQL Server 2005 I would implement a simple scalar CLR function
returning base64 encoded string. The function could be used in that way:
SELECT dbo.base64_encode(A_PHOTO) from article
In SQL Server 2000 CLR integration is not available.
In that case please refer to:
http://www.sqlservercentral.com/columnists/mcoles/freeencryption.asp
Best regards,
Marcin Guzowski
http://guzowski.info|||"Marcin A. Guzowski" <tu_wstaw_moje_imie@.guzowski.info> wrote in message
news:em986e$mkl$1@.atlantis.news.tpi.pl...
> In SQL Server 2000 CLR integration is not available.
> In that case please refer to:
> http://www.sqlservercentral.com/columnists/mcoles/freeencryption.asp
>
There's an updated version at
http://www.sqlservercentral.com/columnists/mcoles/sql2000dbatoolkitpart4.asp
as well.
base unavailable
Hello,
After have saved my database, I can work on it for few days and without any reasons, The database is no more available and the name of my database appears in grey....
What can I do so as to work again on it ? For the moment, the only solution I found is to ecrase the database written in grey by my last databased safed. This means that I lost many information...
Thanks for your help,
Can you provide additional information. e.g. what tools and steps do you use to access your databe?
Thanks
|||
When I opened SQL Server Entreprise Manager, I try to go to my database from the console arborescence and it is not available. Whatever the database, the name of them are written in grey and I have no access to the different table...
Thanks for your answer
Base Functionality Script
In the BOL about Designing a Backup and Restore Strategy, it is mentioned there is a Base Functionality Script that should be run after SQL Server restored. What is Base Functionality Script? Just DBCC CHECKDB? Anything else?
Thanks
ZYTA "base functionality script" is a batch of code that can be used to quickly demonstrate the successful functioning of the database from a specific application's perspective. Most commonly this is a .sql file with batched SQL commands run into the server from ISQL. For other applications, a .bat file is more appropriate because it can contain BCP and ISQL commands. This base functionality script is very application-specific, and can take many different forms. For example, on a Decision Support/Reporting system, the script may merely be a copy of a couple of your key reporting queries; for an online transaction processing (OLTP) application it may be the execution of a batch of stored procedures to execute INSERT, UPDATE, and DELETE statements. The goal is to confirm, from a gross perspective, that everything is working as intended. The base functionality script provides a nice tool for the SA or DBA to be able to see that the database is back in a viable state, without depending on the end users for verification.
Base Database implementation
Run a set of scripts to create a base database - empty database with minimum amounts of data (i.e. lookup data and seed data). So that when a new development project begins all that is needed to build the database is to run these scripts.
The challenges we face is managing these scripts. It would be easier from a manual perspective to only have 5-6 scripts, so that we do not need to manually open and execute each script (representing an object). The problem with this is when you modify a stored procedure, you modify it in your version control platform (which is single object based) and then you need to find and replace the object in your script.
What we are looking to do is buy or build an application to manage these files for us. I was wondering if anyone has purchased a solution to accomodate this?
We currently have ApexSQL Diff - which works well to compare contents of databases (structurally it does well, seems to have a problem comparing data but that is another discussion). What it does not do well is script out an entire database, and if it were to do this, it would put it all in one file.The aPress book Real-World SQL-DMO for SQL-Server, by Mitchell & Allison, describes (and includes source on CD) the VB code to perform this very task. You would create your "empty" database once. Then, run the tool against the database to script, not only the database structure, but the data as well.
Then, just run the script on a new server to create your database.|||Thanks I just purchased that book based on your advice, we had a meeting to further discuss, this is what we came up with:
I. Structural
We agreed using a tool like Erwin is the best approach, have 1 point person (with a backup in place) that would own the database. When development teams are ready to merge up they would tell the point person which DB their project uses. The point person would then use Erwin to merge their structural changes into the master data model. Once that is complete, scripts can easily be generated to serve as master install scripts for new projects into empty DBs.
II. Functional
Currently we use subversion to store our views, UDFs and stored procedures. Regarding this piece we discussed creating a simple program to manage the creation of these scripts using the individual Subversion files as the repository. I purchased a book that comes with a CD that has VB code that utilizes the SQL DMO in order to create the necessary scripts. Ideally we would want an application that takes an INI type file with a list of objects and generates the necessary files to create those objects. This could be used in two situations the first would serve as a solution to the base DB install for UDFs, Views and Stored Procs. The second situation would be to aid in managing changes in the Development environment when we need to push changes to QA in the form of install scripts. Currently we have a very tedious process of generating the necessary SQL per object and having to find the object in our original install script, delete what is in the script and paste our new code into the script. By having an application in place to automate this process would be a great aid in generating the Base DB scripts and even more so with regards to ongoing developing.
III. Data
Depending on how the Functional phase described above goes (the aforementioned book also has code to perform similar actions on data) we would look to apply similar functionality to seed the Data. As an alternative we could look at automation of BCP file creation. There are two types of data mandatory lookup data that would also be used for QA / Production releases, and non-mandatory data, i.e. seed data, that would be used to improve basic functionality of the 3 sites.
IV. Test Scripts
This portion would need to be revisited when the time is appropriate I would like to look at solutions that would help in automating test scripts. Ideally the purpose of this phase would be to ensure all three sites are working post-merge. The easiest way to ensure proper functionality is to run automated test scripts that can return a PASS or FAIL result, rather then for each project having to manually follow a test plan.
Monday, March 19, 2012
Bad Logs
a way to delete the corrupted part of the data base and try a partial
recovery?
--
Chris DavoliAs Greg stated you are best to call MS PSS and work directly with someone
there.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
> --
> Chris Davoli
>|||what is microsoft PSS? Is there a phone or email or something?
--
Chris Davoli
"Andrew J. Kelly" wrote:
> As Greg stated you are best to call MS PSS and work directly with someone
> there.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> > Let me correct that. The data part of the database is also corrupt. Is
> > there
> > a way to delete the corrupted part of the data base and try a partial
> > recovery?
> > --
> > Chris Davoli
> >
>|||On Fri, 29 Feb 2008 18:14:00 -0800, Chris Davoli
<ChrisDavoli@.discussions.microsoft.com> wrote:
>what is microsoft PSS? Is there a phone or email or something?
Microsoft support. You start with a phone call, pay them some money
with your charge card, and go on from there. Unless of course you
already have a support contract.
Roy Harvey
Beacon Falls, CT|||"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
I would still HIGHLY recommend calling Microsoft.
However, if it's the data portion that's corrupt and not the log, the
recovery scenario may be something like this.
Back up "the tail of the log" as its called (there's a special command for
this but if you've already stopped SQL Server, I don't think you'll be able
to do this.)
Now, if you truly have a good backup from several months ago and haven't
truncated the log since then or in any other way broken the log chain, you
MIGHT be able to restore the database backup from then and then restore the
log and apply that.
HOWEVER, trying this on your own... I give about a chance of 1 in a 1000 of
working. With Microsoft helping, I think you could get this down to about 1
in a 100. In other words, not very likely. Sorry.
> --
> Chris Davoli
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||You can also try out ApexSQL Log. It may be able to recover some of the
data. Others are right though - corrupt database is deffinitely a time to
contact Microsoft support!
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
> --
> Chris Davoli
>|||http://support.microsoft.com/default.aspx?scid=fh%3BEN-US%3Bofferprophone
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:A2EC39C0-4AE9-4E86-91F4-3080E5A0D9DE@.microsoft.com...
> what is microsoft PSS? Is there a phone or email or something?
> --
> Chris Davoli
>
> "Andrew J. Kelly" wrote:
>> As Greg stated you are best to call MS PSS and work directly with someone
>> there.
>> --
>> Andrew J. Kelly SQL MVP
>> Solid Quality Mentors
>>
>> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
>> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
>> > Let me correct that. The data part of the database is also corrupt. Is
>> > there
>> > a way to delete the corrupted part of the data base and try a partial
>> > recovery?
>> > --
>> > Chris Davoli
>> >
>>|||Just to add a few tiny bits to Greg's recommendations:
> I would still HIGHLY recommend calling Microsoft.
Just to start with "I agree".
> Back up "the tail of the log" as its called (there's a special command for this but if you've
> already stopped SQL Server, I don't think you'll be able to do this.)
To backup the log of a damaged database one might have to add the NO_TRUNCATE option of the backup
command, like
BACKUP LOG dbname TO DISK = 'C:\db.trn' WITH NO_TRUNCATE
This is doable even if SQL Server has been stopped (assuming one start SQL Server again, of course
:-) ). We can even copy the ldf file(s) for a database to some other machine, create a (dummy)
database there, stop that SQL Server, delete its database files, slide in the log file(s) for this
damaged database, start that SQL Server and now do the log backup using NO_TRUNCATE. It is all about
getting the log records from the ldf file to a transaction log file.
Of course, a pre-requisite for all this is an unbroken chain of log backups...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:eNaOrq6eIHA.4696@.TK2MSFTNGP05.phx.gbl...
> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
>> Let me correct that. The data part of the database is also corrupt. Is there
>> a way to delete the corrupted part of the data base and try a partial
>> recovery?
> I would still HIGHLY recommend calling Microsoft.
> However, if it's the data portion that's corrupt and not the log, the recovery scenario may be
> something like this.
> Back up "the tail of the log" as its called (there's a special command for this but if you've
> already stopped SQL Server, I don't think you'll be able to do this.)
> Now, if you truly have a good backup from several months ago and haven't truncated the log since
> then or in any other way broken the log chain, you MIGHT be able to restore the database backup
> from then and then restore the log and apply that.
> HOWEVER, trying this on your own... I give about a chance of 1 in a 1000 of working. With
> Microsoft helping, I think you could get this down to about 1 in a 100. In other words, not very
> likely. Sorry.
>
>> --
>> Chris Davoli
>
> --
> Greg Moore
> SQL Server DBA Consulting Remote and Onsite available!
> Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:F5D8A180-8F94-4654-836B-7CBE021CD5E0@.microsoft.com...
> To backup the log of a damaged database one might have to add the
> NO_TRUNCATE option of the backup command, like
> BACKUP LOG dbname TO DISK = 'C:\db.trn' WITH NO_TRUNCATE
> This is doable even if SQL Server has been stopped (assuming one start SQL
> Server again, of course :-) ). We can even copy the ldf file(s) for a
> database to some other machine, create a (dummy) database there, stop that
> SQL Server, delete its database files, slide in the log file(s) for this
> damaged database, start that SQL Server and now do the log backup using
> NO_TRUNCATE. It is all about getting the log records from the ldf file to
> a transaction log file.
Ah, I wasn't sure that would work. (and I assume you mean delete the log
files, not both database files?)
> Of course, a pre-requisite for all this is an unbroken chain of log
> backups...
A mighty big one. ;-)
This is the sort of thing I might try on a lark if I had spare time, but for
production data, I'd definitely be calling Microsoft. Anything that Tibor
and I might say may or may not work and I can't speak for Tibor (though I'm
sure he'd agree) I'd hate to have you attempt to follow any advice I might
give in this case that makes things worse when Microsoft is very likely to
have a better idea.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message news:eNaOrq6eIHA.4696@.TK2MSFTNGP05.phx.gbl...
>> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
>> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
>> Let me correct that. The data part of the database is also corrupt. Is
>> there
>> a way to delete the corrupted part of the data base and try a partial
>> recovery?
>> I would still HIGHLY recommend calling Microsoft.
>> However, if it's the data portion that's corrupt and not the log, the
>> recovery scenario may be something like this.
>> Back up "the tail of the log" as its called (there's a special command
>> for this but if you've already stopped SQL Server, I don't think you'll
>> be able to do this.)
>> Now, if you truly have a good backup from several months ago and haven't
>> truncated the log since then or in any other way broken the log chain,
>> you MIGHT be able to restore the database backup from then and then
>> restore the log and apply that.
>> HOWEVER, trying this on your own... I give about a chance of 1 in a 1000
>> of working. With Microsoft helping, I think you could get this down to
>> about 1 in a 100. In other words, not very likely. Sorry.
>>
>> --
>> Chris Davoli
>>
>>
>> --
>> Greg Moore
>> SQL Server DBA Consulting Remote and Onsite available!
>> Email: sql (at) greenms.com
>> http://www.greenms.com/sqlserver.html
>>
>|||>> This is doable even if SQL Server has been stopped (assuming one start SQL Server again, of
>> course :-) ). We can even copy the ldf file(s) for a database to some other machine, create a
>> (dummy) database there, stop that SQL Server, delete its database files, slide in the log file(s)
>> for this damaged database, start that SQL Server and now do the log backup using NO_TRUNCATE. It
>> is all about getting the log records from the ldf file to a transaction log file.
> Ah, I wasn't sure that would work. (and I assume you mean delete the log files, not both database
> files?)
Yep, it work, and I've done that in productions. And I did indeed mean delete all database files.
Say you have a SQL Server installation that is toast, all you have is the ldf file for your critical
database. What you want to do is essentially to turn this ldf file into a log backup file. For this
you need to "get it into" a working SQL Server so you can issue a BACKUP LOG command.
So on on some working SQL Server, you create a database. The sole purpose of this is to get an entry
in "sysdatabases". The database files are not of interest for us. This is why we stop that SQL
Server and delete the database files. And now we copy the lof file from the crasched server (in the
right path, and file name, of course - it need to be the same as the log file for the "dummy"
database we created). So when we not start that SQL Server it will look like any SQL Server for
which the data files for the database are lost - but the log files are there. This is why we can
BACKUP LOG ... WITH NO_TRUNCATE against that database. :-)
> This is the sort of thing I might try on a lark if I had spare time, but for production data, I'd
> definitely be calling Microsoft. Anything that Tibor and I might say may or may not work and I
> can't speak for Tibor (though I'm sure he'd agree) I'd hate to have you attempt to follow any
> advice I might give in this case that makes things worse when Microsoft is very likely to have a
> better idea.
I absolutely agree.
If you don't know, by heart, what measures to take "Oh, that happenened - I know I can do this, I've
done it plenty of times before.", then call MS Support.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:eJdwguBfIHA.4376@.TK2MSFTNGP05.phx.gbl...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:F5D8A180-8F94-4654-836B-7CBE021CD5E0@.microsoft.com...
>> To backup the log of a damaged database one might have to add the NO_TRUNCATE option of the
>> backup command, like
>> BACKUP LOG dbname TO DISK = 'C:\db.trn' WITH NO_TRUNCATE
>> This is doable even if SQL Server has been stopped (assuming one start SQL Server again, of
>> course :-) ). We can even copy the ldf file(s) for a database to some other machine, create a
>> (dummy) database there, stop that SQL Server, delete its database files, slide in the log file(s)
>> for this damaged database, start that SQL Server and now do the log backup using NO_TRUNCATE. It
>> is all about getting the log records from the ldf file to a transaction log file.
> Ah, I wasn't sure that would work. (and I assume you mean delete the log files, not both database
> files?)
>
>> Of course, a pre-requisite for all this is an unbroken chain of log backups...
> A mighty big one. ;-)
>
> This is the sort of thing I might try on a lark if I had spare time, but for production data, I'd
> definitely be calling Microsoft. Anything that Tibor and I might say may or may not work and I
> can't speak for Tibor (though I'm sure he'd agree) I'd hate to have you attempt to follow any
> advice I might give in this case that makes things worse when Microsoft is very likely to have a
> better idea.
>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
>> news:eNaOrq6eIHA.4696@.TK2MSFTNGP05.phx.gbl...
>> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
>> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
>> Let me correct that. The data part of the database is also corrupt. Is there
>> a way to delete the corrupted part of the data base and try a partial
>> recovery?
>> I would still HIGHLY recommend calling Microsoft.
>> However, if it's the data portion that's corrupt and not the log, the recovery scenario may be
>> something like this.
>> Back up "the tail of the log" as its called (there's a special command for this but if you've
>> already stopped SQL Server, I don't think you'll be able to do this.)
>> Now, if you truly have a good backup from several months ago and haven't truncated the log since
>> then or in any other way broken the log chain, you MIGHT be able to restore the database backup
>> from then and then restore the log and apply that.
>> HOWEVER, trying this on your own... I give about a chance of 1 in a 1000 of working. With
>> Microsoft helping, I think you could get this down to about 1 in a 100. In other words, not
>> very likely. Sorry.
>>
>> --
>> Chris Davoli
>>
>>
>> --
>> Greg Moore
>> SQL Server DBA Consulting Remote and Onsite available!
>> Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
>>
>
Bad Logs
a way to delete the corrupted part of the data base and try a partial
recovery?
Chris Davoli
As Greg stated you are best to call MS PSS and work directly with someone
there.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
> --
> Chris Davoli
>
|||what is microsoft PSS? Is there a phone or email or something?
Chris Davoli
"Andrew J. Kelly" wrote:
> As Greg stated you are best to call MS PSS and work directly with someone
> there.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
> news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
>
|||On Fri, 29 Feb 2008 18:14:00 -0800, Chris Davoli
<ChrisDavoli@.discussions.microsoft.com> wrote:
>what is microsoft PSS? Is there a phone or email or something?
Microsoft support. You start with a phone call, pay them some money
with your charge card, and go on from there. Unless of course you
already have a support contract.
Roy Harvey
Beacon Falls, CT
|||"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
I would still HIGHLY recommend calling Microsoft.
However, if it's the data portion that's corrupt and not the log, the
recovery scenario may be something like this.
Back up "the tail of the log" as its called (there's a special command for
this but if you've already stopped SQL Server, I don't think you'll be able
to do this.)
Now, if you truly have a good backup from several months ago and haven't
truncated the log since then or in any other way broken the log chain, you
MIGHT be able to restore the database backup from then and then restore the
log and apply that.
HOWEVER, trying this on your own... I give about a chance of 1 in a 1000 of
working. With Microsoft helping, I think you could get this down to about 1
in a 100. In other words, not very likely. Sorry.
> --
> Chris Davoli
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
|||You can also try out ApexSQL Log. It may be able to recover some of the
data. Others are right though - corrupt database is deffinitely a time to
contact Microsoft support!
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:DE900A73-3DDD-46A8-B8E7-BC5936115264@.microsoft.com...
> Let me correct that. The data part of the database is also corrupt. Is
> there
> a way to delete the corrupted part of the data base and try a partial
> recovery?
> --
> Chris Davoli
>
|||http://support.microsoft.com/default.aspx?scid=fh%3BEN-US%3Bofferprophone
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:A2EC39C0-4AE9-4E86-91F4-3080E5A0D9DE@.microsoft.com...[vbcol=seagreen]
> what is microsoft PSS? Is there a phone or email or something?
> --
> Chris Davoli
>
> "Andrew J. Kelly" wrote:
|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:F5D8A180-8F94-4654-836B-7CBE021CD5E0@.microsoft.com...
> To backup the log of a damaged database one might have to add the
> NO_TRUNCATE option of the backup command, like
> BACKUP LOG dbname TO DISK = 'C:\db.trn' WITH NO_TRUNCATE
> This is doable even if SQL Server has been stopped (assuming one start SQL
> Server again, of course :-) ). We can even copy the ldf file(s) for a
> database to some other machine, create a (dummy) database there, stop that
> SQL Server, delete its database files, slide in the log file(s) for this
> damaged database, start that SQL Server and now do the log backup using
> NO_TRUNCATE. It is all about getting the log records from the ldf file to
> a transaction log file.
Ah, I wasn't sure that would work. (and I assume you mean delete the log
files, not both database files?)
> Of course, a pre-requisite for all this is an unbroken chain of log
> backups...
A mighty big one. ;-)
This is the sort of thing I might try on a lark if I had spare time, but for
production data, I'd definitely be calling Microsoft. Anything that Tibor
and I might say may or may not work and I can't speak for Tibor (though I'm
sure he'd agree) I'd hate to have you attempt to follow any advice I might
give in this case that makes things worse when Microsoft is very likely to
have a better idea.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message news:eNaOrq6eIHA.4696@.TK2MSFTNGP05.phx.gbl...
>