Wednesday, March 28, 2012
how to remove reference of a table from all stored procs
I am working on SQL SERVER 2000 DATABASE.
Is there any quick way to Drop the table say TABLE1 from the Database and
remove its reference from all stored procs(about 100 Stored Proc's)
Pls help me asap.
Regards,
EktaI'm afraid not. You need to work through your procedures and see which refer
enced the table and
adjust the proc code for each to your liking. You can get some help in findi
ng which procedures
referencing your tables, for instance:
SELECT object_name(id) FROM syscomments WHERE text like '%procname%'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"ekta" <enahar@.hotmail.com> wrote in message news:e02qRhY2HHA.5980@.TK2MSFTNGP04.phx.gbl...[v
bcol=seagreen]
> Hello All
> I am working on SQL SERVER 2000 DATABASE.
> Is there any quick way to Drop the table say TABLE1 from the Database and
remove its reference
> from all stored procs(about 100 Stored Proc's)
> Pls help me asap.
> Regards,
> Ekta
>[/vbcol]
How to Remove Merge Replication?
I have setup Merge Replication (Push) & we are using SQL2000 sp3.
After testing a few things, I disabled the Publication. This did not remove
Subscription on the other Server.
I have a task stuck in Subcriptions, under Replication on SQL.
It Shows the Task as 'Running' Status and Last Action as 'Syncronization in
Progress'
Now I am not able to delete the table in the subscriber also, as it says
'This table has been setup from Replication'
Please suggest.
Thanks,
Anukul
You can use sp_removedbreplication 'dbname' on publisher and subscriber to
remove the system tables associated with replication.
If needed, there is a stored procedure to remove the replication setting on
a table called sp_MSunmarkreplinfo which takes a tablename as a parameter.
Alternatively, setting replinfo to 0 in sysobjects for the particular table
should do it.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul:
I did try this procedure & was able to remove the system tables, including
the Job I mentioned. But it was still not letting us alter the structure or
drop the tables on which Replication was setup.
Please let me know what am I doing wrong.
Regards,
Anukul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OHL64kGAFHA.1396@.tk2msftngp13.phx.gbl...
> You can use sp_removedbreplication 'dbname' on publisher and subscriber to
> remove the system tables associated with replication.
> If needed, there is a stored procedure to remove the replication setting
on
> a table called sp_MSunmarkreplinfo which takes a tablename as a parameter.
> Alternatively, setting replinfo to 0 in sysobjects for the particular
table
> should do it.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Anukul,
did you try sp_MSunmarkreplinfo?
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul:
I did try that one out also & BTW I am now able to remove Subscriber.
Thanks a Lot for ur help.
Regards,
Anukul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:155e01c5023b$3917e340$a501280a@.phx.gbl...
> Anukul,
> did you try sp_MSunmarkreplinfo?
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||I would be interested in hearing from the community if anyone is having the
same type of problems on SQL 2005. We added a force option to sp_removed
which more aggressively drops replication objects. Additionally, we now drop
any rowguid columns that were added in merge.
Philip Vaughn
Program Manager
SQL Server Replication
This message is provided "AS IS" with no warranties, and confers no rights.
"Anukul" <anukuls@.yahoo.com> wrote in message
news:OCJxPYmAFHA.1388@.TK2MSFTNGP09.phx.gbl...
> Hi Paul:
> I did try that one out also & BTW I am now able to remove Subscriber.
> Thanks a Lot for ur help.
> Regards,
> Anukul
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:155e01c5023b$3917e340$a501280a@.phx.gbl...
>
Monday, March 26, 2012
How to release Table unused space
I am having some disk space issue, and I notice that I have some tables with
a lot of GB of unused space.
Is it a way to claim and release that unused space?
To give you a better picture, I have just one table with below information
Rows = 131977895
Reserved =146270344 KB
Index_Size = 2767616 KB
Data = 70372568 KB
Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
This table is reindexed every sunday (yesterday was the last reindex) and it
does not look to have fragmentation issues, when I ran a DBCC Showcontig I
get these results:
DBCC SHOWCONTIG scanning 'Sales' table...
Table: 'Sales' (1228791685); index ID: 1, database ID: 16
TABLE level scan performed.
- Pages Scanned........................: 8796978
- Extents Scanned.......................: 1101956
- Extent Switches.......................: 1101956
- Avg. Pages per Extent..................: 8.0
- Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1101957]
- Logical Scan Fragmentation ..............: 0.04%
- Extent Scan Fragmentation ...............: 9.80%
- Avg. Bytes Free per Page................: 647.0
- Avg. Page Density (full)................: 92.01%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
Could someone give me an idea on how to release the 70 GB of unused space?
Thanks a lot
Juan
Do you have Text or image columns? Did you drop any recently?
Andrew J. Kelly SQL MVP
"Juan" <Juan@.discussions.microsoft.com> wrote in message
news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
> Hi all
> I am having some disk space issue, and I notice that I have some tables
> with
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
>
> This table is reindexed every sunday (yesterday was the last reindex) and
> it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan
>
|||Juan,
Your numbers don't match.
The first data you mention is 132 million rows, and 50% unused space.
But then the DBCC SHOWCONTIG output reports 1,228 millions rows and 10%
unused space.
Gert-Jan
Juan wrote:
> Hi all
> I am having some disk space issue, and I notice that I have some tables with
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
> This table is reindexed every sunday (yesterday was the last reindex) and it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan
|||Did you get your numbers below from sp_spaceused? You cannot rely on this
for accurate information. DBCC updateusage will help.
Note that from showcontig output your pages are mostly full --> not much
unused space.
TheSQLGuru
President
Indicium Resources, Inc.
"Juan" <Juan@.discussions.microsoft.com> wrote in message
news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
> Hi all
> I am having some disk space issue, and I notice that I have some tables
> with
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
>
> This table is reindexed every sunday (yesterday was the last reindex) and
> it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan
>
|||Ey, you are right, I ran a DBCC updateusage and it fix the numbers, I am
getting now just 300 KB of unused space, this makes sense now.
Thanks a lot, I'll keep on mind to run a DBCC UpdateUsage next time I check
the sizes of my tables.
Juan
"TheSQLGuru" wrote:
> Did you get your numbers below from sp_spaceused? You cannot rely on this
> for accurate information. DBCC updateusage will help.
> Note that from showcontig output your pages are mostly full --> not much
> unused space.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "Juan" <Juan@.discussions.microsoft.com> wrote in message
> news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
>
>
How to release Table unused space
I am having some disk space issue, and I notice that I have some tables with
a lot of GB of unused space.
Is it a way to claim and release that unused space?
To give you a better picture, I have just one table with below information
Rows = 131977895
Reserved =146270344 KB
Index_Size = 2767616 KB
Data = 70372568 KB
Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
This table is reindexed every sunday (yesterday was the last reindex) and it
does not look to have fragmentation issues, when I ran a DBCC Showcontig I
get these results:
DBCC SHOWCONTIG scanning 'Sales' table...
Table: 'Sales' (1228791685); index ID: 1, database ID: 16
TABLE level scan performed.
- Pages Scanned........................: 8796978
- Extents Scanned.......................: 1101956
- Extent Switches.......................: 1101956
- Avg. Pages per Extent..................: 8.0
- Scan Density [Best Count:Actual Count]......: 99.79% [1099623:110
1957]
- Logical Scan Fragmentation ..............: 0.04%
- Extent Scan Fragmentation ...............: 9.80%
- Avg. Bytes Free per Page................: 647.0
- Avg. Page Density (full)................: 92.01%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
Could someone give me an idea on how to release the 70 GB of unused space?
Thanks a lot
JuanDo you have Text or image columns? Did you drop any recently?
Andrew J. Kelly SQL MVP
"Juan" <Juan@.discussions.microsoft.com> wrote in message
news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
> Hi all
> I am having some disk space issue, and I notice that I have some tables
> with
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
>
> This table is reindexed every sunday (yesterday was the last reindex) and
> it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1
101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan
>|||Juan,
Your numbers don't match.
The first data you mention is 132 million rows, and 50% unused space.
But then the DBCC SHOWCONTIG output reports 1,228 millions rows and 10%
unused space.
Gert-Jan
Juan wrote:
> Hi all
> I am having some disk space issue, and I notice that I have some tables wi
th
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
> This table is reindexed every sunday (yesterday was the last reindex) and
it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1
101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan|||Did you get your numbers below from sp_spaceused? You cannot rely on this
for accurate information. DBCC updateusage will help.
Note that from showcontig output your pages are mostly full --> not much
unused space.
TheSQLGuru
President
Indicium Resources, Inc.
"Juan" <Juan@.discussions.microsoft.com> wrote in message
news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
> Hi all
> I am having some disk space issue, and I notice that I have some tables
> with
> a lot of GB of unused space.
> Is it a way to claim and release that unused space?
> To give you a better picture, I have just one table with below information
> Rows = 131977895
> Reserved =146270344 KB
> Index_Size = 2767616 KB
> Data = 70372568 KB
> Unused = 73130160 KB <-- here is my concernd almost 70 GB unused !!!
>
> This table is reindexed every sunday (yesterday was the last reindex) and
> it
> does not look to have fragmentation issues, when I ran a DBCC Showcontig I
> get these results:
> DBCC SHOWCONTIG scanning 'Sales' table...
> Table: 'Sales' (1228791685); index ID: 1, database ID: 16
> TABLE level scan performed.
> - Pages Scanned........................: 8796978
> - Extents Scanned.......................: 1101956
> - Extent Switches.......................: 1101956
> - Avg. Pages per Extent..................: 8.0
> - Scan Density [Best Count:Actual Count]......: 99.79% [1099623:1
101957]
> - Logical Scan Fragmentation ..............: 0.04%
> - Extent Scan Fragmentation ...............: 9.80%
> - Avg. Bytes Free per Page................: 647.0
> - Avg. Page Density (full)................: 92.01%
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Could someone give me an idea on how to release the 70 GB of unused space?
> Thanks a lot
> Juan
>|||Ey, you are right, I ran a DBCC updateusage and it fix the numbers, I am
getting now just 300 KB of unused space, this makes sense now.
Thanks a lot, I'll keep on mind to run a DBCC UpdateUsage next time I check
the sizes of my tables.
Juan
"TheSQLGuru" wrote:
> Did you get your numbers below from sp_spaceused? You cannot rely on this
> for accurate information. DBCC updateusage will help.
> Note that from showcontig output your pages are mostly full --> not much
> unused space.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "Juan" <Juan@.discussions.microsoft.com> wrote in message
> news:A6F92E41-49D3-4D64-9123-63FE8740E18E@.microsoft.com...
>
>
Friday, March 9, 2012
How to Read SQL Transaction Log ...
I am trying to read & Understand SQL Transaction Log.
For Online Log, I use DBCC LOG...but how to understand what Row Data means.
Also How to read BackedUp (Offline) Log File?
Any help would be much appreciated.
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
Hi,
Try using the 3rd party tool Logexplorer from Lumigent
www.lumigent.com
Thanks
Hari
SQL Server MVP
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
|||This is undocumented. There are third party tools that help you interpret
the log, such as Lumigent.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
|||I have some 3:rd party tools listed on my links page:
http://www.karaszi.com/SQLServer/links.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
|||There are a number of tools available
http://aspfaq.com/show.asp?id=2449
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
|||Thanks very much for the overwhelming response.
My apologies, I havent mentioned that I tried some 3rd party Log Readers &
what I understand is they do very similar but are able to interprete the Row
Data field output of DBCC LOG. I was trying to find out if I can also
interprete the value in Row Data.
Any help in interpreting the field [Row Data] of DBCC LOG is much
appreciated.
Ramanuj Brahmachary
Database Administrator, Bangalore
[ MCDBA, MCSE, MCSD ]
"Jasper Smith" wrote:
> There are a number of tools available
> http://aspfaq.com/show.asp?id=2449
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
>
>
|||Also how to read BackedUp transaction LOG from file on disk.
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Ramanuj" wrote:
[vbcol=seagreen]
> Thanks very much for the overwhelming response.
> My apologies, I havent mentioned that I tried some 3rd party Log Readers &
> what I understand is they do very similar but are able to interprete the Row
> Data field output of DBCC LOG. I was trying to find out if I can also
> interprete the value in Row Data.
> Any help in interpreting the field [Row Data] of DBCC LOG is much
> appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator, Bangalore
> [ MCDBA, MCSE, MCSD ]
>
> "Jasper Smith" wrote:
|||There is no documentation for interpreting the active log or a log backup. I have not seen any
scripts or anything to help with this.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:162E993E-BBA0-4AD0-858B-672E8D6C0198@.microsoft.com...[vbcol=seagreen]
> Also how to read BackedUp transaction LOG from file on disk.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
>
> "Ramanuj" wrote:
|||wandering how 3rd party vendors interpreting it....
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Tibor Karaszi" wrote:
> There is no documentation for interpreting the active log or a log backup. I have not seen any
> scripts or anything to help with this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:162E993E-BBA0-4AD0-858B-672E8D6C0198@.microsoft.com...
>
>
|||Thanks
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Tibor Karaszi" wrote:
> I have some 3:rd party tools listed on my links page:
> http://www.karaszi.com/SQLServer/links.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
>
>
How to Read SQL Transaction Log ...
I am trying to read & Understand SQL Transaction Log.
For Online Log, I use DBCC LOG...but how to understand what Row Data means.
Also How to read BackedUp (Offline) Log File?
Any help would be much appreciated.
--
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]Hi,
Try using the 3rd party tool Logexplorer from Lumigent
www.lumigent.com
Thanks
Hari
SQL Server MVP
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]|||This is undocumented. There are third party tools that help you interpret
the log, such as Lumigent.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]|||I have some 3:rd party tools listed on my links page:
http://www.karaszi.com/SQLServer/links.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data mean
s.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]|||There are a number of tools available
http://aspfaq.com/show.asp?id=2449
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
> Good day All
> I am trying to read & Understand SQL Transaction Log.
> For Online Log, I use DBCC LOG...but how to understand what Row Data
> means.
> Also How to read BackedUp (Offline) Log File?
> Any help would be much appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]|||Thanks very much for the overwhelming response.
My apologies, I havent mentioned that I tried some 3rd party Log Readers &
what I understand is they do very similar but are able to interprete the Row
Data field output of DBCC LOG. I was trying to find out if I can also
interprete the value in Row Data.
Any help in interpreting the field [Row Data] of DBCC LOG is much
appreciated.
--
Ramanuj Brahmachary
Database Administrator, Bangalore
[ MCDBA, MCSE, MCSD ]
"Jasper Smith" wrote:
> There are a number of tools available
> http://aspfaq.com/show.asp?id=2449
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
>
>|||Also how to read BackedUp transaction LOG from file on disk.
--
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Ramanuj" wrote:
[vbcol=seagreen]
> Thanks very much for the overwhelming response.
> My apologies, I havent mentioned that I tried some 3rd party Log Readers &
> what I understand is they do very similar but are able to interprete the R
ow
> Data field output of DBCC LOG. I was trying to find out if I can also
> interprete the value in Row Data.
> Any help in interpreting the field [Row Data] of DBCC LOG is much
> appreciated.
> --
> Ramanuj Brahmachary
> Database Administrator, Bangalore
> [ MCDBA, MCSE, MCSD ]
>
> "Jasper Smith" wrote:
>|||There is no documentation for interpreting the active log or a log backup. I
have not seen any
scripts or anything to help with this.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
news:162E993E-BBA0-4AD0-858B-672E8D6C0198@.microsoft.com...[vbcol=seagreen]
> Also how to read BackedUp transaction LOG from file on disk.
> --
> Ramanuj Brahmachary
> Database Administrator
> [ MCDBA, MCSE, MCSD ]
>
> "Ramanuj" wrote:
>|||wandering how 3rd party vendors interpreting it....
--
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Tibor Karaszi" wrote:
> There is no documentation for interpreting the active log or a log backup.
I have not seen any
> scripts or anything to help with this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:162E993E-BBA0-4AD0-858B-672E8D6C0198@.microsoft.com...
>
>|||Thanks
--
Ramanuj Brahmachary
Database Administrator
[ MCDBA, MCSE, MCSD ]
"Tibor Karaszi" wrote:
> I have some 3:rd party tools listed on my links page:
> http://www.karaszi.com/SQLServer/links.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ramanuj" <Ramanuj@.discussions.microsoft.com> wrote in message
> news:68B9091E-649C-45C9-8B5B-4F9606FCC876@.microsoft.com...
>
>
Friday, February 24, 2012
how to quickly learn the syntax of SQL?
Hi, All:
I know oracle SQL, now I need to do a lot of SQL query on Microsoft SQLSERVER, can any one point out any place that I can find out the syntax of SQLserver SQL statement? Since this is just a short term assignment, so I don't want to buy a book, just hoping I can learn something quickly from online. I don't need learn anything deep, just need to know some simple syntax so I can do join, count, concatenate, min(), max(), sum () etc.
thanks in advance.Books Online, the definitive source for information about SQL Server and T-SQL, is available online here, to for free download here.|||
You will be suprised that for the standard things like joining and concatenating, SQL Server support most things the ANSI standard which lets you change your SQL strings easily. For special things like system functions you will need the appropiate TSQL equivalent but for ANSI joining like *= you can do a "soft-migration" to SQL Server. (And in addition you won′t need the dual table anymore :-) ) :-D
Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi, Thanks for all of your replies.
Sunday, February 19, 2012
How to Query a nested Hierarchy in TSQL
I have a table called Users and there is a column called ParentID that
either contains 0 or another valid userID. This is what I want to do: When I
have a userID, I want to retrieve all UserIDs until ParentID for a searched
user is 0.
Script to simulate the environment:
create table users
(userID Int,
parentID Int)
insert into users
select 1, 0
union all
select 2, 1
union all
select 3, 2
union all
select 4, 3
union all
select 5, 4
union all
select 6, 4
union all
select 7, 5
union all
select 8, 6
union all
select 9, 7
union all
select 10, 8
Situation: I will be supplied with a specific user ID and I need to retun
all userIDs in comma delimited format until ParentID becomes 0 in the
hierarchy.
Example:
UserID 1 should return only one row as the ParentID is 0 for userID 1
UserID 8 should return following userIDs
6,4, 3, 2, 1
I hope everything is clear.This article may give you some idea.
http://www.windowsitpro.com/Article...5715/15715.html
Regards
Mark wrote:
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
I
> have a userID, I want to retrieve all UserIDs until ParentID for a searche
d
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.|||This article may give you some idea.
http://www.windowsitpro.com/Article...5715/15715.html
Regards
Mark wrote:
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
I
> have a userID, I want to retrieve all UserIDs until ParentID for a searche
d
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.|||Mark,
Try this function:
create function dbo.fn_getpath(@.uid as int) returns varchar(8000)
as
begin
declare @.path as varchar(8000);
set @.path = cast(@.uid as varchar(10));
while @.uid <> 0
begin
set @.uid = (select parentid from users where userid = @.uid);
set @.path = @.path + ',' + cast(@.uid as varchar(10));
end
return @.path;
end
go
select dbo.fn_getpath(5)
BG, SQL Server MVP
www.SolidQualityLearning.com
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:1C6A7C66-191E-41A7-AD3C-33E84232CCF6@.microsoft.com...
> All:
> I have a table called Users and there is a column called ParentID that
> either contains 0 or another valid userID. This is what I want to do: When
> I
> have a userID, I want to retrieve all UserIDs until ParentID for a
> searched
> user is 0.
> Script to simulate the environment:
> create table users
> (userID Int,
> parentID Int)
> insert into users
> select 1, 0
> union all
> select 2, 1
> union all
> select 3, 2
> union all
> select 4, 3
> union all
> select 5, 4
> union all
> select 6, 4
> union all
> select 7, 5
> union all
> select 8, 6
> union all
> select 9, 7
> union all
> select 10, 8
> Situation: I will be supplied with a specific user ID and I need to retun
> all userIDs in comma delimited format until ParentID becomes 0 in the
> hierarchy.
> Example:
> UserID 1 should return only one row as the ParentID is 0 for userID 1
> UserID 8 should return following userIDs
> 6,4, 3, 2, 1
> I hope everything is clear.
>|||Look at this example:
http://milambda.blogspot.com/2005/0...or-monkeys.html
ML
http://milambda.blogspot.com/|||"Muhammad Akhter" <mnadeemakhter@.gmail.com> wrote in message
news:1134511951.052763.116790@.g44g2000cwa.googlegroups.com...
> This article may give you some idea.
> http://www.windowsitpro.com/Article...5715/15715.html
Lets just count the *years* that this kind of approach is the only one
available:(:)|||Get a copy of TREES & HIERARCHIES IN SQL for several approaches to this
problem.
Why do you wish to destroy First Normal Form (1NF)? It is the
foundation of RDBMS, after all.
Why are you formatting data in the back end? The basic principle of a
tiered architecture is that display is done in the front end and never
in the back end. This a more basic programming principle than just SQL
and RDBMS.|||"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1134875755.271066.18350@.g44g2000cwa.googlegroups.com...
> Get a copy of TREES & HIERARCHIES IN SQL for several approaches to this
> problem.
Good luck with the book...although some may wonder why
it still is appropriate in the 21st century:)