Showing posts with label hiwhen. Show all posts
Showing posts with label hiwhen. Show all posts

Tuesday, March 20, 2012

Recover Lost data files?

Hi
When we issue a DBCC SHRINKFILE with empty option, the data file
is removed and the space is alloted back to the OS.
Same way when we issue a an ALTER DATABASE to remove a database,
all the data files and transaction log files are dropped.
But can these files be recovered again by using any of the disk
recovery tools?

AchillesDBCC SHRINKFILE doesn't remove a data file it just removes unused space in a
file. ALTER DATABASE doesn't remove databases, although it can be used to
remove files (but only when they are empty of data). Since neither of these
statements actually removes any data from your database there isn't really
anything to recover. I doubt it would be feasible to restore a database to a
prior state using disk recovery tools and I definitely wouldn't recommend
you try as the likely result would be a corrupt database.

If you think you have lost some data for some reason then restoring from a
backup is your best course of action. But as I said, neither of the
statements you have mentioned should cause you to lose data even if you use
them in error.

Hope this helps.

--
David Portas
SQL Server MVP
--

Monday, February 20, 2012

Record too long when exporting

Hi
when exporting data from a sql table, the process stops with the message 'record too long'. The table has about 45,000 records and I cannot isolate which row is causing the error. The export wizard gives a row number but that row in the table looks OK
Any ideas?
Eddie
Hi
What database is this being exported to?
John
"Eddie" <Eddie@.discussions.microsoft.com> wrote in message
news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> Hi
> when exporting data from a sql table, the process stops with the message
'record too long'. The table has about 45,000 records and I cannot isolate
which row is causing the error. The export wizard gives a row number but
that row in the table looks OK
> Any ideas?
> Eddie
|||sorry
the table is being exported to a microsoft access table
"John Bell" wrote:

> Hi
> What database is this being exported to?
> John
> "Eddie" <Eddie@.discussions.microsoft.com> wrote in message
> news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> 'record too long'. The table has about 45,000 records and I cannot isolate
> which row is causing the error. The export wizard gives a row number but
> that row in the table looks OK
>
>
|||sorry
the table is being exported to a microsoft access table
"John Bell" wrote:

> Hi
> What database is this being exported to?
> John
> "Eddie" <Eddie@.discussions.microsoft.com> wrote in message
> news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> 'record too long'. The table has about 45,000 records and I cannot isolate
> which row is causing the error. The export wizard gives a row number but
> that row in the table looks OK
>
>
|||Hi Eddie
I found this on Google!
"Maximum length for a record in Access is 2000 characters, or 255 fields,
whichever comes first."
Try using looking at
SELECT ISNULL(LEN(col1),0) + ISNULL(LEN(col2),0) + ... + ISNULL(LEN(coln),0)
FROM MyTable
John
"Eddie" <Eddie@.discussions.microsoft.com> wrote in message
news:B5205172-B503-4A43-85D8-DA6A5D59323B@.microsoft.com...[vbcol=seagreen]
> sorry
> the table is being exported to a microsoft access table
> "John Bell" wrote:
message[vbcol=seagreen]
isolate[vbcol=seagreen]
but[vbcol=seagreen]

Record too long when exporting

Hi
when exporting data from a sql table, the process stops with the message 're
cord too long'. The table has about 45,000 records and I cannot isolate whic
h row is causing the error. The export wizard gives a row number but that r
ow in the table looks OK
Any ideas?
EddieHi
What database is this being exported to?
John
"Eddie" <Eddie@.discussions.microsoft.com> wrote in message
news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> Hi
> when exporting data from a sql table, the process stops with the message
'record too long'. The table has about 45,000 records and I cannot isolate
which row is causing the error. The export wizard gives a row number but
that row in the table looks OK
> Any ideas?
> Eddie|||sorry
the table is being exported to a microsoft access table
"John Bell" wrote:

> Hi
> What database is this being exported to?
> John
> "Eddie" <Eddie@.discussions.microsoft.com> wrote in message
> news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> 'record too long'. The table has about 45,000 records and I cannot isolate
> which row is causing the error. The export wizard gives a row number but
> that row in the table looks OK
>
>|||sorry
the table is being exported to a microsoft access table
"John Bell" wrote:

> Hi
> What database is this being exported to?
> John
> "Eddie" <Eddie@.discussions.microsoft.com> wrote in message
> news:B0A2509E-EE1D-471D-A48C-227EAA63C7C5@.microsoft.com...
> 'record too long'. The table has about 45,000 records and I cannot isolate
> which row is causing the error. The export wizard gives a row number but
> that row in the table looks OK
>
>|||Hi Eddie
I found this on Google!
"Maximum length for a record in Access is 2000 characters, or 255 fields,
whichever comes first."
Try using looking at
SELECT ISNULL(LEN(col1),0) + ISNULL(LEN(col2),0) + ... + ISNULL(LEN(coln),0)
FROM MyTable
John
"Eddie" <Eddie@.discussions.microsoft.com> wrote in message
news:B5205172-B503-4A43-85D8-DA6A5D59323B@.microsoft.com...[vbcol=seagreen]
> sorry
> the table is being exported to a microsoft access table
> "John Bell" wrote:
>
message[vbcol=seagreen]
isolate[vbcol=seagreen]
but[vbcol=seagreen]