Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Tuesday, March 27, 2012

A curious case of data corruption

Dear group,

if someone could give me an idea what is going on in one of our
databases, this would really really be helpful.

We have two tables with around 2 / 3 million rows. These tables have no
key and no ID. (This major design flaw will be overcome in some later
version of the application-software working on this DB but right now i
have to live with this).

Now for the funny bit

1) I open one window in the Query-Analyzer and write some code like
Begin transaction INSERT INTO TABLE COMMIT
2) in another window i write "SELECT COUNT(*) from TABLE"

If I perform the insert then afterwards select count(*) the row-count
is incremented by two whereas the Insert-Statement said "1 row(s)
modified.

DBCC gives no errors.
DBCC gives amount of rows 2 million rows
Select count(*) on the same table gives 3 million rows

Exporting the data, truncating the table re-importing data gives no
result, right now the DTS-status is 203 and the machine is "thinking".

Is there any possibility to check the "integrity" of the table?

This problem is on the production machine, but right now i am working
on a copy so it was propagated with backup / restore-mechanism.

Any hint would be very helpful

Thanks and Greetings

Uli(uli2003wien@.lycos.at) writes:
> We have two tables with around 2 / 3 million rows. These tables have no
> key and no ID. (This major design flaw will be overcome in some later
> version of the application-software working on this DB but right now i
> have to live with this).
> Now for the funny bit
> 1) I open one window in the Query-Analyzer and write some code like
> Begin transaction INSERT INTO TABLE COMMIT
> 2) in another window i write "SELECT COUNT(*) from TABLE"
> If I perform the insert then afterwards select count(*) the row-count
> is incremented by two whereas the Insert-Statement said "1 row(s)
> modified.
> DBCC gives no errors.
> DBCC gives amount of rows 2 million rows
> Select count(*) on the same table gives 3 million rows

Well, I would definitely add a non-unique clustered index on the
table. It does not really matter which column, but if you add the
index, the entire table will be reorganized.

I recognize the symptom; other people have recommended similar observations.
Although they usually had a WHERE clause, and maybe even some indexes
on the table. I vaguely recall that a clustered index was a workaround
out of the problem.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||(uli2003wien@.lycos.at) writes:
> We have two tables with around 2 / 3 million rows. These tables have no
> key and no ID. (This major design flaw will be overcome in some later
> version of the application-software working on this DB but right now i
> have to live with this).
> Now for the funny bit
> 1) I open one window in the Query-Analyzer and write some code like
> Begin transaction INSERT INTO TABLE COMMIT
> 2) in another window i write "SELECT COUNT(*) from TABLE"
> If I perform the insert then afterwards select count(*) the row-count
> is incremented by two whereas the Insert-Statement said "1 row(s)
> modified.
> DBCC gives no errors.
> DBCC gives amount of rows 2 million rows
> Select count(*) on the same table gives 3 million rows

Well, I would definitely add a non-unique clustered index on the
table. It does not really matter which column, but if you add the
index, the entire table will be reorganized.

I recognize the symptom; other people have recommended similar observations.
Although they usually had a WHERE clause, and maybe even some indexes
on the table. I vaguely recall that a clustered index was a workaround
out of the problem.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||
Erland Sommarskog schrieb:
> (uli2003wien@.lycos.at) writes:
> > We have two tables with around 2 / 3 million rows. These tables have no
> > key and no ID. (This major design flaw will be overcome in some later
> > version of the application-software working on this DB but right now i
> > have to live with this).
> > Now for the funny bit
> > 1) I open one window in the Query-Analyzer and write some code like
> > Begin transaction INSERT INTO TABLE COMMIT
> > 2) in another window i write "SELECT COUNT(*) from TABLE"
> > If I perform the insert then afterwards select count(*) the row-count
> > is incremented by two whereas the Insert-Statement said "1 row(s)
> > modified.
> > DBCC gives no errors.
> > DBCC gives amount of rows 2 million rows
> > Select count(*) on the same table gives 3 million rows
> Well, I would definitely add a non-unique clustered index on the
> table. It does not really matter which column, but if you add the
> index, the entire table will be reorganized.
> I recognize the symptom; other people have recommended similar observations.
> Although they usually had a WHERE clause, and maybe even some indexes
> on the table. I vaguely recall that a clustered index was a workaround
> out of the problem.

Thank you Erland,

as always a great help and a hint for the right direction. Actually
this table had already a clustered index but dropping the index and
recreating the index did the job for me (and much faster than
exporting, dropping and importing the table)

Regards

