Hi,
Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
prior to the new financial year. After backing up the smaller DB, it was
reduced in size to around 5 gb. but selecting properties from the actual
database still shows it at 50gb. Would this have something to do with unused
rows, and if so how would we be able to delete them?
Just starting out with SQL, and in need of help.
Thanks in advance2 ways
a. from enterprise manager, right click on db ->all task->shrink database
you can choose either shrink database or shrink file
b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
--soonyu
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entrie
s
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unus
ed
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>|||soonyu
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:F19FF44E-BA0B-4C2E-86B3-AC3C8FDA5311@.microsoft.com...[vbcol=seagreen]
>2 ways
> a. from enterprise manager, right click on db ->all task->shrink database
> you can choose either shrink database or shrink file
> b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
> --soonyu
> "FIoater" wrote:
>|||Hi
It sounds like you need to implement some form of archiving and periodically
do this rather than waiting till it becomes a problem. As part of this you
may want to check out partitoned tables (SQL 2005) or partitioned views (SQL
2000/2005) where you can easily drop data in a partition. It may also help
speed up your searches if defined by the partitioning column (i.e. date).
John
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entrie
s
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unus
ed
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>
Showing posts with label financial. Show all posts
Showing posts with label financial. Show all posts
Thursday, March 22, 2012
DB size issues
Hi,
Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
prior to the new financial year. After backing up the smaller DB, it was
reduced in size to around 5 gb. but selecting properties from the actual
database still shows it at 50gb. Would this have something to do with unused
rows, and if so how would we be able to delete them?
Just starting out with SQL, and in need of help.
Thanks in advance2 ways
a. from enterprise manager, right click on db ->all task->shrink database
you can choose either shrink database or shrink file
b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
--soonyu
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unused
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>|||soonyu
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:F19FF44E-BA0B-4C2E-86B3-AC3C8FDA5311@.microsoft.com...
>2 ways
> a. from enterprise manager, right click on db ->all task->shrink database
> you can choose either shrink database or shrink file
> b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
> --soonyu
> "FIoater" wrote:
>> Hi,
>> Our Proxy Log DB was about 50 gb so we backed it up and deleted all
>> entries
>> prior to the new financial year. After backing up the smaller DB, it was
>> reduced in size to around 5 gb. but selecting properties from the actual
>> database still shows it at 50gb. Would this have something to do with
>> unused
>> rows, and if so how would we be able to delete them?
>> Just starting out with SQL, and in need of help.
>> Thanks in advance|||Hi
It sounds like you need to implement some form of archiving and periodically
do this rather than waiting till it becomes a problem. As part of this you
may want to check out partitoned tables (SQL 2005) or partitioned views (SQL
2000/2005) where you can easily drop data in a partition. It may also help
speed up your searches if defined by the partitioning column (i.e. date).
John
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unused
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>
Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
prior to the new financial year. After backing up the smaller DB, it was
reduced in size to around 5 gb. but selecting properties from the actual
database still shows it at 50gb. Would this have something to do with unused
rows, and if so how would we be able to delete them?
Just starting out with SQL, and in need of help.
Thanks in advance2 ways
a. from enterprise manager, right click on db ->all task->shrink database
you can choose either shrink database or shrink file
b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
--soonyu
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unused
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>|||soonyu
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:F19FF44E-BA0B-4C2E-86B3-AC3C8FDA5311@.microsoft.com...
>2 ways
> a. from enterprise manager, right click on db ->all task->shrink database
> you can choose either shrink database or shrink file
> b. from query analyzer, dbcc DBCC SHRINKDATABASE/ dbcc shrinkfile
> --soonyu
> "FIoater" wrote:
>> Hi,
>> Our Proxy Log DB was about 50 gb so we backed it up and deleted all
>> entries
>> prior to the new financial year. After backing up the smaller DB, it was
>> reduced in size to around 5 gb. but selecting properties from the actual
>> database still shows it at 50gb. Would this have something to do with
>> unused
>> rows, and if so how would we be able to delete them?
>> Just starting out with SQL, and in need of help.
>> Thanks in advance|||Hi
It sounds like you need to implement some form of archiving and periodically
do this rather than waiting till it becomes a problem. As part of this you
may want to check out partitoned tables (SQL 2005) or partitioned views (SQL
2000/2005) where you can easily drop data in a partition. It may also help
speed up your searches if defined by the partitioning column (i.e. date).
John
"FIoater" wrote:
> Hi,
> Our Proxy Log DB was about 50 gb so we backed it up and deleted all entries
> prior to the new financial year. After backing up the smaller DB, it was
> reduced in size to around 5 gb. but selecting properties from the actual
> database still shows it at 50gb. Would this have something to do with unused
> rows, and if so how would we be able to delete them?
> Just starting out with SQL, and in need of help.
> Thanks in advance
>
Sunday, February 19, 2012
db locks
Hi!
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?Gabriel
http://www.sql-server-performance.com/reducing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?Gabriel
http://www.sql-server-performance.com/reducing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
db locks
Hi!
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?
Gabriel
http://www.sql-server-performance.co...cing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?
Gabriel
http://www.sql-server-performance.co...cing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
db locks
Hi!
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?Gabriel
http://www.sql-server-performance.c...ucing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
Can you tell me what are the reasons of db locks? What
can lead to DB lock? We have 14 concurent users accessing
the same database (financial system), locks often come up
and users have to wait on each other.
Can be db lock caused by wrong DB structure (relationship
schema), by way of opening a recordset (on application
layer) or is it just case of sql server transactions
management?Gabriel
http://www.sql-server-performance.c...ucing_locks.asp
http://www.sql-server-performance.com/deadlocks.asp
http://www.sql-server-performance.com/blocking.asp
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?|||DB locks exist to ensure the data is correct...Imagine you are in a
transaction where you plan to change the price of a book from $19.99 to
$25.00.... while in the transaction, you take a phone call. Your changes
are still pending the commit of the transaction. ( what you do not yet
realize is that you mistakenly changed the price of the book to 25 cents)...
A salesman gets a call from Barnes and Noble and sells 100,000 copies of
that book for 25cents each... You complete your call, realize your mistake
and roll the transaction back.
DB locks prevent someone else from using your data which is in the process
of being changed, until the change is committed... Of course there are
other examples as well...
But locks( which serve as a traffic cop on a busy road) are always necessary
in multi-user environments.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Gabriel" <bigg@.stonline.sk> wrote in message
news:4c5c01c473b0$9e865aa0$a501280a@.phx.gbl...
> Hi!
> Can you tell me what are the reasons of db locks? What
> can lead to DB lock? We have 14 concurent users accessing
> the same database (financial system), locks often come up
> and users have to wait on each other.
> Can be db lock caused by wrong DB structure (relationship
> schema), by way of opening a recordset (on application
> layer) or is it just case of sql server transactions
> management?
Subscribe to:
Posts (Atom)