Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Friday, March 30, 2012

Query a Sql Server LOG (LDF) File

Hello guys,
Actually i was thinking is there any way to query the LDF ( sqlserver transaction log file) to get the operations performed during that time span?
Hope we can do it!
Regards
Salim
**********************************************************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...Get LogExplorer from www.lumigent.com , it's the only way AFAIK.
--
Jacco Schalkwijk
SQL Server MVP
"Salim" <salim_belim@.hargreaveslansdown.co.uk> wrote in message
news:%23repm8$kDHA.1096@.TK2MSFTNGP11.phx.gbl...
> Hello guys,
> Actually i was thinking is there any way to query the LDF ( sqlserver
transaction log file) to get the operations performed during that time span?
> Hope we can do it!
> Regards
> Salim
>
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...|||Hi,
You can use this undocumented command:
DBCC log ( {dbid|dbname } [, { -1 | 0 | 1 | 2 | 3 | 4}] )
For example:
DBCC log ('pubs', 2)
I'm sure that you can find more information about this if you search on
google, i don't have the information about what each number means right now.
--
Regards,
Kristofer Gafvert - IIS MVP
http://www.ilopia.com - FAQ & Tutorials for Windows Server 2003, and SQL
Server 2000
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.
Problems with spam and viruses? See
http://www.ilopia.com/security/newsposting.aspx
"Salim" <salim_belim@.hargreaveslansdown.co.uk> wrote in message
news:%23repm8$kDHA.1096@.TK2MSFTNGP11.phx.gbl...
> Hello guys,
> Actually i was thinking is there any way to query the LDF ( sqlserver
transaction log file) to get the operations performed during that time span?
> Hope we can do it!
> Regards
> Salim
>
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...

Wednesday, March 28, 2012

Query - check for a string in stored procedure

Hi,

I would like to check if a string value exist in a string in sql
server stored procedure, e.g.

set @.testString = 'this is my test document.'
if (@.testString contains 'test')
begin
....
end

How do I do this in sql server stored procedure?

Thanks,
June...try this

Declare @.testString varchar(100)
set @.testString = 'this is my test document.'
if charindex('test',@.testString)>0

begin
....
end

Madhivanan

Monday, March 26, 2012

query

hi
i have a doubt in sqlserver.
how to delete the duplicate rows with a query in sqlserver
thank youOne choice is to use Cursor.
But remember that Cursors are very expensive to SQL Server.

Else,

You may try to use the UNION (not UNION ALL), with the same table. Put all the returned data into a temporary Table, then you delete your data from original table and insert the values from the temporary table into it.|||First of all, what is structure of your table?
If your table does not have a primary key - too bad... Use Diogo's advice and then check a normalization rules.
If it does - you can try next method:

drop table test
go
create table test (id int primary key,
code varchar(10))
go
insert test values(1,'code1')
insert test values(2,'code2')
insert test values(3,'code1')
insert test values(4,'code3')
insert test values(5,'code4')
insert test values(6,'code5')
insert test values(7,'code6')
insert test values(8,'code3')

select *
--delete
from test
where id in
(select min(Id) from test group by code having count(*)>1)

May be it needs to run last query couple times....

Wednesday, March 21, 2012

Quering AS2005 Cube to generate CSV or Excel in SISS 2005

can any one sugest Quering AS2005 Cube to generate CSV or Excel in SISS 2005

i have a mdx query that runs fine in SQLserver 2005 but when use OLEDN source in SSIS and connect to Flatfile source i am getting OLEDB exception is there any work arround i have SQL Server 2005 SP2 on Windows 2003

Any help is really appreciated

thanks in advance

The actual error message would be helpful.

Are you using the OLEDB provider for OLAP to try to connect to a flat file? That won't work.

|||

thank you

i use OLEDB source and under the connection i choose the AS 9.0

can please suggest the ways to quering a Cube using MDX in SISS

|||

You might take a look at this post:

http://sqljunkies.com/WebLog/hitachiconsulting/archive/2007/07/04/42805.aspx

It explains how to use the DataReader source to get the data from the cube.

Quering AS2005 Cube to generate CSV or Excel in SISS 2005

can any one sugest Quering AS2005 Cube to generate CSV or Excel in SISS 2005

i have a mdx query that runs fine in SQLserver 2005 but when use OLEDN source in SSIS and connect to Flatfile source i am getting OLEDB exception is there any work arround i have SQL Server 2005 SP2 on Windows 2003

Any help is really appreciated

thanks in advance

The actual error message would be helpful.

Are you using the OLEDB provider for OLAP to try to connect to a flat file? That won't work.

|||

thank you

i use OLEDB source and under the connection i choose the AS 9.0

can please suggest the ways to quering a Cube using MDX in SISS

|||

You might take a look at this post:

http://sqljunkies.com/WebLog/hitachiconsulting/archive/2007/07/04/42805.aspx

It explains how to use the DataReader source to get the data from the cube.

sql

Friday, March 9, 2012

QA goes, EM doesn't (previously posted on microsoft.public.sqlserver.server)

sory for repost but nobody on sqlserver.server helped me to solve this
:-(((((((((
---
AFAIK QA uses ODBC and EM uses OLE DB right?
anyway, I can connect using QA but not using EM.
tried with IP addredd too with no avail
what's wrong?
tia
Zarko
server: active-pasive cluster win2000as sp3, sql2000sp3a
client: win xp pro, sql2000sp3aWhat is the exact error that is generated?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.