Friday, March 30, 2012
Is it possible to recover from failed sp4 installation?
I have a client who last night attempted to install sql 2000 Enterprise
Edition SP4. When running the first time through it got past the Password
Validation and moved to the Analysing and Preparing stage of the
installation. At this point it completely hung - after an hour there was
still no activity.
Now when attempting to re-install SP3a it states that a later version is
already installed and when attempting to reinstall SP4 it hangs on password
validation everytime.
This is a production server, does anyone know if it is possible to recover
from the above scenario?
Thanks
LarryJosh
I have been istalling SP4 mamy times and have never got the situation. Hmmm,
try tirn off (from the network) the server and re-install SP4
"Josh Lawrence" <someone@.microsoft.com> wrote in message
news:%23DgeHurtGHA.4544@.TK2MSFTNGP04.phx.gbl...
> Hi All,
> I have a client who last night attempted to install sql 2000 Enterprise
> Edition SP4. When running the first time through it got past the Password
> Validation and moved to the Analysing and Preparing stage of the
> installation. At this point it completely hung - after an hour there was
> still no activity.
> Now when attempting to re-install SP3a it states that a later version is
> already installed and when attempting to reinstall SP4 it hangs on
> password validation everytime.
> This is a production server, does anyone know if it is possible to recover
> from the above scenario?
> Thanks
> Larry
>|||I have experienced this issue previously but can't recall the solution. I
have the awful feeling it may require a complete reinstallation of SQL2000
from the ground up.
Thanks
Josh
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OryZZ2rtGHA.4752@.TK2MSFTNGP02.phx.gbl...
> Josh
> I have been istalling SP4 mamy times and have never got the situation.
> Hmmm, try tirn off (from the network) the server and re-install SP4
>
>
> "Josh Lawrence" <someone@.microsoft.com> wrote in message
> news:%23DgeHurtGHA.4544@.TK2MSFTNGP04.phx.gbl...
>|||Hi --
I have run into the exact same issue, where SP4 installation hangs on
password validation. It worked for me on number of other servers but it
doesn't work on this server.
I have tried using Windows and SQL Server authentication, sa without
password but it didn't make any difference.
Did anyone find a solution?
The funny thing is that @.@.version shows SP4, however it is Not SP4.
Thanks
Gurpreet
"Josh Lawrence" wrote:
> I have experienced this issue previously but can't recall the solution. I
> have the awful feeling it may require a complete reinstallation of SQL2000
> from the ground up.
> Thanks
> Josh
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OryZZ2rtGHA.4752@.TK2MSFTNGP02.phx.gbl...
>
>
Is it possible to recover from failed sp4 installation?
I have a client who last night attempted to install sql 2000 Enterprise
Edition SP4. When running the first time through it got past the Password
Validation and moved to the Analysing and Preparing stage of the
installation. At this point it completely hung - after an hour there was
still no activity.
Now when attempting to re-install SP3a it states that a later version is
already installed and when attempting to reinstall SP4 it hangs on password
validation everytime.
This is a production server, does anyone know if it is possible to recover
from the above scenario?
Thanks
LarryJosh
I have been istalling SP4 mamy times and have never got the situation. Hmmm,
try tirn off (from the network) the server and re-install SP4
"Josh Lawrence" <someone@.microsoft.com> wrote in message
news:%23DgeHurtGHA.4544@.TK2MSFTNGP04.phx.gbl...
> Hi All,
> I have a client who last night attempted to install sql 2000 Enterprise
> Edition SP4. When running the first time through it got past the Password
> Validation and moved to the Analysing and Preparing stage of the
> installation. At this point it completely hung - after an hour there was
> still no activity.
> Now when attempting to re-install SP3a it states that a later version is
> already installed and when attempting to reinstall SP4 it hangs on
> password validation everytime.
> This is a production server, does anyone know if it is possible to recover
> from the above scenario?
> Thanks
> Larry
>|||I have experienced this issue previously but can't recall the solution. I
have the awful feeling it may require a complete reinstallation of SQL2000
from the ground up.
Thanks
Josh
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OryZZ2rtGHA.4752@.TK2MSFTNGP02.phx.gbl...
> Josh
> I have been istalling SP4 mamy times and have never got the situation.
> Hmmm, try tirn off (from the network) the server and re-install SP4
>
>
> "Josh Lawrence" <someone@.microsoft.com> wrote in message
> news:%23DgeHurtGHA.4544@.TK2MSFTNGP04.phx.gbl...
>> Hi All,
>> I have a client who last night attempted to install sql 2000 Enterprise
>> Edition SP4. When running the first time through it got past the
>> Password Validation and moved to the Analysing and Preparing stage of the
>> installation. At this point it completely hung - after an hour there was
>> still no activity.
>> Now when attempting to re-install SP3a it states that a later version is
>> already installed and when attempting to reinstall SP4 it hangs on
>> password validation everytime.
>> This is a production server, does anyone know if it is possible to
>> recover from the above scenario?
>> Thanks
>> Larry
>|||Hi --
I have run into the exact same issue, where SP4 installation hangs on
password validation. It worked for me on number of other servers but it
doesn't work on this server.
I have tried using Windows and SQL Server authentication, sa without
password but it didn't make any difference.
Did anyone find a solution?
The funny thing is that @.@.version shows SP4, however it is Not SP4.
Thanks
Gurpreet
"Josh Lawrence" wrote:
> I have experienced this issue previously but can't recall the solution. I
> have the awful feeling it may require a complete reinstallation of SQL2000
> from the ground up.
> Thanks
> Josh
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OryZZ2rtGHA.4752@.TK2MSFTNGP02.phx.gbl...
> > Josh
> > I have been istalling SP4 mamy times and have never got the situation.
> > Hmmm, try tirn off (from the network) the server and re-install SP4
> >
> >
> >
> >
> >
> > "Josh Lawrence" <someone@.microsoft.com> wrote in message
> > news:%23DgeHurtGHA.4544@.TK2MSFTNGP04.phx.gbl...
> >> Hi All,
> >> I have a client who last night attempted to install sql 2000 Enterprise
> >> Edition SP4. When running the first time through it got past the
> >> Password Validation and moved to the Analysing and Preparing stage of the
> >> installation. At this point it completely hung - after an hour there was
> >> still no activity.
> >>
> >> Now when attempting to re-install SP3a it states that a later version is
> >> already installed and when attempting to reinstall SP4 it hangs on
> >> password validation everytime.
> >>
> >> This is a production server, does anyone know if it is possible to
> >> recover from the above scenario?
> >>
> >> Thanks
> >> Larry
> >>
> >
> >
>
>sql
Wednesday, March 28, 2012
Is it possible to merge date from 2 or 3 tables into a View?
each table has a DateTime column for the date and time the event occurs,
along with some data specific to the event. Can I pull all events from the
three tables into a single View so that the data appears as if it were one
single table, and use a where condition for the date range so that only
events in a certain date range for all three tables appear? So my output
might look like this
EventDate Type
=================
1/1/2001 1
1/2/2001 2
2/1/2003 3
... etc...
Not sure if this makes sense but. I really don't care about the data in the
tables for this example, only the ocurrances in dates ranges for all three.
thanks,
JIM
EventTables
CREATE TABLE dbo.Type1Events (
id int NOT NULL IDENTITY (1, 1),
eventDate datetime NOT NULL,
somedata text NOT NULL
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE dbo.Type2Events (
id int NOT NULL IDENTITY (1, 1),
eventDate datetime NOT NULL,
somedata text NOT NULL
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE dbo.Type3Events (
id int NOT NULL IDENTITY (1, 1),
eventDate datetime NOT NULL,
somedata text NOT NULL
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
INSERT INTO Type1Events ( eventDate, someData ) values ( '1/1/2001',
'data1' )
INSERT INTO Type1Events ( eventDate, someData ) values ( '1/1/2002',
'data2' )
INSERT INTO Type2Events ( eventDate, someData ) values ( '1/1/2003',
'data3' )
INSERT INTO Type2Events ( eventDate, someData ) values ( '2/1/2002',
'data4' )
INSERT INTO Type3Events ( eventDate, someData ) values ( '3/1/2001',
'data5' )
INSERT INTO Type3Events ( eventDate, someData ) values ( '4/1/2002',
'data6' )
INSERT INTO Type2Events ( eventDate, someData ) values ( '5/1/2006',
'data7' )
INSERT INTO Type1Events ( eventDate, someData ) values ( '6/1/2004',
'data8' )
INSERT INTO Type3Events ( eventDate, someData ) values ( '7/1/2005',
'data9' )
GOcreate view events
as
select eventDate, someData from Type1Events
union all
select eventDate, someData from Type2Events
union all
select eventDate, someData from Type3Events
go|||Sorry, a more complete solution is:
create view events
as
select 1 as eventType, eventDate, someData from Type1Events
union all
select 2, eventDate, someData from Type2Events
union all
select 3, eventDate, someData from Type3Events
go|||Jeff,
Thanks a lot!, I figured it should be easy but havn't used union much so...
thanks,
JIM
"JeffB" <jeff.bolton@.citigatehudson.com> wrote in message
news:1142016783.270339.21280@.u72g2000cwu.googlegroups.com...
> Sorry, a more complete solution is:
> create view events
> as
> select 1 as eventType, eventDate, someData from Type1Events
> union all
> select 2, eventDate, someData from Type2Events
> union all
> select 3, eventDate, someData from Type3Events
> go
>
Friday, March 23, 2012
Is it possible to extract RS installation credentials
access to both an SQL Server and Analysis Services. Eventually i got it
running smooth. The issues where setting the accounts during
installation of RS in a combination that worked for my situation.
Now the problem: RS eval expired so i am not able to inspect any
settings and the RSReportServer.config file has encrypted values and
the rsconfig utility can only set values in the config file. Moment 22.
Is there anyway i can extract installation settings from the config
file so i can repeat the installation with a licensed version of RS?
No.
Only what you can see in the config files. The encrypted content is not accessible.
If you want to know the service accounts, check the Windows and Web services through the service control panel applet or through the IIS Manager plugin.
sqlIs it possible to design a ReportViewer report at run time?
Monday, March 19, 2012
Is it possible to chart values contained within a single field?
Just picking up SRS for the first time, so please excuse me if my question turns out to be dumb. If I have a Field that contains a csv (comma seperated variable) list of integers, is there any way to chart those values within a report?
I.e:
SELECT id, value FROM DataTable WHERE id = @.ValueId
id value
-- --
1 1,2,3,4,5,6,7,8,9,10,11
(1 row(s) affected)
I can do something like =split(Fields!Value.Value, ",") to get the individual data points out, but I'm not sure how to create a data set out of them so that I can point the chart to it. Changing the DB schema to accomidate the report is kinda out of the question at this point.
Thanks!
You could rewrite your query to split "Value" into numbers and group it by "ID", something like this:
1, ‘1,2,3,4’
2, ‘1,1,2’
1, 1
1,2
1,3
1,4
2,1
2,1
2,2
You can use split() but I don't think you can use it in the chart. It won't acceppt string[] as a value.
Is it possible to change the operator of an expression at run time?
I have a report I have created in local mode, in a Winform ReportViewer using VB.net.
Is it possible to change the operator of an expression at run time? That is, I have a filter on a list that looks like this:
Expression: =Fields!InvNum.Value
Operator: =
Value: =Parameters!InvNum.Value
It is possible in code to change the operator from = to >= at the time I run the report? If so, what is the syntax? What I would like to do (don't know it is possible) is to have the operator set to >= at the time the the report is run and then set it back to = when a user selects a specific value for a Parameter for the report. Is this possible?
I suppose I can set it in the load event of the form that contains the ReportViewer, but if this is possible I have not been able to discover the syntax.
Anyone?
You can't change the filter operator at run-time. But you can change the filter expression to =IIF(<your condition>, Fields!InvNum.Value=Parameters!InvNum.Value, Fields!InvNum.Value>=Parameters!InvNum.Value), and the filter value to =true.|||Thank you for responding.
It's not clear to me what you're saying. I mean I understand that you can change the filter expression as a whole (and not the filter operator) and I understand that you can do that with an Immediate IF statement, but where?
Are you saying that you can change the expression in code, at run time? If so, how and Where, specifically?
Or, are you saying that in the Filter tab of the List component that you can enter an IIF there? If so, what kind of value would I put in <your condition>?
It may be that I am asking a question that seems illogical to you, like "How is time?". But to me, what I am trying to do is pretty common. I am trying to figure out a way to bring lots of information into a report and then give the user the ability to whittle it down if he wants to.
|||OK. I think I understand some of this. I created an additional string parameter for the report called IWantToSeeAllRows. I set the default value to Y. Then in the filter tab of the list, in the expression column I typed the following:
=IIF(Parameters!IWantAllRows.Value = "Y", Fields!InvNum.Value>=Parameters!InvNum.Value, Fields!InvNum.Value=Parameters!InvNum.Value)
After typing the above RS put an = character in the Operator column and <Blank> in the Value column of the grid in the filter tab.
When running the report I get an error of "Cannot compare data of types system boolean and system string. Please check the data type returned by the filter expression.
I am really guessing here as to where just exactly to place the code etc., but the documentation that I've found on the matter is not explicit for this particular issue. What am I missing?
|||Most likely you changed the filter value expression to a constant value like TRUE (which is interpreted as string - hence the type mismatch).
Change the filter value expression to =True (which evalutes to a boolean)
-- Robert
Is it possible to acces 2 sql servers at the same time?
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CK
I've done this using linked servers. Never done it between 7 and 2000 but
it should work. Your query would look something like this.
Select a.col1, b.col1
from server7.db1.dbo.tablea a join server2000.db2.dbo.tableb b
on a.id=b.id
Here server7 and server2000 are your link server defined for you two
different servers.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
>
> I was wondering if it is possible to access 2 different
> databases on 2 different sql servers (7 and 2000) located
> in to different locations?
> Thanks
> CK
|||Sure. See if this helps: http://vyaskn.tripod.com/programming_faq.htm#q14
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
I was wondering if it is possible to access 2 different
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CK
Is it possible to acces 2 sql servers at the same time?
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CKI've done this using linked servers. Never done it between 7 and 2000 but
it should work. Your query would look something like this.
Select a.col1, b.col1
from server7.db1.dbo.tablea a join server2000.db2.dbo.tableb b
on a.id=b.id
Here server7 and server2000 are your link server defined for you two
different servers.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
>
> I was wondering if it is possible to access 2 different
> databases on 2 different sql servers (7 and 2000) located
> in to different locations?
> Thanks
> CK|||Sure. See if this helps: http://vyaskn.tripod.com/programming_faq.htm#q14
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
I was wondering if it is possible to access 2 different
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CK
Is it possible to acces 2 sql servers at the same time?
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CKI've done this using linked servers. Never done it between 7 and 2000 but
it should work. Your query would look something like this.
Select a.col1, b.col1
from server7.db1.dbo.tablea a join server2000.db2.dbo.tableb b
on a.id=b.id
Here server7 and server2000 are your link server defined for you two
different servers.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
>
> I was wondering if it is possible to access 2 different
> databases on 2 different sql servers (7 and 2000) located
> in to different locations?
> Thanks
> CK|||Sure. See if this helps: http://vyaskn.tripod.com/programming_faq.htm#q14
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"CK" <anonymous@.discussions.microsoft.com> wrote in message
news:94a601c485fd$49c0d1d0$a601280a@.phx.gbl...
I was wondering if it is possible to access 2 different
databases on 2 different sql servers (7 and 2000) located
in to different locations?
Thanks
CK
Is it possible to "disable" all restrictions on a Ms sql DB?
I have to do a maunally, one time, building of a database. Sometables has to
stay an some are to be exchanged. The foreignkey inforcemnt ill do for my
self so everything is correct. I just need to be allowed to de thede task
for a while. Is it impossible?
Regards
Anders"Flare" <dct_flare@.hotmail.com> wrote in message news:<3f302ad3$0$24659$edfadb0f@.dread14.news.tele.dk>...
> In meen. primary keys, NOT NULL, IDENTETIES...et.c
> I have to do a maunally, one time, building of a database. Sometables has to
> stay an some are to be exchanged. The foreignkey inforcemnt ill do for my
> self so everything is correct. I just need to be allowed to de thede task
> for a while. Is it impossible?
> Regards
> Anders
You can disable foreign keys, check constraints and triggers with
ALTER TABLE. But you can't disable primary keys, NULL/NOT NULL is
(usually) part of the column definition, and IDENTITY is a column
property, so they can't be enabled/disabled in the same way.
It's not entirely clear from your comments what problems you're having
with the import, so if you can be more specific then perhaps someone
can help.
Simon
Friday, March 9, 2012
Is it ever possible that 2 different rows are inserted at same time into a table?
There is a stored procedure that inserts a row into 'Vendors' table. Is it possible that two different calls to this sp happen at the same time and as a result, each sp inserts into the table its row atexactly the same time?
How you can insert two records same time as your table will be locked while inserting data.
Is it better work with date/time in same field or separated?
Is it better work with date/time in same field or separated as below:
varX = '12/12/2003' + '12:45' »» in same field in the table
OR
varX = '12/12/2003' + '12:45' »» in separated fields in the table
varY = '12:45'
Thanks,
VILMAR
BRAZIL
PRAIA GRANDE/SPUse a DATETIME column. This will make the most out of indexing, date range
queries, date comparisons, built in functions like datepart(), dateadd() and
datediff(), and easier legibility.
Since SQL Server doesn't have separate DATE and TIME datatypes, moving them
to separate columns would either mean (a) having useless date information in
the "time" column and useless time information in the "date" column, or (b)
converting the columns to a different datatype. For more information, see
http://www.aspfaq.com/2206
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vilmar Brazão de Oliveira" <suporte@.hitecnet.com.br> wrote in message
news:#60t$RZxDHA.1704@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is it better work with date/time in same field or separated as below:
> varX = '12/12/2003' + '12:45' »» in same field in the table
> OR
> varX = '12/12/2003' + '12:45' »» in separated fields in the table
> varY = '12:45'
> Thanks,
> VILMAR
> BRAZIL
> PRAIA GRANDE/SP
>
Wednesday, March 7, 2012
is it a bug?
I have a view named x_vw and while ? exec it as
select * from x_vw where field1='a1'
it returns the results which are field1='a1' but when I exec the query as
select * from x_vw
it returns all results but eccept the results which are field1='a1'
select * from X_VW where SiparisNo='a1'
returns data I want but the same data doesnt exists in the resultset of
select * from X_VW
its funny that I find a stupid solution for a stupid problem:))
select * from X_VW where SiparisNo like '%%'
I'm starving for explanation
is it a bug?
if so how can I report a bug to Microsoft?
CREATE view X_VW
as
SELECT sd.Sirketkod AS 'sirket',c.HesapKodu AS 'Sat?c?', c.Unvan,
sd.EvrakNo AS 'SiparisNo',
sd.MalKodu,
s.MalAdi,
SUM(sd.Miktar) AS 'Siparis',
dbo.DMGetIthSipIptalMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu) as
'iptalMiktar',
dbo.DMGetIthSipFatMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu) as
'Kars?lanan',
SUM(sd.Miktar)-dbo.DMGetIthSipFatMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu
) as 'Kalan',
dbo.DMGetIthStokGirMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu)as 'StokGiris
',
sh.EkSipNo,sh.aciklama,sh.SiparisTip,
s.kod1,
s.kod2,
s.kod3,
s.kod4,
s.kod5,
gamet2003.dbo.DMGetStokMik(sd.Sirketkod,sd.Malkodu)as 'stokmiktar',
Isnull(f.fiyat,0) as 'Ithalat_fiyati', Isnull(f.dovizkod,'yok') as 'Dovizkod
',
sd.Fiyat as 'SipFiyat', Isnull(sh.dovizkod,'yok') as 'SipDovizkod'
FROM gamet2003..SIP_D sd
inner join gamet2003..SIP_H sh on sh.SirketKod = sd.SirketKod AND sh.EvrakNo
= sd.EvrakNo
inner join gamet2003..CHK c on sd.SirketKod = c.SirketKod AND sd.Chk =
c.HesapKodu
inner join gamet2003..STK s on s.SirketKod = sd.SirketKod AND s.MalKodu =
sd.MalKodu
left join gamet2003..FIYATLIST f on f.sirketkod=sd.sirketkod and
s.malkodu=f.malkodu and f.Fiyatkod='ITHALAT'
WHERE sd.SirketKod='gamet' and sh.EvrakNo like 'IAS%'
and exists(select 1 from
(
select x.sirketkod,x.evrakno
from
(
select th.sirketkod,th.evrakno from gamet2003..ITH_SIP_D th,
gamet2003..SIP_D sp
where sp.sirketkod=th.sirketkod and sp.evrakno=th.evrakno and
sp.oldsirano=th.sirano
and (sp.beklet is null or sp.beklet=0)
group by th.sirketkod,th.evrakno
having abs(sum(sp.kalanmiktar-th.karsilananmiktar))>0
union all
select td.sirketkod,td.oldevrakno as evrakno from gamet2003..ITH_D td
left join gamet2003..STI_H sh on sh.sirketkod=td.sirketkod and
sh.Irsaliyeno=td.Evrakno and (sh.beklet is null or sh.beklet=0)
left join gamet2003..STI_D sd on sd.sirketkod=td.sirketkod and
sh.evrakno=sd.evrakno and (sd.beklet is null or sd.beklet=0)
where (td.beklet is null or td.beklet=0)
group by td.sirketkod,td.oldevrakno
having Isnull(sum(td.miktar),0)>Isnull(sum(sd.miktar),0)
)X
group by x.sirketkod,x.evrakno
)y
where y.sirketkod=sd.sirketkod and y.evrakno=sd.evrakno)and (sd.beklet is
null or sd.beklet=0)
group by sd.SirketKod,c.HesapKodu, c.Unvan, sd.EvrakNo,
sd.MalKodu,s.MalAdi,sh.EkSipNo,sh.aciklama,sh.SiparisTip,s.kod1,s.kod2,s.kod
3,s.kod4,s.kod5,f.fiyat,f.dovizkod,sd.Fiyat,sh.dovizkodHi
Call Microsoft PSS.
http://support.microsoft.com/common/international.aspx
You will be expected to be able to give them sufficient data to reproduce
the problem.
If it is not a bug, you will be charged for the support.
Regards
Mike
"POKEMON" wrote:
> it is the second time i am writing this problem.
> I have a view named x_vw and while ? exec it as
> select * from x_vw where field1='a1'
> it returns the results which are field1='a1' but when I exec the query as
> select * from x_vw
> it returns all results but eccept the results which are field1='a1'
> select * from X_VW where SiparisNo='a1'
> returns data I want but the same data doesnt exists in the resultset of
> select * from X_VW
> its funny that I find a stupid solution for a stupid problem:))
> select * from X_VW where SiparisNo like '%%'
> I'm starving for explanation
> is it a bug?
> if so how can I report a bug to Microsoft?
>
> CREATE view X_VW
> as
> SELECT sd.Sirketkod AS 'sirket',c.HesapKodu AS 'Sat?c?', c.Unvan,
> sd.EvrakNo AS 'SiparisNo',
> sd.MalKodu,
> s.MalAdi,
> SUM(sd.Miktar) AS 'Siparis',
> dbo.DMGetIthSipIptalMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu) as
> 'iptalMiktar',
> dbo.DMGetIthSipFatMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu) as
> 'Kars?lanan',
> SUM(sd.Miktar)-dbo.DMGetIthSipFatMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKo
du) as 'Kalan',
> dbo.DMGetIthStokGirMikgamet(sd.SirketKod,sd.EvrakNo,sd.MalKodu)as 'StokGir
is',
> sh.EkSipNo,sh.aciklama,sh.SiparisTip,
> s.kod1,
> s.kod2,
> s.kod3,
> s.kod4,
> s.kod5,
> gamet2003.dbo.DMGetStokMik(sd.Sirketkod,sd.Malkodu)as 'stokmiktar',
> Isnull(f.fiyat,0) as 'Ithalat_fiyati', Isnull(f.dovizkod,'yok') as 'Dovizk
od',
> sd.Fiyat as 'SipFiyat', Isnull(sh.dovizkod,'yok') as 'SipDovizkod'
> FROM gamet2003..SIP_D sd
> inner join gamet2003..SIP_H sh on sh.SirketKod = sd.SirketKod AND sh.Evrak
No
> = sd.EvrakNo
> inner join gamet2003..CHK c on sd.SirketKod = c.SirketKod AND sd.Chk =
> c.HesapKodu
> inner join gamet2003..STK s on s.SirketKod = sd.SirketKod AND s.MalKodu =
> sd.MalKodu
> left join gamet2003..FIYATLIST f on f.sirketkod=sd.sirketkod and
> s.malkodu=f.malkodu and f.Fiyatkod='ITHALAT'
> WHERE sd.SirketKod='gamet' and sh.EvrakNo like 'IAS%'
> and exists(select 1 from
> (
> select x.sirketkod,x.evrakno
> from
> (
> select th.sirketkod,th.evrakno from gamet2003..ITH_SIP_D th,
> gamet2003..SIP_D sp
> where sp.sirketkod=th.sirketkod and sp.evrakno=th.evrakno and
> sp.oldsirano=th.sirano
> and (sp.beklet is null or sp.beklet=0)
> group by th.sirketkod,th.evrakno
> having abs(sum(sp.kalanmiktar-th.karsilananmiktar))>0
> union all
> select td.sirketkod,td.oldevrakno as evrakno from gamet2003..ITH_D td
> left join gamet2003..STI_H sh on sh.sirketkod=td.sirketkod and
> sh.Irsaliyeno=td.Evrakno and (sh.beklet is null or sh.beklet=0)
> left join gamet2003..STI_D sd on sd.sirketkod=td.sirketkod and
> sh.evrakno=sd.evrakno and (sd.beklet is null or sd.beklet=0)
> where (td.beklet is null or td.beklet=0)
> group by td.sirketkod,td.oldevrakno
> having Isnull(sum(td.miktar),0)>Isnull(sum(sd.miktar),0)
> )X
> group by x.sirketkod,x.evrakno
> )y
> where y.sirketkod=sd.sirketkod and y.evrakno=sd.evrakno)and (sd.beklet is
> null or sd.beklet=0)
> group by sd.SirketKod,c.HesapKodu, c.Unvan, sd.EvrakNo,
> sd.MalKodu,s.MalAdi,sh.EkSipNo,sh.aciklama,sh.SiparisTip,s.kod1,s.kod2,s.k
od3,s.kod4,s.kod5,f.fiyat,f.dovizkod,sd.Fiyat,sh.dovizkod
>|||Hi POKEMON,
Your current view is very complex, too complex to analyse over a
newsgroup (and missing DDL and sample data). But still: It sounds like a
bug. The big question is: is this a known / documented bug or a new bug.
There are some known issues relating to parallellism. I would start by
adding the query hint OPTION (MAXDOP 1) when querying the view. So for
example:
select * from X_VW option (maxdop 1)
And of course, make sure you are running the latest SQL-Server service
pack (3a).
If money is not an issue, then you can contact Microsoft Support (as
posted by Mike). Otherwise, it makes sense to isolate the problem. You
can do this by removing all columns, UDFs, joins, etc. that do not
influence the problem.
For example: does the problem still remain if all UDFs are removed? Does
the problem still remain if the entire EXISTS subquery is removed? Does
the problem still remain if all outer joins are removed? Does the
problem still remain if you rewrite "gamet2003..ITH_SIP_D th,
gamet2003..SIP_D sp" as an INNER JOIN? Does the problem still remain if
you remove all OR operators by rewriting all "<something> is null or
<something> = 0" to "<something> is null"?
In the end, Microsoft will need a script to reproduce the problem.
HTH,
Gert-Jan
Monday, February 20, 2012
Is AUTOGROW info recorded?
info related to auto-growing of datafiles recorded in an error log / event /
sql log / anywhere?
tia
chris
It's not audited, AFAIK.
-oj
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:1AE8AB19-BE65-489A-91BA-F35FC4049D90@.microsoft.com...
> Is the before & after size, autogrow start & complete time , or any other
> info related to auto-growing of datafiles recorded in an error log / event
> /
> sql log / anywhere?
> tia
> chris
|||Chris wrote:
> Is the before & after size, autogrow start & complete time , or any
> other info related to auto-growing of datafiles recorded in an error
> log / event / sql log / anywhere?
> tia
> chris
You can detect an auto grow op in Profiler under Database - Data Auto
Grow /Shrink and Log Auto Grow / Shrink.
David Gugick
Imceda Software
www.imceda.com
Is AUTOGROW info recorded?
info related to auto-growing of datafiles recorded in an error log / event /
sql log / anywhere?
tia
chrisIt's not audited, AFAIK.
-oj
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:1AE8AB19-BE65-489A-91BA-F35FC4049D90@.microsoft.com...
> Is the before & after size, autogrow start & complete time , or any other
> info related to auto-growing of datafiles recorded in an error log / event
> /
> sql log / anywhere?
> tia
> chris|||Chris wrote:
> Is the before & after size, autogrow start & complete time , or any
> other info related to auto-growing of datafiles recorded in an error
> log / event / sql log / anywhere?
> tia
> chris
You can detect an auto grow op in Profiler under Database - Data Auto
Grow /Shrink and Log Auto Grow / Shrink.
David Gugick
Imceda Software
www.imceda.com
Is AUTOGROW info recorded?
info related to auto-growing of datafiles recorded in an error log / event /
sql log / anywhere?
tia
chrisIt's not audited, AFAIK.
--
-oj
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:1AE8AB19-BE65-489A-91BA-F35FC4049D90@.microsoft.com...
> Is the before & after size, autogrow start & complete time , or any other
> info related to auto-growing of datafiles recorded in an error log / event
> /
> sql log / anywhere?
> tia
> chris|||Chris wrote:
> Is the before & after size, autogrow start & complete time , or any
> other info related to auto-growing of datafiles recorded in an error
> log / event / sql log / anywhere?
> tia
> chris
You can detect an auto grow op in Profiler under Database - Data Auto
Grow /Shrink and Log Auto Grow / Shrink.
--
David Gugick
Imceda Software
www.imceda.com
Is are a way to convert the SQL datetime to MFC CTime
Here is the time in SQL : 2/21/2003 12:00:00 PM (DataType :datetime)
How can i convert this into CTime .the MFC class
Help inthis regard is appreciated,
Thanks in AdvanceA datetime is not that format. It is a decimal number - that is just the way it is converted for display.
What format do you need it in to put into a CTime.|||Thanks 'nigelrivett' for replying me
Yes...I reading the date(datetime) from the Data Base as the String..I want Month,Year,Date,Hour and Minute to build the Time for my application.
i like to build the CTime as below:
CTime Ts(nYear,nMonth,nDate,nHour,nMinute,nSecond,o);
So please tell me how get the Hour,minute,Day,Year from the Data Base.
Thanks in advance,
Sirish|||try:
select getdate() as 'Original Date'
, datepart(yy,getdate()) as 'Year'
, datepart(mm,getdate()) as 'Month'
, datepart(dd,getdate()) as 'Day'
, datepart(hh,getdate()) as 'Hour'
, datepart(mi,getdate()) as 'Minute'
, datepart(ss,getdate()) as 'Second'
, datepart(ms,getdate()) as 'Millisecond'