Showing posts with label dbo. Show all posts
Showing posts with label dbo. Show all posts

Tuesday, March 20, 2012

authentication failed

Hi.

I wrote a view command on server1 like ..

select dbo.ordr.docnum from Server2.SAP.dbo.ordr where dbo.ordr.docstatus ='o' and

system dispaly a error message is authentication failed. but I use administrator to logon

Server1. how to setup authentication between 2 SQL server?

Thanks

moved to security forum.

|||

I would suggest trying to find out a solution on BOL, here is a good staring point:

· Distributed Queries http://msdn2.microsoft.com/en-us/library/ms188721.aspx

· Distributed Queries Stored Procedures http://msdn2.microsoft.com/en-us/library/ms174359.aspx

Since it seems like you may be using Windows credentials to connect to the 2nd server, I would also strongly recommend reading the following topic:

· Configuring Linked Servers for Delegation http://msdn2.microsoft.com/en-us/library/ms189580.aspx

Please let us know if this information helped or if you have any additional questions.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Thanks.

I found a topic is "How to create a linked server", so I resolved my problem.

sql

Sunday, February 19, 2012

Attachment file is invalid.

Hello,

I have a stored procedure with this syntax

declare @.filename varchar(100)

set @.filename='c:/A.pdf'

EXEC msdb.dbo.sp_send_dbmail

@.profile_name =@.p_profile

@.recipients = @.p_address,

@.body = @.p_body,

@.subject = @.p_subject,

@.file_attachments = @.filename

but when I execute it i have an error

Attachment file c:/A.pdf is invalid.

What's happen? Thanks in advance

hi,

It seems you are trying to load the file from invalid path. Change to

@.filename='C:\A.pdf' instead of 'c:/A.pdf'

Also make sure that A.pdf file is availed in C Drive.

|||Moving to the Transact-SQL forum.