Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Tuesday, March 27, 2012

Database hung after failure of large update query

I tried to run a large update query last night that did not complete.
But now I cannot access that database. In fact, when I click on Databases
in Enterprise Manager, that hangs and shows an hourglass.
I suspect that it failed due to a disc space. When I look at the process
status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'working'
on that database.
I don't really need to complete the update (partial complete would be fine).
I just need to free up the database so I can work on the database.
Any thoughts?
- Jesse
Jesse A wrote:
> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on
> Databases in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the
> process status, I see a SPID that has a wait type of PAGEIOLatch_EX
> that is 'working' on that database.
> I don't really need to complete the update (partial complete would be
> fine). I just need to free up the database so I can work on the
> database.
> Any thoughts?
There is no such thing as a partial update unless you were using batches
to perform the updates in the first place. What likely happened is that
you ran out of space and SQL Server may be in the process of rolling
back the transaction (which can take just as long as the original update
took).
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||If u dont want any transaction for that particular SPID then u will kill the
particular process by KILL SPID
hope this will help
Herbert
"Jesse A" wrote:

> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on Databases
> in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the process
> status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'working'
> on that database.
> I don't really need to complete the update (partial complete would be fine).
> I just need to free up the database so I can work on the database.
> Any thoughts?
> --
> - Jesse

Database hung after failure of large update query

I tried to run a large update query last night that did not complete.
But now I cannot access that database. In fact, when I click on Databases
in Enterprise Manager, that hangs and shows an hourglass.
I suspect that it failed due to a disc space. When I look at the process
status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'working'
on that database.
I don't really need to complete the update (partial complete would be fine).
I just need to free up the database so I can work on the database.
Any thoughts?
--
- JesseJesse A wrote:
> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on
> Databases in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the
> process status, I see a SPID that has a wait type of PAGEIOLatch_EX
> that is 'working' on that database.
> I don't really need to complete the update (partial complete would be
> fine). I just need to free up the database so I can work on the
> database.
> Any thoughts?
There is no such thing as a partial update unless you were using batches
to perform the updates in the first place. What likely happened is that
you ran out of space and SQL Server may be in the process of rolling
back the transaction (which can take just as long as the original update
took).
David Gugick
Quest Software
www.imceda.com
www.quest.com|||If u dont want any transaction for that particular SPID then u will kill the
particular process by KILL SPID
hope this will help
--
Herbert
"Jesse A" wrote:
> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on Databases
> in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the process
> status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'working'
> on that database.
> I don't really need to complete the update (partial complete would be fine).
> I just need to free up the database so I can work on the database.
> Any thoughts?
> --
> - Jesse

Database hung after failure of large update query

I tried to run a large update query last night that did not complete.
But now I cannot access that database. In fact, when I click on Databases
in Enterprise Manager, that hangs and shows an hourglass.
I suspect that it failed due to a disc space. When I look at the process
status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'working
'
on that database.
I don't really need to complete the update (partial complete would be fine).
I just need to free up the database so I can work on the database.
Any thoughts?
--
- JesseJesse A wrote:
> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on
> Databases in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the
> process status, I see a SPID that has a wait type of PAGEIOLatch_EX
> that is 'working' on that database.
> I don't really need to complete the update (partial complete would be
> fine). I just need to free up the database so I can work on the
> database.
> Any thoughts?
There is no such thing as a partial update unless you were using batches
to perform the updates in the first place. What likely happened is that
you ran out of space and SQL Server may be in the process of rolling
back the transaction (which can take just as long as the original update
took).
David Gugick
Quest Software
www.imceda.com
www.quest.com|||If u dont want any transaction for that particular SPID then u will kill the
particular process by KILL SPID
hope this will help
Herbert
"Jesse A" wrote:

> I tried to run a large update query last night that did not complete.
> But now I cannot access that database. In fact, when I click on Database
s
> in Enterprise Manager, that hangs and shows an hourglass.
> I suspect that it failed due to a disc space. When I look at the process
> status, I see a SPID that has a wait type of PAGEIOLatch_EX that is 'worki
ng'
> on that database.
> I don't really need to complete the update (partial complete would be fine
).
> I just need to free up the database so I can work on the database.
> Any thoughts?
> --
> - Jessesql

Sunday, March 25, 2012

Database free space vs. Table unused space

