Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Wednesday, March 21, 2012

Diff b/w executing as Stored Procedure and Script

Hi All,
I have a peculiar problem with SQL2000. When i execute a Stored procedure in Demo & Production i get different outputs. But i copied the business logistics from the Sp and executed as a script in both the servers. Now Both the records are same.

I WANT TO KNOW " WHETHER THERE IS ANY DIFFERENCE IN EXECUTION METHODOLOGY BETWEEN STORED PROCEDURE AND QUERY".

NOTE: My stored procedure has 14 executable scripts. Upto 10 scripts no date comparisons were made. But at the 11th script the records differ.

I DOUBT WHETHER THERE WILL BE ANY DATE RELATED ISSUE WHEN EXECUTING AS STORED PROCEDURE AND SCRIPT

Hi,

There is no date related issue for a stored procedure to execute as for as I know. the diffrence between the stored proceudre and the script is the execution plan and the compiling time. remember some time in stored procedure might return the cached data. If possible try to start and stop the DB and then try to execute in both they day.

Might be some thing wrong in the quries in SP and the script which youa re running.

Take a look.

Mohan

|||

Hi Mohan,

Thanks for your reply. There is no chance for error in the script. How i say this bcoz " When i am running the script and the queries in the demo server i get the same result. So only i am very sure about that. Anyway you have given me a new Information. I shall take the necessary steps.

The DIFFERENCE occurs only in PRODUCTION server.

Friday, March 9, 2012

Diagram bug in 2005 Developer edition

I have a few databases which were created using sql server 2000 developer
edition. I copied them to the directory where the sql server 2005 databases
are located. I used "Attach" by right clicking on databases and attached the
databases. When I went to view the diagrams, I got a message that database
diagram support can not be installed because the database does not have a
valid user. Strange I thought since I'm using a laptop and everything else
was installed under the same Windows XP login. So I changed the owner to 'sa
'
and I got the same error message. I fixed the problem by changing the
compatability from 8.0 to 9.0. I did not change the owner on the other
databases that I attached. I got a message for sql server to install object
support, I had it install it and then I could view the diagrams just fine.I don't know if it's considered a bug but it is documented
in the read me file - ReadMeSQL2005.htm which should be off
the root of your installation media. I believe the next
update to BOL will have this documented as well. In the read
me file, check section 4.8.1 titled
Considerations for Installing Database Diagram Support
-Sue
On Thu, 13 Apr 2006 10:22:01 -0700, Doctor Who
<DoctorWho@.discussions.microsoft.com> wrote:

>I have a few databases which were created using sql server 2000 developer
>edition. I copied them to the directory where the sql server 2005 databases
>are located. I used "Attach" by right clicking on databases and attached th
e
>databases. When I went to view the diagrams, I got a message that database
>diagram support can not be installed because the database does not have a
>valid user. Strange I thought since I'm using a laptop and everything else
>was installed under the same Windows XP login. So I changed the owner to 's
a'
>and I got the same error message. I fixed the problem by changing the
>compatability from 8.0 to 9.0. I did not change the owner on the other
>databases that I attached. I got a message for sql server to install object
>support, I had it install it and then I could view the diagrams just fine.

Diagram bug in 2005 Developer edition

I have a few databases which were created using sql server 2000 developer
edition. I copied them to the directory where the sql server 2005 databases
are located. I used "Attach" by right clicking on databases and attached the
databases. When I went to view the diagrams, I got a message that database
diagram support can not be installed because the database does not have a
valid user. Strange I thought since I'm using a laptop and everything else
was installed under the same windows xp login. So I changed the owner to 'sa'
and I got the same error message. I fixed the problem by changing the
compatability from 8.0 to 9.0. I did not change the owner on the other
databases that I attached. I got a message for sql server to install object
support, I had it install it and then I could view the diagrams just fine.I don't know if it's considered a bug but it is documented
in the read me file - ReadMeSQL2005.htm which should be off
the root of your installation media. I believe the next
update to BOL will have this documented as well. In the read
me file, check section 4.8.1 titled
Considerations for Installing Database Diagram Support
-Sue
On Thu, 13 Apr 2006 10:22:01 -0700, Doctor Who
<DoctorWho@.discussions.microsoft.com> wrote:
>I have a few databases which were created using sql server 2000 developer
>edition. I copied them to the directory where the sql server 2005 databases
>are located. I used "Attach" by right clicking on databases and attached the
>databases. When I went to view the diagrams, I got a message that database
>diagram support can not be installed because the database does not have a
>valid user. Strange I thought since I'm using a laptop and everything else
>was installed under the same windows xp login. So I changed the owner to 'sa'
>and I got the same error message. I fixed the problem by changing the
>compatability from 8.0 to 9.0. I did not change the owner on the other
>databases that I attached. I got a message for sql server to install object
>support, I had it install it and then I could view the diagrams just fine.