Uli|||
Erland Sommarskog schrieb:
> (uli2003wien@.lycos.at) writes:
> > We have two tables with around 2 / 3 million rows. These tables have no
> > key and no ID. (This major design flaw will be overcome in some later
> > version of the application-software working on this DB but right now i
> > have to live with this).
> > Now for the funny bit
> > 1) I open one window in the Query-Analyzer and write some code like
> > Begin transaction INSERT INTO TABLE COMMIT
> > 2) in another window i write "SELECT COUNT(*) from TABLE"
> > If I perform the insert then afterwards select count(*) the row-count
> > is incremented by two whereas the Insert-Statement said "1 row(s)
> > modified.
> > DBCC gives no errors.
> > DBCC gives amount of rows 2 million rows
> > Select count(*) on the same table gives 3 million rows
> Well, I would definitely add a non-unique clustered index on the
> table. It does not really matter which column, but if you add the
> index, the entire table will be reorganized.
> I recognize the symptom; other people have recommended similar observations.
> Although they usually had a WHERE clause, and maybe even some indexes
> on the table. I vaguely recall that a clustered index was a workaround
> out of the problem.

Thank you Erland,

as always a great help and a hint for the right direction. Actually
this table had already a clustered index but dropping the index and
recreating the index did the job for me (and much faster than
exporting, dropping and importing the table)

Regards

Uli|||(uli2003wien@.lycos.at) writes:
> as always a great help and a hint for the right direction. Actually
> this table had already a clustered index but dropping the index and
> recreating the index did the job for me (and much faster than
> exporting, dropping and importing the table)

That's good to hear. I would keep an eye on the table, in case the
problem would reappear.

By the way, rather than dropping and recreating, DBCC DBREINDEX can
be somewhat quicker. You can also use WITH DROP_EXISTING on CREATE INDEX.

This is particularly important if you have non-clustered indexes on the
table as well, as they will have to be rebuilt if you drop the clustered
index. This is because the NC indexes use the clustered index keys as
their row locator.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, March 25, 2012

A couple of easy questions

Dear all,
1)
I was wondering myself, how many characters can handle Sql2k when you define
a field? Such limitation is common for any object? I mean, tables, indexes,
jobs.
I've got an ASP application which allow the user create fields and I would
need to know that rule in order to define a maxlenght value.
2)
I had in my EM remote servers added but today they are dissapeared although
now are currently up. Does anyone ever experienced such behaviour? It coul
d
be a shutdown of that server or even if that server is off from the client
vanishes...
Thanks a lot for your suggestions,
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''s hard to provide information
without seeing the code. location: Alicante (ES)Hi
1)
Lookup in the BOL for maximum and minimum ovjects limits article
2)
I have not, but did you refresh your EM?
"Enric" <vtam13@.terra.es.(donotspam)> wrote in message
news:514627E4-4715-41C6-B92B-B8913DC31D94@.microsoft.com...
> Dear all,
> 1)
> I was wondering myself, how many characters can handle Sql2k when you
> define
> a field? Such limitation is common for any object? I mean, tables,
> indexes,
> jobs.
> I've got an ASP application which allow the user create fields and I would
> need to know that rule in order to define a maxlenght value.
> 2)
> I had in my EM remote servers added but today they are dissapeared
> although
> now are currently up. Does anyone ever experienced such behaviour? It
> could
> be a shutdown of that server or even if that server is off from the client
> vanishes...
>
> Thanks a lot for your suggestions,
>
> --
> Please post DDL, DCL and DML statements as well as any error message in
> order to understand better your request. It''s hard to provide information
> without seeing the code. location: Alicante (ES)|||hi again Uri,
Yes, I did. How odd, isn't?
--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''s hard to provide information
without seeing the code. location: Alicante (ES)
"Uri Dimant" wrote:

> Hi
> 1)
> Lookup in the BOL for maximum and minimum ovjects limits article
> 2)
> I have not, but did you refresh your EM?
>
> "Enric" <vtam13@.terra.es.(donotspam)> wrote in message
> news:514627E4-4715-41C6-B92B-B8913DC31D94@.microsoft.com...
>
>|||
> Yes, I did. How odd, isn't?
Hi Enric, do you have 'Open object explorer and new query' in Tools/Options
dialog under Environment/General leaf?
I noticed that if object explorer is not mentioned in selected combo,
servers don't show up.
Peter|||Hi Rogas,
I don't see that option. From Entreprise Manager->Tools->Options I have two
leafs: General and Advanced. In General there is nothing related with you
said.
--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''s hard to provide information
without seeing the code. location: Alicante (ES)
"Rogas69" wrote:

>
> Hi Enric, do you have 'Open object explorer and new query' in Tools/Option
s
> dialog under Environment/General leaf?
> I noticed that if object explorer is not mentioned in selected combo,
> servers don't show up.
> Peter
>
>

Tuesday, March 20, 2012

A book for Report server

Dear all

Please can u suggest a good reference book available to study report server..

Regards

Polachan

