Xp_sendmail && Xp_logininfo No Longer Working Under Certain Scenarios

Feb 11, 2005

Hello,

I had a notification set up using xp_sendmail working fine for a while. Recently I updated the SQL Server (http://www.windowsitpro.com/Forums/messageview.cfm?catid=1664&threadid=129743#) to sp3a and we moved the mailbox (http://www.windowsitpro.com/Forums/messageview.cfm?catid=1664&threadid=129743#) that I was using to a Exchange 2003 server. I can still send my notification if I use the domain ID that runs the SQL service and the sa ID, but not the NT ID's that were running it before. I have users use NT authentication (http://www.windowsitpro.com/Forums/messageview.cfm?catid=1664&threadid=129743#) from a domain that's different than the one that the SQL server (http://www.windowsitpro.com/Forums/messageview.cfm?catid=1664&threadid=129743#) resides. There is a trust and nothing has changed with that. Below are the results when I try to run the notification using an NT ID. This ID has full permissions over the SQL server.

SQL Mail session started.
ODBC error 8198 (42000) Could not obtain information about Windows NT (http://www.windowsitpro.com/Forums/messageview.cfm?catid=1664&threadid=129743#) group/user 'INTERNALxxx.xxx'.

Stopped SQL Mail session.

As you can see SQL Mail starts and stops ok, but I get the error on the xp_sendmail itself. I can run xp_logininfo to return all of the ID's using this NT login. But if I run xp_logininfo just on the problem ID, I get the following results.

EXEC master..xp_logininfo
@acctname = 'INTERNALxxx.xxx'

Server: Msg 8198, Level 16, State 24, Procedure xp_logininfo, Line 58
Could not obtain information about Windows NT group/user 'INTERNALxxx.xxx'.

Here's when it works.

EXEC master..xp_logininfo

BUILTINAdministrators group admin BUILTINAdministrators NULL
INTERNALxxx.xxx user admin INTERNALxxx.xxx NULL
INTERNALSxx Axx group admin INTERNALSxx Axx NULL
SISDOMsxx.dxx.axx user admin SISDOMsxx.dxx.axx NULL
SISDOMSxx.Dxx.Axx group admin SISDOMSxx.Dxx.Axx NULL
INTERNALlxxx.rxxx user user INTERNALlxxx.rxxx NULL

The ones in bold work for everything. Please advise?

Julie

View 2 Replies


ADVERTISEMENT

Working With Xp_sendmail

Jul 23, 2005

I'm working with sqlserver2000 on a server2003.My e-mail via xp_sendmail is working good.But I have one problem --> every mail I send via xp_sendmail does not appearin de sent-items van the account of the mapi on my server.Can someone give a hint to solve this problem ?thanksGeert

View 1 Replies View Related

SQL 2012 :: Backups And Integrity Tasks No Longer Working

May 29, 2014

Up until a couple of days ago all my maintenance plans were working.

Now they are all failing with the following errors -

Message
Executed as user: MHS2sql2008. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 10:07:02 Progress: 2014-05-29 10:07:03.20 Source: {CE851AA2-045F-429A-885E-E60E75A38639} Executing query "DECLARE @Guid UNIQUEIDENTIFIER

[Code] ....

The package execution failed. The step failed. Now I have changed the SQL Server Agent service account to use a network account called "sql2008".Stopped and started the Agent service.

The account has access to the folders it is trying to back up to. It's a full admin on the sql box and the box where I am trying to backup to?

View 4 Replies View Related

Adding A New Record Takes Longer And Longer -- Archive? (was Table Help)

Mar 1, 2005

Hi we have a table with about 400000 records in it. It starting to take longer and longer to add a new record. I was thinking of creating another identical table and archiving off most of the records every month (we are now adding about about 4000 records a day) . Is this the best thing to do?
I don't know a lot about sql server so any help or suggestions would be great

View 4 Replies View Related

XP_logininfo

Sep 29, 2006

Hello,

I read about limitations on running the Xp_logininfo in SQL 2005. In fact, from: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/ee7162b5-e11f-4a0e-a09c-1878814dbbbd.htm

I read





Note:



In earlier versions of Microsoft SQL Server, permission to execute xp_logininfo can be granted to users. In SQL Server 2005, xp_logininfo can be run only by an administrator.

Nevertheless, I made a test and succeeded to grant the rights to a user which is not an administrator, have you any ideas on the reason?

Thank you very much

View 2 Replies View Related

Join The Result Of Xp_logininfo With A Table

Jul 23, 2005

Hello group!i have a table "group_code" wich relates the names ofnt-(domain)-groups to codes. now i want use the stored procedurexp_logininfo (asking for the group-membership of the current user) tojoin the result to "group_code". then i must use the new result (thecode) to join against other tables.i know now, that i cant join results of SPs against tables. may be thata UDF with a table result is the correct approach. but i have no ideahow to wrap the xp_logininfo in a UDF.a other way can be to do in a UDF the same thing like the xp_logininfo.then this UDF should deliver at least the nt-(domain)-groups in wichthe current-user is a member.Is there anybody who can give me the code for that?many thanx in advance.Karl

View 1 Replies View Related

Restore Taking Longer And Longer

Feb 4, 2008

The following code is taking longer and longer to run. I am not talking about the gradualy increase in size. this job has been taking 30-40 mins normaly and in the last few days it has gone 1hr to 2 hr to 3 hr... ANy ideas why this is happening? I can not see and other jobs running at this time.

declare @filename varchar(255)

set @filename =
(select top 1 physical_device_name
from ****.msdb.dbo.backupset bs, ****.msdb.dbo.backupmediafamily bf
where bs.media_set_id=bf.media_set_id
and database_name = 'Live_PRD'
and backup_start_date>getdate()-1
and type = 'D'
order by backup_start_date desc)

restore database REPORTS_REP
from disk=@filename
with
move 'LIVE_PRD_Data' to 'T:SOUTHREPORTS_REP_Data.mdf',
move 'LIVE_PRD_Log' to 'U:SOUTHREPORTS_REP_Log.ldf',
move 'LIVE_PRD_Log2' to 'U:SOUTHREPORTS_REP_Log2.ldf',
replace, stats=2, recovery

View 5 Replies View Related

What Are The Scenarios

May 12, 2006

when one should use SSIS..different data sources,different destinations..etc...i hav never been in such a situation..i have been a developer..beside SSIS are there any MS tools?

thks

View 1 Replies View Related

Why Does It Take Longer And Longer For The Same Code To Run

Feb 22, 2008

Why does it take longer and longer for the same code to run very simply I have 8,0000,000 records I want to delete from a table . I have tried a few options

Option 1 a while loop which deletes 10,000 rows per loop starting from the earliest until it hits the cut of number I have set. THIS TOOK 5 HOURS

Option 2 created an SP which found the oldest 100,000 records then deleted them. If I run this SP manually it takes 30 €“ 60 secs. Which I thought was much better than above. So I put this SP in a while loop to run 80 odd times thinking the time it would take would be 80 mins a huge improvement.


But every time this SP is called it takes longer and longer (36,30,32,39,37,37,123,163,155,182€¦and so on(In seconds)).

All the sp is doing is as follows(8860000 is just to insure I don€™t delete to much). this sp is then called from in a while loop.


set @recnumber = (select top 1 recnumber from
(select top 100000 recnumber from TabletodeleteFROM where recnumber < 8860000
order by recnumber asc ) TabletodeleteFROM
order recnumber desc)

delete TabletodeleteFROM where recnumber < @recnumber


please help why is it taking longer and longer

View 8 Replies View Related

Troubleshooting Scenarios

Aug 29, 2007

Does anyone have any good places where I can get some practice scenarios for DBA activity? Also any transact sql puzzles to solve for practice purposes. I want to get as much "real world" activity under my belt as possible in a quick time-frame.

Thanks.

View 1 Replies View Related

SSB BizTalk Scenarios

Aug 18, 2006

What are the specific types of scenarios where we could use SSB and BizTalk in tandem?

I have come across a gotdotnet sample of an SSB adapter for BizTalk. As i understand a Biztalk orchestration could be an end point for the SSB conversation.

But what advantages can be obtained using this as compared to a typical SQL adapter for BizTalk which does CRUD operations on DB.

any pointers in this directions would be helpful

TIA

Paritosh

View 3 Replies View Related

Performance In Simple Scenarios

Aug 22, 2007

I have done some performance testing to see if asynchronous triggers performs any better than synchronous triggers in a simple audit scenario -- capturing record snapshots at insert, update and delete events to a separate database within the same instance of SQL Server.

Synchronous triggers performed 50% better than asynchronous triggers; this was with conversation reuse and the receive queue activation turned off, so the poor performance was just in the act of forming and sending the message, not receiving and processing. This was not necessarily surprising to me, and yet I have to wonder under what conditions would we see real performance benefits for audit scenarios.

I am interested if anyone has done similar testing, and if they received similar or different results. If anyone had conditions where asynchronous triggers pulled ahead for audit scenarios, I would really like to hear back from them. I invite any comments or suggestions for better performance.

The asynchronous trigger:



Code Snippet
ALTER TRIGGER TR_CUSTOMER_INSERT ON DBO.CUSTOMER
FOR INSERT AS
BEGIN
DECLARE
@CONVERSATION UNIQUEIDENTIFIER ,
@MESSAGE XML ,
@LOG_OPERATION CHAR(1) ,
@LOG_USER VARCHAR(35) ,
@LOG_DATE DATETIME;

SELECT TOP(1)
@CONVERSATION = CONVERSATION_HANDLE ,
@LOG_OPERATION = 'I' ,
@LOG_USER = USER() ,
@LOG_DATE = GETDATE()
FROM SYS.CONVERSATION_ENDPOINTS;

SET @MESSAGE =
( SELECT
CUST_ID = NEW.CUST_ID ,
CUST_DESCR = NEW.CUST_DESCR ,
CUST_ADDRESS = NEW.CUST_ADDRESS ,
LOG_OPERATION = @LOG_OPERATION ,
LOG_USER = @LOG_USER ,
LOG_DATE = @LOG_DATE
FROM INSERTED NEW
FOR XML AUTO );

SEND ON CONVERSATION @CONVERSATION
MESSAGE TYPE CUSTOMER_LOG_MESSAGE ( @MESSAGE );
END;






The synchronous trigger:



Code Snippet
ALTER TRIGGER TR_CUSTOMER_INSERT ON DBO.CUSTOMER
FOR INSERT AS
BEGIN
DECLARE
@LOG_OPERATION CHAR(1) ,
@LOG_USER VARCHAR(15) ,
@LOG_DATE DATETIME;

SELECT
@LOG_OPERATION = 'I' ,
@LOG_USER = USER() ,
@LOG_DATE = GETDATE()

INSERT INTO SALES_LOG.DBO.CUSTOMER
SELECT
CUST_ID = NEW.CUST_ID ,
CUST_DESCR = NEW.CUST_DESCR ,
CUST_ADDRESS = NEW.CUST_ADDRESS ,
LOG_OPERATION = @LOG_OPERATION ,
LOG_USER = @LOG_USER ,
LOG_DATE = @LOG_DATE
FROM INSERTED NEW
END;





View 4 Replies View Related

DTS Package Question: 2 Success Scenarios

Jan 25, 2006

Hi

I am writing a package that i want to have email me on two possible success scenarios.

essentially, this is the conditions:

IF @result = 0
BEGIN
EXEC master..xp_cmdshell @copyfile, NO_OUTPUT
PRINT 'Operation Successful'
END
ELSE
BEGIN
RAISERROR ('This operation failed. Error Code:01. The source and destination files are identical.', 0, 1)
END


If the first condition is met, I want to fire off an email stating success.
If the second condition is met (the RAISERROR) then i want to fire off a different email.

Now, the problem is, I am not sure how to flow it. Both conditions are successful, thus it always fires off the success email if i use an "On Success" flow.

How do i capture the RAISERROR before the email to tell it which email to send?

Does this make sense?

View 1 Replies View Related

CrossPosted: DTS Question, 2 Success Scenarios

Jan 25, 2006

Hi

I am writing a package that i want to have email me on two possible success scenarios.

essentially, this is the conditions:

IF @result = 0
BEGIN
EXEC master..xp_cmdshell @copyfile, NO_OUTPUT
PRINT 'Operation Successful'
END
ELSE
BEGIN
RAISERROR ('This operation failed. Error Code:01. The source and destination files are identical.', 0, 1)
END


If the first condition is met, I want to fire off an email stating success.
If the second condition is met (the RAISERROR) then i want to fire off a different email.

Now, the problem is, I am not sure how to flow it. Both conditions are successful, thus it always fires off the success email if i use an "On Success" flow.

How do i capture the RAISERROR before the email to tell it which email to send?

Does this make sense?

View 1 Replies View Related

Broken Or Hung SQL Server 7 Database Scenarios

Mar 4, 1999

I'm attempting to develop a course whose objective is to present the users with several scenarios of broken or hung databases caused by different things that they then have to fix.

Do you have any ideas or examples of how to break a database and the reasons behind it, also how to repair it afterwards !!

Richard

View 1 Replies View Related

Disaster Recovery Scenarios For Analysis Services

Jun 7, 2006

Hi

I am trying to find disaster recovery scenarios for Analysis Services which seems to be lacking. Is there anything documented.

Thanks

View 4 Replies View Related

Wich Is Faster? In Relation To These Two Business Object Scenarios

Jun 27, 2006

I kow for a solid comparison between using datareaders and datasets I will have to perform that myself.  But for now I will be utilizing datasets...
What I am doing is currently utilizing assemblies to create my datasets ahead of time.  I will eventually compile them as dlls.  I'm just utilizing assemblies during my building/testing fase.
My questions is:
Is it faster to completely build the datasets and all needed connections inside the assemblies/dlls and fill them?  Or to build the datasets and connections as a sub procedure that can be accessed and then fill them as each required set of data is needed?
I ask because I will be having many different data connections and so I'm not sure if it's faster to explicitly build/fill almost each and every one and have them compiled at runtime ready to be accessed, or to file them when called from a sub etc...?
As I take it, the server should track and monitor which are used the most, and cache them, so as to operate faster.  I wonder if it will still do this if the datasets aren't pre-filled?

View 2 Replies View Related

How To Make A SQL Run Longer?

Jun 27, 2007

Hell All,To reproduce one of our cusotmer's probem, I need to make the SQL torun for more than a minutes before it returns the result set. I do nothave large amount of data in the database to simulate the dealy.Is there a way in SQL to cause the delay while returning the resultsetThanks for the help.RegardsRaj

View 7 Replies View Related

Provider For OLE DB SQL No Longer Available

Mar 20, 2008

Hello, been having issue w/ symantec backup exec 12 for the past few months trying to backup the database files on a x64 windows 2003 sp2 server. After talking to about 6 techs from symantec, I finally come across this error and am told to contact microsoft.

I had created a .udl file to test the connection between the media server and the SQL server. It tested successfully from the media -> sql. Then I created a .udl on the SQL server to test it there, however when I tried to select the OLE DB provider for microsoft SQL server, I got the following error: "Microsoft Data Link Error: Provider is no longer available.Ensure that the provider is installed properly."

If anyone knows how to fix this issue easily that would be great. Thank you in advance.


-David

View 11 Replies View Related

ALLOW_DUP_ROW' Is No Longer Supported

Feb 15, 2007

Any body please give me the details about how to use 'ALLOW_DUP_ROW' in a CREATE CLUSTERED INDEX statement.

I tried executing the below statement but it throws an error "CREATE INDEX option 'ALLOW_DUP_ROW' is no longer supported."(both in SQL Server 2000 and SQL Server 2005)

CREATE CLUSTERED INDEX index121
ON raj(j)
WITH ALLOW_DUP_ROW

raj(j) contains two rows with same value

please hhelp me out

View 2 Replies View Related

How Do I Know What Queries Takes Longer?

Mar 14, 2008

Hi, Is there any way to audit or record in SQL Server 2000 what queries are the ones that consume more resources in the server so I can focus and improve them?

Thanks

View 1 Replies View Related

Tooltip Display Longer?

Mar 7, 2008

Is it possilbe to have the tooltip (mouse-over text) display longer? Seems like it currently displays for only 5 seconds.

View 3 Replies View Related

.rss Methods No Longer Supported

Feb 9, 2006

I am having a problem running a sql2k report service script on my new sql2005 server. It seems that the methods SessionHeader() and rs.render are no longer suport. can someone help me figure out what I need to do to continue automating my report running?

rss file contents: (the parts that should matter)

-----------------------------------------------------------------------------------------

Report Parameters
Dim branch as string = nothing

Dim skipreport as string = nothing
dim skip as integer = 0

dim allbranchreport as string = nothing
dim allbranch as integer = 0

dim report as CatalogItem
dim repname as string = nothing
dim specificreport as string = nothing
dim filepath as string = nothing
dim errorpath as string = nothing
dim basefilepath as string = nothing
dim baseerrorpath as string = nothing
dim errorlog as integer = 0
Dim parameters() As ParameterValue = nothing
Dim paramcount as integer = 0

' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = nothing
'Dim format As String = "PDF"
Dim format as string = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo as string = Nothing
Dim credentials As DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings As Warning() = Nothing
Dim reportHistoryParameters As ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim sh As New SessionHeader()
rs.SessionHeaderValue = sh
Dim omitdocmap as string = "True"
'**************************************

'**************************************
'Repset run
Dim repset as string = ""
for each repset in repsetlist
specificreports = specificreportsstart
if specificreports = 0 then
select case repset.tolower
case "all"
specificreports = 0
case "brkctr"
specificreports = 1
reportcount = reportset_brkctr.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_brkctr(reportloop)
next
case "cashmgmt"
specificreports = 1
reportcount = reportset_cashmgmt.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_cashmgmt(reportloop)
next
case "com"
specificreports = 1
reportcount = reportset_com.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_com(reportloop)
next
case "com_vw"
specificreports = 1
reportcount = reportset_com_vw.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_com_vw(reportloop)
next
repset = "com"
case "comcons"
specificreports = 1
reportcount = reportset_comcons.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_comcons(reportloop)
next
case "cons"
specificreports = 1
reportcount = reportset_cons.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_cons(reportloop)
next
case "cons_vw"
specificreports = 1
reportcount = reportset_cons_vw.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_cons_vw(reportloop)
next
repset = "cons"
case "dep"
specificreports = 1
reportcount = reportset_dep.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_dep(reportloop)
next
case "staff"
specificreports = 1
reportcount = reportset_staff.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_staff(reportloop)
next
omitdocmapbranch = "False"
case "staff2"
specificreports = 1
reportcount = reportset_staff2.getupperbound(0)
redim specificreportslist(reportcount)
for reportloop = 0 to reportcount
specificreportslist(reportloop) = reportset_staff2(reportloop)
next
omitdocmapbranch = "False"
case else
specificreports = 1
redim specificreportslist(0)
specificreportslist(0) = "Undefined"
end select

if repset.tolower = "staff2" then repset = "staff"
End if


'Base values
basefilepath = basepath & client & "" & repset & ""
baseerrorpath = basepath & client & "" & "error_" & repset & "_"


'Reports List
Dim reports() as CatalogItem
reports = rs.ListChildren(basereportpath, False)

'Execution
if datasourceok = 1 then
for each report in reports

skip = 0
allbranch = allbranchrun

for each skipreport in skipreports
if report.name.tolower = skipreport.tolower then skip = 1
next

if skip = 0 then
if specificreports = 1 then
skip = 1
for each specificreport in specificreportslist
if report.name.tolower = specificreport.tolower then skip = 0
next
end if
end if

if skip = 0 then
for each allbranchreport in allbranchreports
if report.name.tolower = allbranchreport.tolower then allbranch = 1
next

Redim parameters(1)
parameters(0) = New ParameterValue()
parameters(0).name = "branchall"
parameters(1) = New ParameterValue()
parameters(1).Name = "branch"

'5 parameters reports
repname = report.name
if (repname.substring(0,5).tolower = "loans" or repname.substring(0,4).tolower = "locs") then paramcount = 4
if (repname.length >= 13) then
if repname.substring(0,13).tolower = "loans_beacons" then paramcount = 1
end if

if paramcount = 4 then
paramcount = 0
redim preserve parameters(4)

parameters(2) = New ParameterValue()
parameters(2).name = "comconsall"
if repset.tolower = "cons" or repset.tolower = "com" then parameters(2).value = 0 else parameters(2).value = 1

parameters(3) = New ParameterValue()
parameters(3).Name = "comcons"
if repset.tolower = "com" then parameters(3).value = "commercial" else parameters(3).value = "consumer"

parameters(4) = New ParameterValue()
parameters(4).Name = "brokered"
parameters(4).value = 0
if repset.substring(0,3).tolower = "brk" then parameters(4).value = 1
end if

'All Branches Reports
if allbranch = 1 then

parameters(0).value = "1"
parameters(1).value = "admin"
if client = "CSCU" then parameters(1).value = "newwst"
if clienttype = "vw" then parameters(1).value = "1"

errorlog = 0
filepath = basefilepath & report.name & ".xls"
errorpath = baseerrorpath & report.name & ".txt"
reportpath = basereportpath & "/" & report.name
omitdocmap = omitdocmapall
devinfo = "<DeviceInfo><OmitDocumentMap>" & omitdocmap & "</OmitDocumentMap></DeviceInfo>"

Console.WriteLine (repset.toupper & " " & report.name & " All branches")

Try
result = rs.Render(reportPath, format, historyID, devInfo, parameters, _
credentials, showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
Catch e As SoapException
errorlog = 1
Console.WriteLine(e.Detail.OuterXml)
Catch f as Exception
errorlog = 1
Console.writeline(f.message)
End Try

' Create an error log
If errorlog <> 0 then
Try
Dim stream As FileStream = File.Create(errorpath, 1024)
Console.WriteLine("Errorlog created: " & errorpath)
stream.Close()
Catch g As Exception
Console.WriteLine(g.Message)
End Try
End if

' Write the contents of the report to a file.
If errorlog <> 1 then
Try
Dim stream As FileStream = File.Create(filepath, result.Length)
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to file: " & filepath)
stream.Close()


Catch e As Exception
Console.WriteLine(e.Message)
End Try
end if


'Other Reports
else
parameters(0).value = "0"

for each branch in branches
parameters(1).value = branch

errorlog = 0
if branch <> "h/o" then
filepath = basefilepath & branch & "" & report.name & ".xls"
else
filepath = basefilepath & "ho" & report.name & ".xls"
end if
if branch <> "h/o" then
errorpath = baseerrorpath & branch & "_" & report.name & ".txt"
else
errorpath = baseerrorpath & "ho_" & report.name & ".txt"
end if
reportpath = basereportpath & "/" & report.name
omitdocmap = omitdocmapbranch
devinfo = "<DeviceInfo><OmitDocumentMap>" & omitdocmap & "</OmitDocumentMap></DeviceInfo>"

Console.WriteLine (repset.toupper & " " & report.name & " " & "Branch: " & branch)

Try
result = rs.Render(reportPath, format, historyID, devInfo, parameters, _
credentials, showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
Catch e As SoapException
errorlog = 1
Console.WriteLine(e.Detail.OuterXml)
Catch f as Exception
errorlog = 1
Console.writeline(f.message)
End Try

' Create an error log
If errorlog <> 0 then
Try
Dim stream As FileStream = File.Create(errorpath, 1024)
Console.WriteLine("Errorlog created: " & errorpath)
stream.Close()
Catch g As Exception
Console.WriteLine(g.Message)
End Try
End if

' Write the contents of the report to a file.
If errorlog <> 1 then
Try
Dim stream As FileStream = File.Create(filepath, result.Length)
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to file: " & filepath)
stream.Close()

Catch e As Exception
Console.WriteLine(e.Message)
End Try
end if

next
end if

end if
next
end if
next

----------------------------------------------------------------------------------------------------

I get this error message from cmd when I try and run my batch:



----------------------------------------------------------------------------------------------------

J:PRA Publisher>rs -i pra_publisher.rss -s http://localhost/reportserver -l 0

The specified script failed to compile with the following errors:
J:PRA Publisher> "C:WINDOWSMicrosoft.NETFrameworkv2.0.50727vbc.exe" /t:exe
/main:MainModule /utf8output /R:"System.dll" /R:"System.Xml.dll" /R:"System.Web
.Services.dll" /R:"C:Program FilesMicrosoft SQL Server90Toolsinn
s.exe" /
out:"C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.exe" /debug-
"C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.0.vb" "C:Docu
ments and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb"


Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(253) : error
BC30002: Type 'SessionHeader' is not defined.

Dim sh As New SessionHeader()
~~~~~~~~~~~~~
C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(254) : error
BC30456: 'SessionHeaderValue' is not a member of 'Microsoft.SqlServer.Reporting
Services2005.ReportingService2005'.

rs.SessionHeaderValue = sh
~~~~~~~~~~~~~~~~~~~~~
C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(434) : error
BC30456: 'Render' is not a member of 'Microsoft.SqlServer.ReportingServices2005
.ReportingService2005'.

result = rs.Render(reportPath, format, historyID, de
vInfo, parameters, _
~~~~~~~~~

C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(436) : error
BC30456: 'SessionHeaderValue' is not a member of 'Microsoft.SqlServer.Reporting
Services2005.ReportingService2005'.

sh.SessionId = rs.SessionHeaderValue.SessionId
~~~~~~~~~~~~~~~~~~~~~
C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(496) : error
BC30456: 'Render' is not a member of 'Microsoft.SqlServer.ReportingServices2005
.ReportingService2005'.

result = rs.Render(reportPath, format, historyID
, devInfo, parameters, _
~~~~~~~~~

C:Documents and SettingsetopLocal SettingsTemp1fw7qn9k.1.vb(498) : error
BC30456: 'SessionHeaderValue' is not a member of 'Microsoft.SqlServer.Reporting
Services2005.ReportingService2005'.

sh.SessionId = rs.SessionHeaderValue.SessionId
~~~~~~~~~~~~~~~~~~~~~



--------------------------------------------------------------------------------------------------------------------

Any advice on how to fix this would be graetly appreciated. Thanks!

View 6 Replies View Related

SP Takes Much Longer In SQL2005

Mar 28, 2008



I could use a little help here. We have a stored procedure that runs on SQL2000 and for a large dataset only takes 1-2 minutes. On SQL2005 however, it takes around 25 minutes. Any advice or insight anyone could give would be great.


Here's the stored procedure:


CREATE PROCEDURE daa_upd_relationship_balance_hist
AS
begin tran
insert fldarts..daa_relationship_bal_hist
select <-- list snipped -->
from daa_relationship_bal drb, daa_user_review dur
where
drb.acct_no = dur.acct_no and
drb.control_2 = dur.control_2 and
drb.nb_gl_cost_ctr = dur.nb_gl_cost_ctr and
drb.nb_dda_sav_type = dur.nb_dda_sav_type and
drb.acct_no+drb.control_2+drb.nb_gl_cost_ctr+drb.nb_dda_sav_type+convert(char(10),dur.activity_date, 101)
not in
(select acct_no+control_2+nb_gl_cost_ctr+nb_dda_sav_type+convert(char(10), activity_date, 101)
from fldarts..daa_relationship_bal_hist)
if @@error = 0
commit tran
else
begin
rollback tran
print '!!!Error (daa_relationship_bal_hist) : Relationship Balance History not updated'
end
return
GO


So we have three tables. Here's a schema for each and the indexes on them. I've omitted columns from the tables that are not utilized in this query.


daa_relationship_bal:


CREATE TABLE [daa_relationship_bal] (
[control_2] [char] (3) NOT NULL ,
[nb_gl_cost_ctr] [char] (7) NOT NULL ,
[acct_no] [char] (14) NOT NULL ,
[nb_dda_sav_type] [char] (3) NOT NULL
)


index:


idx_upd_balance_hist nonclustered located on PRIMARY acct_no, control_2, nb_gl_cost_ctr, nb_dda_sav_type


daa_user_review:


CREATE TABLE [daa_user_review] (
[control_2] [char] (3) NOT NULL ,
[nb_gl_cost_ctr] [char] (7) NOT NULL ,
[acct_no] [char] (14) NOT NULL ,
[nb_dda_sav_type] [char] (1) NOT NULL ,
[activity_date] [datetime] NULL
)


index:


PK_daa_user_review_1__37 nonclustered, unique, primary key located on INDEXES control_2, nb_gl_cost_ctr, acct_no, nb_dda_sav_type


daa_relationship_bal_hist:


CREATE TABLE [daa_relationship_bal_hist] (
[control_2] [char] (3) NOT NULL ,
[nb_gl_cost_ctr] [char] (7) NOT NULL ,
[acct_no] [char] (14) NOT NULL ,
[nb_dda_sav_type] [char] (3) NOT NULL ,
[activity_date] [datetime] NOT NULL
)


index:


PK_daa_rel_bal_hist_1__37 nonclustered, unique, primary key located on PRIMARY control_2, nb_gl_cost_ctr, acct_no, nb_dda_sav_type, activity_date



Any help on this would be great. If more information is needed, please let me know.

View 5 Replies View Related

The Specified Network Name Is No Longer Available Problem

Dec 7, 2007

Hi,

we are running a Windows Application(.Net 2.0) against a MS SQL Server 2000 on WinXP. The application is able to succesefully connect to Database and execute "smaller stored procedure". The application also must execute a stored proc that returns 2M rows for export into a flat file.
When executing the stored proc from a remote box with 512M or less RAM(slow box), the application receives the error:


A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

If a box has 1G or RAM or more, application seems running fine.

Now, I have the application running on a slow box, watching memory usage, and it seems fine - the memory acquired by the application never exceded 39M of RAM, so I'm still not clear why connection is being closed.
Also, there seem to be no mesages from MS SQL server in Event Log.

The problem is that I have to make the app run on a "slow box".

Any ideas or comments are appreciated (somebody, please, help me ;-) )

View 1 Replies View Related

Does It Take Longer To Restore The First Time?

May 16, 2007

We moved a 2000 database to another platform by restoring the database. It took a lot longer than I expected. Would it take less time to restore it a second time to the same target database since the allocations are already there?



Thanks

View 1 Replies View Related

Can Columns Or Text Be Longer Than 255 Characters

Jan 26, 1999

Is there a way to have a memo field in a table that is larger than 255 characters? I like to have a memo field of of about 1000 characters of text.

Thanks,
Jim

View 1 Replies View Related

Can't Write Longer String In The Record

Jun 8, 2004

I have a field which was varchar before but I changed it to text.

But i can't write in it enough text as i wish. This field is important becouse it holds SQL senences which i parse latter in my application and than i execute it.



it says <Long Text> and i can't enter any more characters.

View 2 Replies View Related

SQL 2012 :: Getting (The Specified Network Name Is No Longer Available) During Backups

Jul 11, 2015

Getting "The specified network name is no longer available" during SQL Backups dumping to Network share.

- problem started occurring on July 3, 2015

- our Ola Hallengren backup solution deployed to over 150 SQL Servers.. was running fine for almost 2 years

- Occurring in multiple SQL Server environments: W/Server 2012 Ent, W/Server 2008 Ent, SQL 2012 Ent, SQL 2008 R2 Ent

- We're utilizing latest Ola Hallengren backup solution (Jan 2015 release)

- Dumping to network share (jobs running under SQL Agent account w/ local admin & sysadmin on server and full rights to Network Share

View 1 Replies View Related

No Longer Need Default Instance Of SQL Server

Jul 23, 2005

Currently I have a server that has two instances of SQL Server that areboth heavily used. We are moving the databases that are on the defaultinstance of this server to a new server. Since the old server willonly need one instance (the current named instance) of SQL Server isthere a good way to remove the default instance and make the namedinstance the default? If this change is possible will the name of thecurrent named instance need to be changed? Will all of the programscurrently accessing the named instance need to change their connectionstring?

View 2 Replies View Related

Subquery In DTS No Longer Works After Years

Oct 13, 2006

Hi folks,A DTS package we have run for years now no longer works. The specificpart that is not working is a subquery in the SOURCE object of atransformation. The source is based on a Microsoft Data Link to aSybase database (DSN changed a couple months ago but the connectionstring was updated successfully for the new 12.51 version of ASE) andthe destination is a link to a local SQL Server 2000 database.The transformation has always worked and when I remove the subqueryeverything works OK. The problem is that I need the subquery!Does anyone have a clue what is going on?Here is the full query.select TableKey = RVSN_TYPE_ID,TableCode = RVSN_TYPE,RevisionDate = RVSN_DATE,RevisionReasonCode = RSN_CODE,RevisionGroup = RVSN_GRP_ID,RevisedField = (select L.FieldIDfrom tempdb.guest.lkpRevisedField Lwhere L.TableID = R.RVSN_TYPEand L.FieldName = R.CHNG_FLD),RevisedValue = OLD_FLD_VAL,RevisionTimestamp = RVSN_TIMESTAMPfrom RVSN R,tempdb.guest.MaxTimeStamp TSwhere R.RVSN_TIMESTAMP TS.Rtimestampand R.RVSN_TIMESTAMP is NOT NULLJohn H.

View 1 Replies View Related

Why DELETE Takes Longer Than INSERT?

Jul 20, 2005

I'm running an ISP database in SQL 6.5 which has a table 'calls'. When thenew month starts I create a new table with the same fields and move the dataof previous month into that table and delete it from calls. So 'calls' holdsthe data of only the current month. for example at the start of november2003 I ran the queriesCreate Table Oct2003Calls {................................}/* Now insert data of october into new table */INSERT Oct2003CallsSELECT *FROM callsWHERE calldate < '11/1/03'/* Finaly delete october data from calls table */DELETE FROM callsWHERE calldate < '11/1/03'The problem is that while the insert query takes about 2 minutes to executethe delete queries takes over 10 minutes to affect the same no. of rows. Whyis that?This causes problems because user authentication stops when this query isrunning which means users cant connect to the internet.

View 4 Replies View Related

How To Ensure Data Is No Longer On Disk

Jul 20, 2005

I have a table with some sensitive customer data in it. I am nowkeeping all the data in another table, and encrypting it. I want toget rid of the original unencrypted data and be sure that it is nolonger anywhere on disk. Should I drop the table, or first delete therows and then do a dump tran? I'm not sure how to know if the data isactually physically deleted from disk, or if it's still there, butjust in blocks that get marked as available. Any guidance would begreatly appreciated.Thanks,Bruce

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved