Showing posts with label due. Show all posts
Showing posts with label due. Show all posts

Monday, March 26, 2012

Outer Join problems

This may or may not be due to my lack of knowledge on the use of outer join. I am getting the error:

Server: Msg 208, Level 16, State 1, Line 1

Invalid object name 'IncidentId'.

From my query:

SELECT Incident_Incidents.RelatedIncidentId,

Incident_Incidents.RelatedType,

Incident.Subject,

Incident.RecordId

From Incident_Incidents, Incident

left outer join IncidentId on Incident.IncidentId = Incident_Incidents.IncidentId

where Incident.IncidentId = 12838

Any ideas?

SELECT

Y.RelatedIncidentId,

X.RelatedType,

X.Subject,

X.RecordId

From

Incident_Incidents X

LEFT OUTER JOIN Incident Y

ON

X.IncidentId = Y.IncidentId

where X.IncidentId = 12838

|||Sorry not to clear on what you've got going on here, Tried running it with no luck|||

Here is a sample of some real code; I might of have mistaken some of your field name. It looks like your trying to left outer join on a column name instead of a table name, which will not work.

SELECT

P.iPLANID

FROM

PLANS P

INNER JOIN Units M

ON M.iPlanid = P.iPlanid

|||

my guess:

SELECT Incident_Incidents.RelatedIncidentId,

Incident_Incidents.RelatedType,

Incident.Subject,

Incident.RecordId

From Incident_Incidents

left outer join Incident on Incident.IncidentId = Incident_Incidents.RelatedIncidentId

where Incident.IncidentId = 12838

Monday, February 20, 2012

OS error 5 in PULL Subscription

I am getting the error:
The process could not read file
'\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1\20050203112524\Table1.
sch' due to OS error 5. The step failed.
when trying to start a PULL subscription in SQL Server 7.0.
The '\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1' path has all
rights given to Everyone.
Any ideas?
-WillError 5 is Access denied. So check both, NTFS and Share permissions, ant try
to connect there using Agents account.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
"Will T" <unknown@.nowhere.net> wrote in message
news:O0cODFiCFHA.3280@.TK2MSFTNGP14.phx.gbl...
> I am getting the error:
> The process could not read file
>
'\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1\20050203112524\Table1.
> sch' due to OS error 5. The step failed.
> when trying to start a PULL subscription in SQL Server 7.0.
> The '\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1' path has all
> rights given to Everyone.
> Any ideas?
> -Will
>|||I am connecting using the sa account on the Distributor. What NT account
would that be?
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:OmSaYNiCFHA.1392@.tk2msftngp13.phx.gbl...
> Error 5 is Access denied. So check both, NTFS and Share permissions, ant
try
> to connect there using Agents account.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> www.SolidQualityLearning.com
> "Will T" <unknown@.nowhere.net> wrote in message
> news:O0cODFiCFHA.3280@.TK2MSFTNGP14.phx.gbl...
>
'\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1\20050203112524\Table1.
>|||Is that a hidden public share or is it the admin share? It
looks like an admin share and if it's an administrative
share, the account needs to be an admin on the box to access
the share. Or you need to create a public share with the
appropriate rights, permissions.
-Sue
On Thu, 3 Feb 2005 13:50:40 -0500, "Will T"
<unknown@.nowhere.net> wrote:

>I am getting the error:
>The process could not read file
> '\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1\20050203112524\Table1
.
>sch' due to OS error 5. The step failed.
>when trying to start a PULL subscription in SQL Server 7.0.
>The '\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1' path has all
>rights given to Everyone.
>Any ideas?
>-Will
>|||Will,
Dejan is referring to the SQL Server Agent on your subscriber. That is a
service running as a domain user which should have the right to read files
from the distribution working folder. Log on to the subscriber using this
same account and try to read files from the DWF to double-check that rights
are set up correctly.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||Well spotted Sue,
- Will, typically you'd share \\MYSERVER\ReplData
Rgds,
Paul Ibison|||Thanks for the clarification. I will look in to it.
Thanks,
Will
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uC$9qAjCFHA.3732@.TK2MSFTNGP14.phx.gbl...
> Will,
> Dejan is referring to the SQL Server Agent on your subscriber. That is a
> service running as a domain user which should have the right to read files
> from the distribution working folder. Log on to the subscriber using this
> same account and try to read files from the DWF to double-check that
rights
> are set up correctly.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>|||The '\\MYSERVER\ReplData' is shared to Everyone. Thanks.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:b505011s7n93vo5p6cd8v6hin7e6ho8013@.
4ax.com...
> Is that a hidden public share or is it the admin share? It
> looks like an admin share and if it's an administrative
> share, the account needs to be an admin on the box to access
> the share. Or you need to create a public share with the
> appropriate rights, permissions.
> -Sue
> On Thu, 3 Feb 2005 13:50:40 -0500, "Will T"
> <unknown@.nowhere.net> wrote:
>
> '\\MYSERVER\D$\MSSQL7\ReplData\unc\MYSER
VER_PUB1_PUB1\20050203112524\Table1
.
>|||Thank you all for the information. The account on the local MSDE machine was
only a local account. I changed it to an account on the network and it now
works fine.
Q: is it standard practice to make an accoutn just for this type of thing?
-Will
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uC$9qAjCFHA.3732@.TK2MSFTNGP14.phx.gbl...
> Will,
> Dejan is referring to the SQL Server Agent on your subscriber. That is a
> service running as a domain user which should have the right to read files
> from the distribution working folder. Log on to the subscriber using this
> same account and try to read files from the DWF to double-check that
rights
> are set up correctly.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>|||If you need the SQL Server to access anything outside of its own process eg
mail, reporting services, replication, then a domain user is mandatory. We
tend to have a separate domain user account for each server, although we
have some non-trusted domains so this is mandatory. This account is a local
administrator, but not a domain admin. I have also seen places where the
same account is used for each sql server. In part I guess it depends on how
securely you guard your passwords - in the one-for-all scenario, if the
password is compromised, you lose control of all your servers.
HTH,
Paul Ibison (SQL Server MVP)