I am currently reading Microsoft SQL Server 2005 Reporting Services (Sams Publishing) by Michael Lisin and Jim Joseph. I think it is a good book. I also have the other book written by Brian Larson. That is also a good book. The first book I think delves more into the technical details of how RS works behind the scenes. The Brian Larson book is more for beginners, but we use it most here.

Hope this helps.

|||

Thank u sir..

Can I ask to u one doubt regarding the parameter for drill through related to report server

regards

Polachan

sql

A big, big SSIS for everything?

Dear all,

I would like to hear point of views, thoughts and ideas about the following request.

As some of us would have seen from a couple a days ago I’ve been setting posts one after one in order to obtain some answers about our business basis.

We’ve got a service running all day long (to accomplish this it was wrote by Visual Basic 6.0) which is checking up a file structure system for a several requirements such a verify if exists a .nul or .txt in each folder and therefore fires a DTS package. Up to here that’s fine, that system works amazing and even is be able to run till three packages at the same time. 400 Dts are scheduled this way and 100 are scheduled by Agent.

Problem comes naturally with SQL2005 where such control is not possible (it seems so) from old tools belonging to Visual Studio 6.0 because the aforementioned version uses assemblies instead of dll, bla,bla.

Keeping in mind that .NET is not possible for reasons that going beyond of any technical matter or whatever I’ve thought do that service by SSIS. A big SSIS running forever. Its responsabilities might be:

1-Look in each folder for the criteria specified in the scheduling of that SSIS

2-Launch a specified SSIS in the case that criteria has matched.

3-Update SQL tables with LOGS, times, executions, etc,

4-Look again

The point 3 will be visible from our Intranet via ASP 3.0 pages as currently we do.

Pros and cons?

Sorry for this painful request but I don’t believe that such issue can be of that kind of odd issues that nodoby suffer in its organizations.

Who else is needed for answers?

Thanks a lot for your time,

I'm not quite sure what your question is. Are you saying you want to run a SSIS package forever that simply keeps looping whenever a file is found? I don't see a problem with that. it would be interesting to see how it goes.

-Jamie

|||

When finds a Jamie.Nul file in d:\server25k\a\ launch SSIS package B and then would delete that .NUL.

Sensible information attached in that SSIS launched as flat file for example, accounts info would be stored in a backup folder. After one execution come back to verify and so on

a big question for procedure

Dear all
i had one question would like to ask someone who can
give me a litter help
if my database data like it

traceno otherno username

0913377594 0913377594 roger
0913787170 0913787170 roger
0915534569 0915534569 roger
0925306029 0925306029 roger
0930443931 0930443931 roger
0936565187 0936565187 roger

drop procedure delete_phone_group
create procedure delete_phone_group
@.param1 varchar(30),
@.username varchar(5) with encryption
as
declare @.var varchar(30) , @.varotherno varchar(30)
select @.var = otherno
from phonegroup
where traceno = @.param1
and traceno != otherno
delete from phonegroup where traceno = otherno and traceno = (select otherno
from phonegroup
where traceno = @.param1
and traceno != otherno)
select @.varotherno = otherno
from phonegroup
where traceno = @.var
and traceno != otherno
print @.varotherno
insert into phonegroup(traceno,otherno,username)
values(@.param1,@.varotherno,@.username)
update phonegroup set phonecount = 1 where traceno = @.var and otherno = @.varotherno


when problem is when i edit one record in (phonegroup) this table
the script like it
insert into phonegroup(traceno,otherno,username)
valuse('0915534569' ,0913787170,'roger')
the data will be like this 0913787170 to be delete but when i try edit second data
insert into phonegroup(traceno,otherno,username)
valuse('0915534569' ,0936565187,'roger')


0913377594 0913377594 roger
0915534569 0913787170 roger
0915534569 0915534569 roger
0915534569 0936565187 roger
0925306029 0925306029 roger
0930443931 0930443931 roger
0936565187 0936565187 roger

but i donot why the second data it does not to be delete in my script

Have you done a DELETE statement. All I can see are inserts?|||yes i do i have donesql

Sunday, March 11, 2012

70-445 and 70-446 - Feedback

Dear friends,

I'm thinking to take this exams soon... anyone has documents, exams, links or other to help me on it?
Thanks!!

You might also try the SQL Server Getting Started Forum...

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=158&SiteID=1

|||

do the exams is starting for you? :-)

eheheh ... ok... transfer the post to there!

Thanks!

Regards,

pedro

|||

PedroCGD wrote:

do the exams is starting for you? :-)

eheheh ... ok... transfer the post to there!

Thanks!

Regards,

pedro

Well, it's either that or SQL Server Tools General forum.

Take your pick. I didn't suggest moving it because there are SSIS specifics in those exams. But posting your question in a more general group would increase your exposure and perhaps get back more responses.

|||

PedroCGD wrote:

Dear friends,

I'm thinking to take this exams soon... anyone has documents, exams, links or other to help me on it?
Thanks!!