Hi,
I've had a query from an analyst regarding database free space and table
unused space. We have a database made up of 3 filegroups; with total sizes
of 100GB, 25GB, & 27GB , and free space is reported as 65MB, 70MB, & 2MB
respectively.
Now, if he executes "sp_spaceused" against one specific table that he's
working with (trying to reduce size by improving purging routines, etc), the
n
it reports the data and index sizes, but also reports over 2GB of "unused
space". This is after running an updateusage, etc.
What is this referring to? Can it be freed to the OS? Why does it not show
in the database free space (as obviously 2GB unused space can't fit in this
database's free space)? Any light shed on this would be appreciated.
Thanks,
daveThe unused value reported by sp_spaceused are pages on extents that are owne
d by that particular
objects, but the pages are currently not in use. So the pages can be used by
the object that owns
the extent in question but not by other extents.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DavidCur" <cdf_nospam_@.webmail.co.za> wrote in message
news:2F6AA526-E215-4EC7-AEBA-7C454F937FC4@.microsoft.com...
> Hi,
> I've had a query from an analyst regarding database free space and table
> unused space. We have a database made up of 3 filegroups; with total size
s
> of 100GB, 25GB, & 27GB , and free space is reported as 65MB, 70MB, & 2MB
> respectively.
> Now, if he executes "sp_spaceused" against one specific table that he's
> working with (trying to reduce size by improving purging routines, etc), t
hen
> it reports the data and index sizes, but also reports over 2GB of "unused
> space". This is after running an updateusage, etc.
> What is this referring to? Can it be freed to the OS? Why does it not sh
ow
> in the database free space (as obviously 2GB unused space can't fit in thi
s
> database's free space)? Any light shed on this would be appreciated.
> Thanks,
> dave|||"Tibor Karaszi" wrote:

> The unused value reported by sp_spaceused are pages on extents that are ow
ned by that particular
> objects, but the pages are currently not in use. So the pages can be used
by the object that owns
> the extent in question but not by other extents.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
Yes, I understand that - but I wanted to know if there was a way to free
that unused space up? What governs how much unused space a table has? Has
it got something to do with the FILLFACTOR of indexes? I'm just trying to
understand how this table can have so much (>2GB) unused space.
Thanks,
dave|||Higher fillfactor will mean less pages. But I don't think that less fuller p
ages will add to the
unused value. I believe that only not allocated pages on uniform extents wil
l. Check out the source
code for sp_spaceused (etc.) to be certain. I guess that an index rebuild (o
r reorg) can less the
unused value.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DavidCur" <cdf_nospam_@.webmail.co.za> wrote in message
news:EDD26B2C-1B3C-43AF-911D-2BAD4486C373@.microsoft.com...
> "Tibor Karaszi" wrote:
>
>
> Yes, I understand that - but I wanted to know if there was a way to free
> that unused space up? What governs how much unused space a table has? Ha
s
> it got something to do with the FILLFACTOR of indexes? I'm just trying to
> understand how this table can have so much (>2GB) unused space.
> Thanks,
> dave

Database free space vs. Table unused space

Hi,
I've had a query from an analyst regarding database free space and table
unused space. We have a database made up of 3 filegroups; with total sizes
of 100GB, 25GB, & 27GB , and free space is reported as 65MB, 70MB, & 2MB
respectively.
Now, if he executes "sp_spaceused" against one specific table that he's
working with (trying to reduce size by improving purging routines, etc), then
it reports the data and index sizes, but also reports over 2GB of "unused
space". This is after running an updateusage, etc.
What is this referring to? Can it be freed to the OS? Why does it not show
in the database free space (as obviously 2GB unused space can't fit in this
database's free space)? Any light shed on this would be appreciated.
Thanks,
daveThe unused value reported by sp_spaceused are pages on extents that are owned by that particular
objects, but the pages are currently not in use. So the pages can be used by the object that owns
the extent in question but not by other extents.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DavidCur" <cdf_nospam_@.webmail.co.za> wrote in message
news:2F6AA526-E215-4EC7-AEBA-7C454F937FC4@.microsoft.com...
> Hi,
> I've had a query from an analyst regarding database free space and table
> unused space. We have a database made up of 3 filegroups; with total sizes
> of 100GB, 25GB, & 27GB , and free space is reported as 65MB, 70MB, & 2MB
> respectively.
> Now, if he executes "sp_spaceused" against one specific table that he's
> working with (trying to reduce size by improving purging routines, etc), then
> it reports the data and index sizes, but also reports over 2GB of "unused
> space". This is after running an updateusage, etc.
> What is this referring to? Can it be freed to the OS? Why does it not show
> in the database free space (as obviously 2GB unused space can't fit in this
> database's free space)? Any light shed on this would be appreciated.
> Thanks,
> dave|||"Tibor Karaszi" wrote:
> The unused value reported by sp_spaceused are pages on extents that are owned by that particular
> objects, but the pages are currently not in use. So the pages can be used by the object that owns
> the extent in question but not by other extents.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
Yes, I understand that - but I wanted to know if there was a way to free
that unused space up? What governs how much unused space a table has? Has
it got something to do with the FILLFACTOR of indexes? I'm just trying to
understand how this table can have so much (>2GB) unused space.
Thanks,
dave|||Higher fillfactor will mean less pages. But I don't think that less fuller pages will add to the
unused value. I believe that only not allocated pages on uniform extents will. Check out the source
code for sp_spaceused (etc.) to be certain. I guess that an index rebuild (or reorg) can less the
unused value.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DavidCur" <cdf_nospam_@.webmail.co.za> wrote in message
news:EDD26B2C-1B3C-43AF-911D-2BAD4486C373@.microsoft.com...
> "Tibor Karaszi" wrote:
>> The unused value reported by sp_spaceused are pages on extents that are owned by that particular
>> objects, but the pages are currently not in use. So the pages can be used by the object that owns
>> the extent in question but not by other extents.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>
> Yes, I understand that - but I wanted to know if there was a way to free
> that unused space up? What governs how much unused space a table has? Has
> it got something to do with the FILLFACTOR of indexes? I'm just trying to
> understand how this table can have so much (>2GB) unused space.
> Thanks,
> davesql

Monday, March 19, 2012

Database dropdown, Query Analyzer

I didn't see my previous post in the last half hour, so reposting again.
Ok. Whenever I have to switch to a different database in my DEV server, if I
click the dropdown box, it takes for ever to show the list of databases on
that server.I tried few things, but didn't work. I truncated the Log files,
Shrink database & log files. Any clues how this can be rectified. Or any
pointers or corners I haven't looked at.
Have you looked to see if your request is blocked? Sometimes the system
tables can be blocked during database changes.
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>
|||This happens every time I try to switch to a different database. I have
checked for open/ blocked transactions but there are none.
"Danny" wrote:

> Have you looked to see if your request is blocked? Sometimes the system
> tables can be blocked during database changes.
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>
>
|||Check to ensure the 'auto close' option is off in all databases. This
option can elongate database enumeration.
Hope this helps.
Dan Guzman
SQL Server MVP
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>
|||Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted by QA and execute that
same TSQL from a QA query Window?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>
|||I found the problem and fixed it. Thanks for your time for helping me to
resolve this.
This also helped me.
http://www.sqlservercentral.com/foru...ssageid=206193
"Tibor Karaszi" wrote:

> Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted by QA and execute that
> same TSQL from a QA query Window?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>
>
|||Can you say what the problem was? The link doesn't work if you're not a member...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:F510727E-F5E7-4545-9BD4-3169D600A440@.microsoft.com...[vbcol=seagreen]
>I found the problem and fixed it. Thanks for your time for helping me to
> resolve this.
> This also helped me.
> http://www.sqlservercentral.com/foru...ssageid=206193
> "Tibor Karaszi" wrote:

Database dropdown, Query Analyzer

I didn't see my previous post in the last half hour, so reposting again.
Ok. Whenever I have to switch to a different database in my DEV server, if I
click the dropdown box, it takes for ever to show the list of databases on
that server.I tried few things, but didn't work. I truncated the Log files,
Shrink database & log files. Any clues how this can be rectified. Or any
pointers or corners I haven't looked at.Have you looked to see if your request is blocked? Sometimes the system
tables can be blocked during database changes.
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||This happens every time I try to switch to a different database. I have
checked for open/ blocked transactions but there are none.
"Danny" wrote:

> Have you looked to see if your request is blocked? Sometimes the system
> tables can be blocked during database changes.
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>
>|||Check to ensure the 'auto close' option is off in all databases. This
option can elongate database enumeration.
Hope this helps.
Dan Guzman
SQL Server MVP
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted
by QA and execute that
same TSQL from a QA query Window?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log files
,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||I found the problem and fixed it. Thanks for your time for helping me to
resolve this.
This also helped me.
[url]http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=206193[
/url]
"Tibor Karaszi" wrote:

> Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitt
ed by QA and execute that
> same TSQL from a QA query Window?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>
>|||Can you say what the problem was? The link doesn't work if you're not a memb
er...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:F510727E-F5E7-4545-9BD4-3169D600A440@.microsoft.com...[vbcol=seagreen]
>I found the problem and fixed it. Thanks for your time for helping me to
> resolve this.
> This also helped me.
> http://www.sqlservercentral.com/for...=20619
3
> "Tibor Karaszi" wrote:
>

Database dropdown, Query Analyzer

I didn't see my previous post in the last half hour, so reposting again.
Ok. Whenever I have to switch to a different database in my DEV server, if I
click the dropdown box, it takes for ever to show the list of databases on
that server.I tried few things, but didn't work. I truncated the Log files,
Shrink database & log files. Any clues how this can be rectified. Or any
pointers or corners I haven't looked at.Have you looked to see if your request is blocked? Sometimes the system
tables can be blocked during database changes.
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||This happens every time I try to switch to a different database. I have
checked for open/ blocked transactions but there are none.
"Danny" wrote:
> Have you looked to see if your request is blocked? Sometimes the system
> tables can be blocked during database changes.
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
> >I didn't see my previous post in the last half hour, so reposting again.
> >
> > Ok. Whenever I have to switch to a different database in my DEV server, if
> > I
> > click the dropdown box, it takes for ever to show the list of databases on
> > that server.I tried few things, but didn't work. I truncated the Log
> > files,
> > Shrink database & log files. Any clues how this can be rectified. Or any
> > pointers or corners I haven't looked at.
> >
>
>|||Check to ensure the 'auto close' option is off in all databases. This
option can elongate database enumeration.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if
> I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log
> files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted by QA and execute that
same TSQL from a QA query Window?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>I didn't see my previous post in the last half hour, so reposting again.
> Ok. Whenever I have to switch to a different database in my DEV server, if I
> click the dropdown box, it takes for ever to show the list of databases on
> that server.I tried few things, but didn't work. I truncated the Log files,
> Shrink database & log files. Any clues how this can be rectified. Or any
> pointers or corners I haven't looked at.
>|||I found the problem and fixed it. Thanks for your time for helping me to
resolve this.
This also helped me.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=206193
"Tibor Karaszi" wrote:
> Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted by QA and execute that
> same TSQL from a QA query Window?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "S" <S@.discussions.microsoft.com> wrote in message
> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
> >I didn't see my previous post in the last half hour, so reposting again.
> >
> > Ok. Whenever I have to switch to a different database in my DEV server, if I
> > click the dropdown box, it takes for ever to show the list of databases on
> > that server.I tried few things, but didn't work. I truncated the Log files,
> > Shrink database & log files. Any clues how this can be rectified. Or any
> > pointers or corners I haven't looked at.
> >
>
>|||Can you say what the problem was? The link doesn't work if you're not a member...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S" <S@.discussions.microsoft.com> wrote in message
news:F510727E-F5E7-4545-9BD4-3169D600A440@.microsoft.com...
>I found the problem and fixed it. Thanks for your time for helping me to
> resolve this.
> This also helped me.
> http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=206193
> "Tibor Karaszi" wrote:
>> Did you run a Profiler trace, like Kalen suggested, catch the TSQL submitted by QA and execute
>> that
>> same TSQL from a QA query Window?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "S" <S@.discussions.microsoft.com> wrote in message
>> news:5015D71C-05CA-47F5-9950-C63C25DE830B@.microsoft.com...
>> >I didn't see my previous post in the last half hour, so reposting again.
>> >
>> > Ok. Whenever I have to switch to a different database in my DEV server, if I
>> > click the dropdown box, it takes for ever to show the list of databases on
>> > that server.I tried few things, but didn't work. I truncated the Log files,
>> > Shrink database & log files. Any clues how this can be rectified. Or any
>> > pointers or corners I haven't looked at.
>> >
>>

Friday, February 17, 2012

Database damage

Hello there
I tried to run simple query on one of my database.
Afrer 5 hours of work i tried to stop it and the sql didn't let me to stop.
Therefore i had do shut down the server and run it again.
When i run it again the server has come up and the database become gray with
(suspect).
The database cannot be used any more, and on the log file it seems that it
could not be recovered.
What i need to do now to recover the database ?Which version of SQL Server are you using?
Are there any error messages from the SQL Server error log?
Do you have a backup of the database?
Martin C K Poon
Senior Analyst Programmer
====================================
"Roy Goldhammer" <roy@.hotmail.com> bl
news:OMOcPVHiGHA.4044@.TK2MSFTNGP03.phx.gbl g...
> Hello there
> I tried to run simple query on one of my database.
> Afrer 5 hours of work i tried to stop it and the sql didn't let me to
stop.
> Therefore i had do shut down the server and run it again.
> When i run it again the server has come up and the database become gray
with
> (suspect).
> The database cannot be used any more, and on the log file it seems that it
> could not be recovered.
> What i need to do now to recover the database ?
>

Database damage

Hello there
I tried to run simple query on one of my database.
Afrer 5 hours of work i tried to stop it and the sql didn't let me to stop.
Therefore i had do shut down the server and run it again.
When i run it again the server has come up and the database become gray with
(suspect).
The database cannot be used any more, and on the log file it seems that it
could not be recovered.
What i need to do now to recover the database ?Could you post the error messages from the SQL Server error log? It can be
located in the MSSQL\Log folder in your installation directory
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:uTrUGnHiGHA.1276@.TK2MSFTNGP03.phx.gbl...
Hello there
I tried to run simple query on one of my database.
Afrer 5 hours of work i tried to stop it and the sql didn't let me to stop.
Therefore i had do shut down the server and run it again.
When i run it again the server has come up and the database become gray with
(suspect).
The database cannot be used any more, and on the log file it seems that it
could not be recovered.
What i need to do now to recover the database ?|||Whell Narayana
After i detach the database and tried to reattach i got the error: 823 error
id (Bad page Id)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:u$%239wmKiGHA.4892@.TK2MSFTNGP02.phx.gbl...
> Could you post the error messages from the SQL Server error log? It can be
> located in the MSSQL\Log folder in your installation directory
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Roy Goldhammer" <roy@.hotmail.com> wrote in message
> news:uTrUGnHiGHA.1276@.TK2MSFTNGP03.phx.gbl...
> Hello there
> I tried to run simple query on one of my database.
> Afrer 5 hours of work i tried to stop it and the sql didn't let me to
> stop.
> Therefore i had do shut down the server and run it again.
> When i run it again the server has come up and the database become gray
> with
> (suspect).
> The database cannot be used any more, and on the log file it seems that it
> could not be recovered.
> What i need to do now to recover the database ?
>
>
>

Database damage

Hello there
I tried to run simple query on one of my database.
Afrer 5 hours of work i tried to stop it and the sql didn't let me to stop.
Therefore i had do shut down the server and run it again.
When i run it again the server has come up and the database become gray with
(suspect).
The database cannot be used any more, and on the log file it seems that it
could not be recovered.
What i need to do now to recover the database ?Could you post the error messages from the SQL Server error log? It can be
located in the MSSQL\Log folder in your installation directory
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:uTrUGnHiGHA.1276@.TK2MSFTNGP03.phx.gbl...
Hello there
I tried to run simple query on one of my database.
Afrer 5 hours of work i tried to stop it and the sql didn't let me to stop.
Therefore i had do shut down the server and run it again.
When i run it again the server has come up and the database become gray with
(suspect).
The database cannot be used any more, and on the log file it seems that it
could not be recovered.
What i need to do now to recover the database ?|||Whell Narayana
After i detach the database and tried to reattach i got the error: 823 error
id (Bad page Id)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:u$%239wmKiGHA.4892@.TK2MSFTNGP02.phx.gbl...
> Could you post the error messages from the SQL Server error log? It can be
> located in the MSSQL\Log folder in your installation directory
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Roy Goldhammer" <roy@.hotmail.com> wrote in message
> news:uTrUGnHiGHA.1276@.TK2MSFTNGP03.phx.gbl...
> Hello there
> I tried to run simple query on one of my database.
> Afrer 5 hours of work i tried to stop it and the sql didn't let me to
> stop.
> Therefore i had do shut down the server and run it again.
> When i run it again the server has come up and the database become gray
> with
> (suspect).
> The database cannot be used any more, and on the log file it seems that it
> could not be recovered.
> What i need to do now to recover the database ?
>
>
>

database creation in XP

I am an SQL beginer, and have installed SQL 2000 in Windows XP SP2. Only the client components of SQL were installed by default in XP. SQL query analyser doesnot detect any servers (I already have IIS installed). In such a scenario how do I create a Database and gain access to it ?Do you know SQL server name?|||

Quote:

Originally Posted by iburyak

Do you know SQL server name?


No. The SQL Query analyser doesnot show any available servers. Also I am not connected to any networked PC. I wish to connect to the local/virtual server in IIS in C drive. I have an ASP.Net application in my wwwroot forlder for which I need to create a database to store and access data. Please note that while installing SQL server in XP I was prompted with the following message: "Microsoft SQL Server 2000 Enterprise Edition server component is not suported on this operating system. Only client components will be available for installation". Also due to this reason the MSSQL server service has not been installed.|||IIS server is a web server and not SQL server.
As far as I understand you didn't install SQL server at all and this is why you can't connect to it.

The only option you have is to use Access database instead. Go to Microsoft Office and you will be able to find it.|||

Quote:

Originally Posted by iburyak

IIS server is a web server and not SQL server.
As far as I understand you didn't install SQL server at all and this is why you can't connect to it.

The only option you have is to use Access database instead. Go to Microsoft Office and you will be able to find it.


Yes you were right. Although SQL was installed the server components were not installed. I have added the server components and now its working fine.
Thanks a lot.

database creation

hi

if i open the management studio express and trying to create a database by right clicking the server name and trying in the new query window,im getting error as

CREATE DATABASE permission denied in database 'master'.

can anyone help me in rectifying this error?

Thanks in advance

It seems as though your login does not have permission to create a new database.

Log in as the administrator, and give your login the appropriate priviledges.

|||

hi arnie

thank you for your answer

I found another error as

when i opened the management express in windows authentication mode and tried to create table thats also did'nt work

after that i saw that i did'nt install the service pack 2

now the problem is solved after installing the SP2

i created my login and its working fine

thank you for ur response

thanks,

Poorani

Tuesday, February 14, 2012

Database corruption from simple query

Hi- I have questions about mobile database limits. The application is entirely C# / Compact Framework 2.0, using VS2005. Devices we support are all running WM5. We're trying to incorporate what seems to be a large database that the application needs to talk to offline from any network, so it needs to be stored & hosted within the database and hence we started working with the various generations of what is now SQL Server Compact Edition.

In order to profile the responsiveness I worked up a test database with the general collection of fields we are interested in. The main table has 80,000 rows with one primary key and one of the numeric fields indexed. There is a 'nickname' table which contains about 150,000 items with just a string for a nickname and the key that nickname goes with. With all the rows and an alpha index for the nickname field the database is about 42 mb. Which is pushing the amount of storage on the handheld, but of our two models one is fine and one still has about 30 mb free with the DB on the handheld.

My problem seems to be that one kind of device can work with this database and one cannot. The device I was using the prototype the application is a HP iPAC hx2490b. On that device more than once I have corrupted the database, but not yet as a reproducible process.

My other device is a Dell Axim X51. On that device I seem to corrupt the database with very simple actions. Just now I tried a query like (From the Query Analyzer 3.0)

Code Snippet

Select * from ReagentNicknamesTable where alt_names like 'alpha%'



Which should hit 2099 of the 150,000 records. I got about 400 back and then the table was corrupted. On this device I cannot recover the database as there isn't enough disk space for two copies of the DB. So corruption in the field would be a showstopper. But getting corruption from a simple query like this means I really can't use SSCE.

This problem with the dell showed up when I was using the original device sql that came with VS2005. (SQL Server Mobile?) The cabs & dll's were dated from 2005 and had a build number of 3.0.5206.0. I have since updated to the current version of SQL Server Compact Edition and the dlls have build number 3.0.5300.0. The IDE is set to Compact Framwork 2.0, sp1: cgacutil reports CF 2.0.6129.0.

So help! Have I hit some listed or unlisted limits to SSCE on the Compact Framework? thanks.

So on the Dell handheld, I did a hard reset, redeployed everything and copied a fresh copy of the DB onto the handheld.

Running the above query from the QA yielded the same error. But this time I was able to copy the text before I moved on.

Here is the result:

400 row(s) affected
FAILED: Select * from ReagentNicknamesTable where alt_names like 'alpha%'
Error: 80004005 Unspecified error
Error: 0x80004005 E_FAIL
Native Error: (25017)
Description: The database file may be corrupted. Run the repair utility to check the database file. [,,,Database name,,]
Interface defining error: IID_IRowset
Param. 0: 0
Param. 1: 0
Param. 2: 0
Param. 3: My Documents\ChemistryLabacus\data\ReagentDatabase.sdf
Param. 4:
Param. 5:

Running this exact query on the HP iPAC yields the 2099 rows that match this query.
|||

Try to move the SDF file and the "temp path" to a storage card.

So your connection string would look something like:

"Data Source=\Storage Card\database.sdf;temp path=\Storage Card"

|||Thanks for the reply. But, simply fixing the database is not really the issue. I could do it on a different handheld (the HP) that just ships with more memory. Or, I imagine, on a desktop with the desktop version of SSCE. The real question is why I get corruption in the first place. And why on the Dell but not the HP, when as far as I can tell they are running the same OS & DB engine.

Since my post yesterday we have culled the main database down to one that is is smaller (45k rows in the main table & 77k rows in the nickname index table.) This database is 20 mb with indexes. So far it has not shown corruption on the Dell.

The main reason that I'm hung up on the corruption issue (other than that it is annoying) is that we have a body of users who have these Dell handhelds and I'm supposed to build a release with this database to send to them. I would like some confirmation of good practices to avoid the corruption in the first place. Are there articles or forums who discuss the capacities and limitations of SSCE under WM5?
|||

Check your program memory, if it's too low it could crash. Happened to me many times, and it gives an empty exception message.

|||Thanks. I will look into that.

Database corruption from simple query

Hi- I have questions about mobile database limits. The application is entirely C# / Compact Framework 2.0, using VS2005. Devices we support are all running WM5. We're trying to incorporate what seems to be a large database that the application needs to talk to offline from any network, so it needs to be stored & hosted within the database and hence we started working with the various generations of what is now SQL Server Compact Edition.

In order to profile the responsiveness I worked up a test database with the general collection of fields we are interested in. The main table has 80,000 rows with one primary key and one of the numeric fields indexed. There is a 'nickname' table which contains about 150,000 items with just a string for a nickname and the key that nickname goes with. With all the rows and an alpha index for the nickname field the database is about 42 mb. Which is pushing the amount of storage on the handheld, but of our two models one is fine and one still has about 30 mb free with the DB on the handheld.

My problem seems to be that one kind of device can work with this database and one cannot. The device I was using the prototype the application is a HP iPAC hx2490b. On that device more than once I have corrupted the database, but not yet as a reproducible process.

My other device is a Dell Axim X51. On that device I seem to corrupt the database with very simple actions. Just now I tried a query like (From the Query Analyzer 3.0)

Code Snippet

Select * from ReagentNicknamesTable where alt_names like 'alpha%'



Which should hit 2099 of the 150,000 records. I got about 400 back and then the table was corrupted. On this device I cannot recover the database as there isn't enough disk space for two copies of the DB. So corruption in the field would be a showstopper. But getting corruption from a simple query like this means I really can't use SSCE.

This problem with the dell showed up when I was using the original device sql that came with VS2005. (SQL Server Mobile?) The cabs & dll's were dated from 2005 and had a build number of 3.0.5206.0. I have since updated to the current version of SQL Server Compact Edition and the dlls have build number 3.0.5300.0. The IDE is set to Compact Framwork 2.0, sp1: cgacutil reports CF 2.0.6129.0.

So help! Have I hit some listed or unlisted limits to SSCE on the Compact Framework? thanks.

So on the Dell handheld, I did a hard reset, redeployed everything and copied a fresh copy of the DB onto the handheld.

Running the above query from the QA yielded the same error. But this time I was able to copy the text before I moved on.

Here is the result:

400 row(s) affected
FAILED: Select * from ReagentNicknamesTable where alt_names like 'alpha%'
Error: 80004005 Unspecified error
Error: 0x80004005 E_FAIL
Native Error: (25017)
Description: The database file may be corrupted. Run the repair utility to check the database file. [,,,Database name,,]
Interface defining error: IID_IRowset
Param. 0: 0
Param. 1: 0
Param. 2: 0
Param. 3: My Documents\ChemistryLabacus\data\ReagentDatabase.sdf
Param. 4:
Param. 5:

Running this exact query on the HP iPAC yields the 2099 rows that match this query.
|||

Try to move the SDF file and the "temp path" to a storage card.

So your connection string would look something like:

"Data Source=\Storage Card\database.sdf;temp path=\Storage Card"

|||Thanks for the reply. But, simply fixing the database is not really the issue. I could do it on a different handheld (the HP) that just ships with more memory. Or, I imagine, on a desktop with the desktop version of SSCE. The real question is why I get corruption in the first place. And why on the Dell but not the HP, when as far as I can tell they are running the same OS & DB engine.

Since my post yesterday we have culled the main database down to one that is is smaller (45k rows in the main table & 77k rows in the nickname index table.) This database is 20 mb with indexes. So far it has not shown corruption on the Dell.

The main reason that I'm hung up on the corruption issue (other than that it is annoying) is that we have a body of users who have these Dell handhelds and I'm supposed to build a release with this database to send to them. I would like some confirmation of good practices to avoid the corruption in the first place. Are there articles or forums who discuss the capacities and limitations of SSCE under WM5?
|||

Check your program memory, if it's too low it could crash. Happened to me many times, and it gives an empty exception message.

|||Thanks. I will look into that.

Database corruption from simple query

Hi- I have questions about mobile database limits. The application is entirely C# / Compact Framework 2.0, using VS2005. Devices we support are all running WM5. We're trying to incorporate what seems to be a large database that the application needs to talk to offline from any network, so it needs to be stored & hosted within the database and hence we started working with the various generations of what is now SQL Server Compact Edition.

In order to profile the responsiveness I worked up a test database with the general collection of fields we are interested in. The main table has 80,000 rows with one primary key and one of the numeric fields indexed. There is a 'nickname' table which contains about 150,000 items with just a string for a nickname and the key that nickname goes with. With all the rows and an alpha index for the nickname field the database is about 42 mb. Which is pushing the amount of storage on the handheld, but of our two models one is fine and one still has about 30 mb free with the DB on the handheld.

My problem seems to be that one kind of device can work with this database and one cannot. The device I was using the prototype the application is a HP iPAC hx2490b. On that device more than once I have corrupted the database, but not yet as a reproducible process.

My other device is a Dell Axim X51. On that device I seem to corrupt the database with very simple actions. Just now I tried a query like (From the Query Analyzer 3.0)

Code Snippet

Select * from ReagentNicknamesTable where alt_names like 'alpha%'



Which should hit 2099 of the 150,000 records. I got about 400 back and then the table was corrupted. On this device I cannot recover the database as there isn't enough disk space for two copies of the DB. So corruption in the field would be a showstopper. But getting corruption from a simple query like this means I really can't use SSCE.

This problem with the dell showed up when I was using the original device sql that came with VS2005. (SQL Server Mobile?) The cabs & dll's were dated from 2005 and had a build number of 3.0.5206.0. I have since updated to the current version of SQL Server Compact Edition and the dlls have build number 3.0.5300.0. The IDE is set to Compact Framwork 2.0, sp1: cgacutil reports CF 2.0.6129.0.

So help! Have I hit some listed or unlisted limits to SSCE on the Compact Framework? thanks.

So on the Dell handheld, I did a hard reset, redeployed everything and copied a fresh copy of the DB onto the handheld.

Running the above query from the QA yielded the same error. But this time I was able to copy the text before I moved on.

Here is the result:

400 row(s) affected
FAILED: Select * from ReagentNicknamesTable where alt_names like 'alpha%'
Error: 80004005 Unspecified error
Error: 0x80004005 E_FAIL
Native Error: (25017)
Description: The database file may be corrupted. Run the repair utility to check the database file. [,,,Database name,,]
Interface defining error: IID_IRowset
Param. 0: 0
Param. 1: 0
Param. 2: 0
Param. 3: My Documents\ChemistryLabacus\data\ReagentDatabase.sdf
Param. 4:
Param. 5:

Running this exact query on the HP iPAC yields the 2099 rows that match this query.
|||

Try to move the SDF file and the "temp path" to a storage card.

So your connection string would look something like:

"Data Source=\Storage Card\database.sdf;temp path=\Storage Card"

|||Thanks for the reply. But, simply fixing the database is not really the issue. I could do it on a different handheld (the HP) that just ships with more memory. Or, I imagine, on a desktop with the desktop version of SSCE. The real question is why I get corruption in the first place. And why on the Dell but not the HP, when as far as I can tell they are running the same OS & DB engine.

Since my post yesterday we have culled the main database down to one that is is smaller (45k rows in the main table & 77k rows in the nickname index table.) This database is 20 mb with indexes. So far it has not shown corruption on the Dell.

The main reason that I'm hung up on the corruption issue (other than that it is annoying) is that we have a body of users who have these Dell handhelds and I'm supposed to build a release with this database to send to them. I would like some confirmation of good practices to avoid the corruption in the first place. Are there articles or forums who discuss the capacities and limitations of SSCE under WM5?
|||

Check your program memory, if it's too low it could crash. Happened to me many times, and it gives an empty exception message.

|||Thanks. I will look into that.