The Microsoft Learning site has the exam outlines with all the topics to be covered in the exams. That's the first place to look. I'd definately recommend making sure that you have a working familiarity with all the topics listed. The beta tests were fairly difficult, and missing most or all of the questions on a topic (like Reporting Services or data mining) will likely cause you to fail the test.

|||

jwelch,

I'm working alone in a big project for the bigger Bank here in Portugal.

This project covers all the topics of the site you refered, with SSIS, SSAS, SSRS and ASP.NET 2.0 and Sharepoint 2007.

In the final of the project (August 07) I will make the exam... still there I will be here boring you and help the people I could! :-)

Thanks!

Regards,

Pedro

|||

Pedro, check the following two links as well as the preparation guide for BI exams on the MS Learning site.

http://peterkol.spaces.live.com/blog/cns!68755AEAC31F9A6C!196.entry

http://www.kodyaz.com/blogs/software_development_blog/archive/2006/11/30/480.aspx

70-445 and 70-446 - Feedback

Dear friends,

I'm thinking to take this exams soon... anyone has documents, exams, links or other to help me on it?
Thanks!!

You might also try the SQL Server Getting Started Forum...

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=158&SiteID=1

|||

do the exams is starting for you? :-)

eheheh ... ok... transfer the post to there!

Thanks!

Regards,

pedro

|||

PedroCGD wrote:

do the exams is starting for you? :-)

eheheh ... ok... transfer the post to there!

Thanks!

Regards,

pedro

Well, it's either that or SQL Server Tools General forum.

Take your pick. I didn't suggest moving it because there are SSIS specifics in those exams. But posting your question in a more general group would increase your exposure and perhaps get back more responses.

|||

PedroCGD wrote:

Dear friends,

I'm thinking to take this exams soon... anyone has documents, exams, links or other to help me on it?
Thanks!!

The Microsoft Learning site has the exam outlines with all the topics to be covered in the exams. That's the first place to look. I'd definately recommend making sure that you have a working familiarity with all the topics listed. The beta tests were fairly difficult, and missing most or all of the questions on a topic (like Reporting Services or data mining) will likely cause you to fail the test.

|||

jwelch,

I'm working alone in a big project for the bigger Bank here in Portugal.

This project covers all the topics of the site you refered, with SSIS, SSAS, SSRS and ASP.NET 2.0 and Sharepoint 2007.

In the final of the project (August 07) I will make the exam... still there I will be here boring you and help the people I could! :-)

Thanks!

Regards,

Pedro

|||

Pedro, check the following two links as well as the preparation guide for BI exams on the MS Learning site.

http://peterkol.spaces.live.com/blog/cns!68755AEAC31F9A6C!196.entry

http://www.kodyaz.com/blogs/software_development_blog/archive/2006/11/30/480.aspx

Monday, February 13, 2012

401: Unauthorized.

Dear all,
I have 2 server, Server_A is IIS, Server_B is Reporting Server(SQL2005).
I create a web project under Server_A and drop a reportviewer on the
default.aspx.
I then enter the Server URL and Report path. And build the project.
I can then browse the report without any problem if URL is typing
localhost/web_project/default.aspx
But problem comes up if change into Server_A/webproject/default.aspx.
The message is
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP
status 401: Unauthorized.
Regards,
Ken Linhai
this ragu
u have iis server security problem u verify ur admin
i have the same problem occur i verify my admin
i sent the coading
private void button1_Click_1(object sender, EventArgs e)
{
RunRemote();
}
private void RunRemote()
{
try
{
// this.Cursor = Cursors.WaitCursor;
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportServerUrl = new Uri(Settings.Default.ReportServerEndPoint);
reportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
reportViewer1.RefreshReport();
}
catch (Exception ex)
{
throw ex;
}
finally
{
//this.Cursor = Cursors.Default;
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||use this code easily retrive your report
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
Microsoft.Reporting.WebForms.ReportParameter [1]=new Microsoft.Reporting.WebForms.ReportParameter (0);
}
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||No, I can sucess to view the report from the IE in Web Server.
But when I go to toher computers, got the 401 error.
Regards,
Ken Lin
<ragu> wrote in message news:2006122114446ragu1100@.yahoo.com...
> use this code easily retrive your report
>
> protected void Page_Load(object sender, EventArgs e)
> {
>
> if (!Page.IsPostBack)
> {
> ReportViewer1.ProcessingMode => Microsoft.Reporting.WebForms.ProcessingMode.Remote;
> ReportViewer1.ServerReport.ReportPath = "/Report
> Project3/TestReortForFunds";
> ReportViewer1.ServerReport.ReportServerUrl = new
> Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
> Microsoft.Reporting.WebForms.ReportParameter [1]=new
> Microsoft.Reporting.WebForms.ReportParameter (0);
>
> }
> }
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com