Thursday, March 22, 2012
Error in Stored Procedure Debugger
SP debugger on my machine has suddenly stopped running
with the following message
Server: Msg 508, Level 16, State 1, Procedure sp_sdidebug,
Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to
connect to debugger on SWINDEV-SQL-01\DEV1 (Error =
0x800706ba). Ensure that client-side components, such as
SQLLE.DLL, are installed and registered on L000646.
Debugging disabled for connection 73.
I am running on SP3 and have also run exec
sp_sdidebug 'legacy_on' . It still gives this error.
Any more ideas any one ?
Have you checked out this link:
http://msdn.microsoft.com/library/de...tools_5cfm.asp
Cheers,
James Goodman
"Anoop Agarwal" <agarwala@.halcrow.com> wrote in message
news:f92301c43e55$7e541b40$a601280a@.phx.gbl...
> Hi,
> SP debugger on my machine has suddenly stopped running
> with the following message
> Server: Msg 508, Level 16, State 1, Procedure sp_sdidebug,
> Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]Unable to
> connect to debugger on SWINDEV-SQL-01\DEV1 (Error =
> 0x800706ba). Ensure that client-side components, such as
> SQLLE.DLL, are installed and registered on L000646.
> Debugging disabled for connection 73.
> I am running on SP3 and have also run exec
> sp_sdidebug 'legacy_on' . It still gives this error.
> Any more ideas any one ?
|||I have tried all the things listed in the Article and still get the same
error.
Anoop
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Wednesday, March 21, 2012
Error in stored procedure
When I'm trying to execute my stored procedure I'm getting the following code Line 35: Incorrect syntax near'@.SQL'.
Here is my procedure. Could someone tell me what mistake I'm doing.
Alterprocedure [dbo].[USP_SearchUsersCustomers_New]@.UserIDINT
,@.RepName VARCHAR(50)
,@.dlStatus VARCHAR(5)=''
as
Declare
@.Criteria VARCHAR(500)
,@.SQL VARCHAR(8000)
SELECT @.Criteria=''
SET NOCOUNTONif(@.dlStatus<>'ALL'AND(LEN(@.dlStatus)>1))
BEGIN
if(@.dlStatus='ALA')
SET @.Criteria='AND dbo.tbl_Security_Users.IsActive=1'
else
SET @.Criteria='AND dbo.tbl_Security_Users.IsActive=0'
END
--If the user is an Admin, select from all users.
if(dbo.UDF_GetUsersRole(@.UserID)= 1)
BEGIN
@.SQL='SELECT U.UserID--,U.RoleID
,ISNULL((Select TOP 1 R.RoleName From dbo.tbl_Security_UserRoles UR
INNER JOIN dbo.tbl_Security_Roles R ON R.RoleID = UR.RoleID
Where UR.UserID = U.UserID), 'Unassigned') as 'RoleName',U.UserName
,U.Name
,U.Email
,U.IsActive
,U.Phone
FROM dbo.tbl_Security_Users U
--INNER JOIN dbo.tbl_Security_Roles R ON U.RoleID = R.RoleID
WHERE U.NAME LIKE @.RepName
AND U.UserTypeID < 3'+ @.Criteria
END
In your dynamic sql string, you need to escape the single quote by using it twice, i.e.: 'RoleName' should be ''RoleName''.
Also, before you build this string. make sure you test out the actual query first.
|||I tried it still I get the same error "Incorrect Syntax near @.SQL". The query works fine when I execute it alone.
Here is the code again.
if(dbo.UDF_GetUsersRole(@.UserID)= 1)
BEGIN
@.SQL='SELECT U.UserID--,U.RoleID
,ISNULL((Select TOP 1 R.RoleName From dbo.tbl_Security_UserRoles UR
INNER JOIN dbo.tbl_Security_Roles R ON R.RoleID = UR.RoleID
Where UR.UserID = U.UserID), ''Unassigned'') as ''RoleName''
,U.UserName
,U.Name
,U.Email
,U.IsActive
,U.Phone
FROM dbo.tbl_Security_Users U
--INNER JOIN dbo.tbl_Security_Roles R ON U.RoleID = R.RoleID
WHERE U.NAME LIKE @.RepName
AND U.UserTypeID < 3'+ @.Criteria
END
|||
SET @.SQL = '-- code here'
|||I did that. Now when I click compile and execute it doesn't show any error. But when I execute the stored procedure it shows an error "Must declare @.UserID". But it's already declared.
|||You dont need to use dynamic SQL in your scenario. Try something like this with your regular SELECT statement:
ANDdbo.tbl_Security_Users.IsActive= (CASEWHEN@.dlStatus='ALL'THENdbo.tbl_Security_Users.IsActiveWHEN@.dlStatus='ALA'Then1ELSE0END )
|||Thanks! It worked and I liked the simplicity of the code while achieving the desired task.
Error in sql 2000: Incorrect syntax near ')'.
I get this error:
Server: Msg 102, Level 15, State 1, Line 62
Incorrect syntax near ')'.
Here is the request that I put inside my cursor:
exec ('sp_grantdbaccess @.loginame=' + @.newLoginParam )
set @.sqlGrant='grant update on mosaikdb741.dbo.loginlistInput to ' + @.newLoginParam
EXEC (@.sqlGrant)
Is there any thing wrong?
thank you
Would you be able to provide the value of @.newLoginParam that is causing the problem?
Chris
|||As I indicated earlier, if you were to PRINT and examine the value of @.sqlGrant, you would readily see that there 'may' be a problem with quotes.|||exec ('sp_grantdbaccess @.loginame= ''' + @.newLoginParam + '''')
...but work only if you dont have ' into @.newLoginParam
My suggestion is to use sp_executesql with separate parameters settings.
Mauro
Error in sql 2000: Incorrect syntax near ')'.
I get this error:
Server: Msg 102, Level 15, State 1, Line 62
Incorrect syntax near ')'.
Here is the request that I put inside my cursor:
exec ('sp_grantdbaccess @.loginame=' + @.newLoginParam )
set @.sqlGrant='grant update on mosaikdb741.dbo.loginlistInput to ' + @.newLoginParam
EXEC (@.sqlGrant)
Is there any thing wrong?
thank you
Would you be able to provide the value of @.newLoginParam that is causing the problem?
Chris
|||As I indicated earlier, if you were to PRINT and examine the value of @.sqlGrant, you would readily see that there 'may' be a problem with quotes.|||exec ('sp_grantdbaccess @.loginame= ''' + @.newLoginParam + '''')
...but work only if you dont have ' into @.newLoginParam
My suggestion is to use sp_executesql with separate parameters settings.
Mauro
Sunday, March 11, 2012
error in Pivot
Hi,
I've been trying to get the pivot command to work just so. I've almost got it the way I need it but I'm getting Msg 102, Level 15, State 1, Line 14 Incorrect syntax near ')'.
This is my code:
INSERT INTO dbo.tmpProjExpendFY
SELECT ProjNo, TaskCode, [1] AS P1, [2] AS P2, [3] AS P3, [4] AS P4, [5] AS P5, AS P6,
[7] AS P7, AS P8, [9] AS P9, [10] AS P10, [11] AS P11, [12] AS P12
FROM (SELECT s.ProjNo, tblkpTask.TaskCode
FROM tblProjSched AS s CROSS JOIN
tblkpTask
WHERE (s.DeptCode = 'SWM')) AS dm LEFT OUTER JOIN
(SELECT SUM(e.ActualAmt) AS PYears, e.ProjNo, e.TaskCode
FROM tblActualExpend AS e INNER JOIN
tblBudgetConfig ON e.FiscalYear < tblBudgetConfig.CurrentBudgetYear
GROUP BY e.ProjNo, e.TaskCode) AS dp ON dm.ProjNo = dp.ProjNo AND dm.TaskCode = dp.TaskCode
ORDER BY dm.ProjNo, dm.TaskCode
)p
PIVOT
(
SUM(ActualAmt)
FOR FiscalPeriod IN
( [1], [2], [3], [4], [5], , [7],
, [9], [10], [11], [12])
)AS pvt
ORDER BY pvt.ProjNo, pvt.TaskCode;
My end result needs to include all taskcodes for each project regardless of weither it has an expense:
ProjNo TaskCode P1 P2 P3 P4 ect
64BRD PLN 10 23 null 5 ect
there should be 9 total taskcodes per project.
Thansk in advanced for any help.
use the following query..
SELECT
ProjNo
,TaskCode
,[1] AS P1
,[2] AS P2
,[3] AS P3
,[4] AS P4
,[5] AS P5
, AS P6
,[7] AS P7
, AS P8
,[9] AS P9
,[10] AS P10
,[11] AS P11
,[12] AS P12
From
(
Select
dm.ProjNo
,dm.TaskCode
,dp.FiscalPeriod
,dp.ActualAmt ActualAmt
FROM (
SELECT
s.ProjNo
,tblkpTask.TaskCode
FROM tblProjSched AS s
CROSS JOIN tblkpTask tblkpTask
) AS dm
LEFT OUTER JOIN
(
SELECT
e.ActualAmt
,e.ProjNo
,e.TaskCode
,e.FiscalPeriod
FROM
tblActualExpend AS e
) AS dp
ON dm.ProjNo = dp.ProjNo
AND dm.TaskCode = dp.TaskCode
) as Data
PIVOT (SUM(ActualAmt) FOR FiscalPeriod IN ([1], [2], [3], [4], [5], , [7],
, [9], [10], [11], [12]))AS pvt
ORDER BY
pvt.ProjNo
,pvt.TaskCode
Wednesday, March 7, 2012
Error in formula
I get the "A String is required here" error with my formula and it higlights the line in bold.
If {@.ScheduledTasks} = 0 then
"N/S"
Else If {@.TotalTasks} = 0 then
"N/D"
Else
(sum({@.TimelyCOmplete},{@.Group_CrewUnit})/(sum({@.TimelyCOmplete},{@.Group_CrewUnit}) + sum({@.MissedTasks},{@.Group_CrewUnit}) + sum({@.LateComplete},{@.Group_CrewUnit}))) * 100
Thanks in advanceYour third line will return an integer - all statements must return the same type. Wrap the third line in ToText().
Error in first run of the snapshot agent (Error: 170)
I am getting the following error from the snapshot agent, while first
setting up transactional queued replication.
"Line 1: Incorrect syntax near '000'.
(Source: distribution (Data source); Error number: 170)
"
I have read the KB articles saying I should install SP3 and the problem will
go away. I have installed SP3 on both publisher/distributor & single test
subscriber, on specially prepared clean installations of SQL2000.
Here is the end of the detailed logfile produced by the repl agent:
"Inserted constraint creation command for article 'EventBookingstatus' into
the distribution database.
*** [Publication:'I-junction_Support-Central_Live'] Total snapshot
generation time excluding publication setup: 439271 (ms) ***
SourceTypeId = 5
SourceName = distribution
ErrorCode = 170
ErrorText = Line 1: Incorrect syntax near '000'.
Line 1: Incorrect syntax near '000'.
Disconnecting from Publisher 'IJUNC-LUDD'
"
What should I try next?
I am happy to provide the sql to create the db & the replication if it helps.
Many thanks
Vaughn
Hi Vaughn,
I have the vague suspicion that you are hitting the issue described in
KB834453 (just search on microsoft.com) which is fixed as a QFE after sp3.
If you can include more of the output from the snapshot agent or a trace of
the failing command then I can tell with greater certainty. In any case, I
think it is worthwhile for you to contact Microsoft support to try out the
fix.
-Raymond
This posting is provided "as is" with no warranties and confers no rights.
"Vaughn Cleminson" <Vaughn Cleminson@.discussions.microsoft.com> wrote in
message news:EC3169EF-6EC5-4BF1-B43C-C51403DAA06C@.microsoft.com...
> Hi All
> I am getting the following error from the snapshot agent, while first
> setting up transactional queued replication.
> "Line 1: Incorrect syntax near '000'.
> (Source: distribution (Data source); Error number: 170)
> "
> I have read the KB articles saying I should install SP3 and the problem
will
> go away. I have installed SP3 on both publisher/distributor & single test
> subscriber, on specially prepared clean installations of SQL2000.
> Here is the end of the detailed logfile produced by the repl agent:
> "Inserted constraint creation command for article 'EventBookingstatus'
into
> the distribution database.
> *** [Publication:'I-junction_Support-Central_Live'] Total snapshot
> generation time excluding publication setup: 439271 (ms) ***
> SourceTypeId = 5
> SourceName = distribution
> ErrorCode = 170
> ErrorText = Line 1: Incorrect syntax near '000'.
> Line 1: Incorrect syntax near '000'.
> Disconnecting from Publisher 'IJUNC-LUDD'
> "
> What should I try next?
> I am happy to provide the sql to create the db & the replication if it
helps.
> Many thanks
> Vaughn
|||Hi
Thanks for the reply.
I'll check the db for reserved words and silly characters.
How to I trace the failing command, please?
The full snapshot logfile is too long to post.
Is there a specific bit that will help?
Vaughn
|||Hi Riaymond.
The KB you suggest says:
SYMPTOMS
When the Snapshot Agent runs after you make schema changes to the underlying
tables of a publication, the Snapshot Agent may fail.
This is the first time I am running the agent, after creating the
publication. I haven't changed the tables since making the publication and
setting up the areticles.
Does the KB still apply?
Vaughn
|||Hi Vaughn,
You can definitely see the error even if this is the first time you run the
snapshot agent. Making schema\publication changes simply gives the random
flavors described in the KB. To tack down the problematic command, you
should start a SQL Profiler trace with the statement starting\batch
startng\RPC starting events enabled before running the snapshot agent. The
problematic command should starts with sp_MSadd_repl_error if my guess is
correct but you may need to back track a few entries in the profiler trace
before you can find it.
-Raymond
This posting is provided "as is" with no warranties and confers no rights.
"Vaughn Cleminson" <VaughnCleminson@.discussions.microsoft.com> wrote in
message news:D8229CB1-A616-4ABB-BF09-787A280C413C@.microsoft.com...
> Hi Riaymond.
> The KB you suggest says:
> SYMPTOMS
> When the Snapshot Agent runs after you make schema changes to the
underlying
> tables of a publication, the Snapshot Agent may fail.
> This is the first time I am running the agent, after creating the
> publication. I haven't changed the tables since making the publication and
> setting up the areticles.
> Does the KB still apply?
> Vaughn
|||Hi Raymond.
Man, you clearly know your stuff.
Here is the error line from profiler, and the error reported:
What do you suggest I try next?
line:
exec sp_MSadd_repl_command @.publisher_id = 0, @.publisher_db =
N'I-junction_Support-Central_Live', @.type = -2147483639, @.article_id = 63,
@.xact_id = 0x000000000000, @.xact_seqno = 0x00001c490000012802b900000001,
@.command_id = 1111, @.partial_command = 0, @.command =
0x6900660020002800400040006d006900630072006f007300 6f0066007400760065007200730069006f006e0020003e003d 00200030007800300038003000300030003200430030002900 200062006500670069006e0020006500780065006300200073 0070005f00610064006400730079006e006300740072006900 67006
70065007200730020004e00270045006d00610069006c00520 075006c006500450078006500630075007400610062006c006 50027002c0020004e0027006e0075006c006c0027002c00200 04e00270049004a0055004e0043002d004c005500440044002 7002c0020004e00270049002d006a0075006e0063007400690 06f00
6e005f0053007500700070006f00720074002d00430065006e 007400720061006c005f004c0069007600650027002c002000 4e00270049002d006a0075006e006300740069006f006e005f 0053007500700070006f00720074002d00430065006e007400 720061006c005f004c0069007600650027002c0020004e0027 00730
070005f004d005300730079006e0063005f0069006e0073005 f0045006d00610069006c00520075006c00650045007800650 0630075007400610062006c0065005f00310027002c0020004 e002700730070005f004d005300730079006e0063005f00750 0700064005f0045006d00610069006c00520075006c0065004 50078
006500630075007400610062006c0065005f00310027002c00 20004e002700730070005f004d005300730079006e0063005f 00640065006c005f0045006d00610069006c00520075006c00 6500450078006500630075007400610062006c0065005f0031 0027002c0020004e002700730070005f004d00530063006600 74005
f0049002d006a0075006e006300740069006f006e005f00530 07500700070006f00720074002d00430065006e00740072006 1006c005f004c006900760065005f0045006d00610069006c0 0520075006c006500450078006500630075007400610062006 c00650027002c0020004e002700640062006f0027002c00200 04e00
27005000720069006d006100720079004b006500790027002c 0020004e0027006e0075006c006c0027002c0020004e002700 6e0075006c006c0027002c00200030007800300031002c0020 0031002c0031002c004e00270049004a0055004e0043002d00 4c0055004400440027002c0020003200200065006e00640020 00
e006?????6?6
error:
exec sp_MSadd_snapshot_history @.agent_id = 5, @.runstatus = 6, @.comments =
N'Line 1: Incorrect syntax near ''e006''.', @.delivered_transactions = 1,
@.delivered_commands = 0, @.log_error = 1,
|||Hi Vaughn,
The only thing to do now is to contact Microsoft Product\Customer Support
with the information below and ask for the QFE fix described in KB834453;
there should be no charge for this. Or, you can try to work around the
problem by using either a longer (or shorter) article name for article id#63
(just drop and recreate the article).
-Raymond
This posting is provided "as is" with no warranties and confers no rights.
"Vaughn Cleminson" <VaughnCleminson@.discussions.microsoft.com> wrote in
message news:549EC277-0623-4DC5-992F-8780FA613ADF@.microsoft.com...
> Hi Raymond.
> Man, you clearly know your stuff.
> Here is the error line from profiler, and the error reported:
> What do you suggest I try next?
> line:
> exec sp_MSadd_repl_command @.publisher_id = 0, @.publisher_db =
> N'I-junction_Support-Central_Live', @.type = -2147483639, @.article_id = 63,
> @.xact_id = 0x000000000000, @.xact_seqno = 0x00001c490000012802b900000001,
> @.command_id = 1111, @.partial_command = 0, @.command =
>
0x6900660020002800400040006d006900630072006f007300 6f006600740076006500720073
0069006f006e0020003e003d00200030007800300038003000 30003000320043003000290020
0062006500670069006e002000650078006500630020007300 70005f00610064006400730079
006e0063007400720069006700670065007200730020004e00 270045006d00610069006c0052
0075006c006500450078006500630075007400610062006c00 650027002c0020004e0027006e
0075006c006c0027002c0020004e00270049004a0055004e00 43002d004c0055004400440027
002c0020004e00270049002d006a0075006e00630074006900 6f006e005f0053007500700070
006f00720074002d00430065006e007400720061006c005f00 4c0069007600650027002c0020
004e00270049002d006a0075006e006300740069006f006e00 5f0053007500700070006f0072
0074002d00430065006e007400720061006c005f004c006900 7600650027002c0020004e0027
00730070005f004d005300730079006e0063005f0069006e00 73005f0045006d00610069006c
00520075006c00650045007800650063007500740061006200 6c0065005f00310027002c0020
004e002700730070005f004d005300730079006e0063005f00 7500700064005f0045006d0061
0069006c00520075006c006500450078006500630075007400 610062006c0065005f00310027
002c0020004e002700730070005f004d005300730079006e00 63005f00640065006c005f0045
006d00610069006c00520075006c0065004500780065006300 75007400610062006c0065005f
00310027002c0020004e002700730070005f004d0053006300 660074005f0049002d006a0075
006e006300740069006f006e005f0053007500700070006f00 720074002d00430065006e0074
00720061006c005f004c006900760065005f0045006d006100 69006c00520075006c00650045
0078006500630075007400610062006c00650027002c002000 4e002700640062006f0027002c
0020004e0027005000720069006d006100720079004b006500 790027002c0020004e0027006e
0075006c006c0027002c0020004e0027006e0075006c006c00 27002c00200030007800300031
002c00200031002c0031002c004e00270049004a0055004e00 43002d004c0055004400440027
002c0020003200200065006e0064002000
> e006?Y6Y6
> error:
> exec sp_MSadd_snapshot_history @.agent_id = 5, @.runstatus = 6, @.comments =
> N'Line 1: Incorrect syntax near ''e006''.', @.delivered_transactions = 1,
> @.delivered_commands = 0, @.log_error = 1,
error in executing exec xp_cmdshell
I am getting this error
Msg 50001, Level 1, State 50001
xpsql.cpp: Error 1314 from CreateProcessAsUser on line 636
when I try to execute this statement using sql user login
who is not having sysamin rights.
exec xp_cmdshell "copy D:\File1.txt E:\File1.txt"
I have configured the Proxy account for SQL Agent, but
still getting this error.
Can any help me ?
Regds,
ManojDoes the ID have rights to Execute xp_cmdshell? Did you check the NT id for
Proxy and make sure it has adequate rights for your copy? Read from the
root of D and write to the root of E. To check for sure make the Id a
temporary local admin for the windows box and rerun your query. Double
check by creating 2 folders and giving the ID full control of both folders
and change your query to copy to and from the folders instead.
Jeff Duncan
MCDBA, MCSE+I
"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
news:889301c43299$96196bd0$a601280a@.phx.gbl...
> Hello,
> I am getting this error
> Msg 50001, Level 1, State 50001
> xpsql.cpp: Error 1314 from CreateProcessAsUser on line 636
> when I try to execute this statement using sql user login
> who is not having sysamin rights.
> exec xp_cmdshell "copy D:\File1.txt E:\File1.txt"
> I have configured the Proxy account for SQL Agent, but
> still getting this error.
> Can any help me ?
> Regds,
> Manoj|||Make sure the SQL Server startup account has the necessary rights:
- Act as part of the operating system.
- Increase quotas.
- replace process level token.
- Log on as a batch job.
Having increase quotas missing has been a cause of this problem.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||The loging wich I am using is a member of Local and Domain
admin group.
>--Original Message--
>Does the ID have rights to Execute xp_cmdshell? Did you
check the NT id for
>Proxy and make sure it has adequate rights for your
copy? Read from the
>root of D and write to the root of E. To check for sure
make the Id a
>temporary local admin for the windows box and rerun your
query. Double
>check by creating 2 folders and giving the ID full
control of both folders
>and change your query to copy to and from the folders
instead.
>--
>Jeff Duncan
>MCDBA, MCSE+I
>"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
>news:889301c43299$96196bd0$a601280a@.phx.gbl...
636[vbcol=seagreen]
login[vbcol=seagreen]
>
>.
>|||> The loging wich I am using is a member of Local and Domain
> admin group.
Did you assign the SQL Server service account the advanced user rights
detailed in this thread by Rand? The rights are needed so that SQL Server
can change security context to the proxy account. The permissions are set
automatically when you specify the SQL Server service account during
installation or change it from Enterprise manager. However, these are not
set when you change the account directly.
Output from command Windows command NET HELPMSG 1314:
A required privilege is not held by the client.
Hope this helps.
Dan Guzman
SQL Server MVP
"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
news:9a2301c433ea$81364d80$a001280a@.phx.gbl...[vbcol=seagreen]
> The loging wich I am using is a member of Local and Domain
> admin group.
>
> check the NT id for
> copy? Read from the
> make the Id a
> query. Double
> control of both folders
> instead.
> 636
> login|||The problem got solved, The login user was not having the
Increase quotas on the server, which after setting worked
out
Thanks,
Manoj
>--Original Message--
Domain[vbcol=seagreen]
>Did you assign the SQL Server service account the
advanced user rights
>detailed in this thread by Rand? The rights are needed
so that SQL Server
>can change security context to the proxy account. The
permissions are set
>automatically when you specify the SQL Server service
account during
>installation or change it from Enterprise manager.
However, these are not
>set when you change the account directly.
>Output from command Windows command NET HELPMSG 1314:
> A required privilege is not held by the client.
>--
>Hope this helps.
>Dan Guzman
>SQL Server MVP
>"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
>news:9a2301c433ea$81364d80$a001280a@.phx.gbl...
Domain[vbcol=seagreen]
you[vbcol=seagreen]
sure[vbcol=seagreen]
your[vbcol=seagreen]
message[vbcol=seagreen]
line[vbcol=seagreen]
but[vbcol=seagreen]
>
>.
>|||Hi,
One quick question - If I want to have my SQL service startup using a system
account, can I still set it to have "Increase Quotas on the server"? If so,
could you let me know where I can set that?
Thanks!
/ec
"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
news:ac9201c4368c$aa05ba80$a001280a@.phx.gbl...[vbcol=seagreen]
> The problem got solved, The login user was not having the
> Increase quotas on the server, which after setting worked
> out
> Thanks,
> Manoj
> Domain
> advanced user rights
> so that SQL Server
> permissions are set
> account during
> However, these are not
> Domain
> you
> sure
> your
> message
> line
> but
Sunday, February 26, 2012
Error in Deploying an Analysis Services Project
Hi,
I am trying to deploy an Analysis Project and I get the error:
Error 1 The Description element at line 292, column 29 (namespace http://schemas.microsoft.com/analysisservices/2003/engine) cannot appear under Envelope/Body/Execute/Command/Batch/Alter/ObjectDefinition/Database/Cubes/Cube/Dimensions/Dimension. 0 0
Any idea?
Thanks in advance,
--Dimitris Doukas
Hi,
This is a defect that will be addressed in the service pack(s); meanwhile, to work around it, please do the followings:
- open each cube editor and, in the first tab (Cube Structure), check each cube dimension if it has a Description set
- remove all those Descriptions (by just specifying an empty string there) and then re-deploy
Adrian.
|||Hi Adrian,
Thanks for the hint. Actually I had to edit the XML file to erase the description clause. If you just empty the string from the BI Studio if doesn't work.
Regards,
--DImitris Doukas
Error in DELETE trigger
I get an error when I try to delete multiple rows from a table.
Server: Msg 512, Level 16, State 1, Procedure tr_Documents_Delete, Line 16
Subquery returned more than 1 value. This is not permitted when the subquery
follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
I guess it is because of my trigger. The trigger looks like this:
ALTER TRIGGER tr_Documents_Delete
ON DocumentTrans
AFTER DELETE
AS
if @.@.rowcount = 0
return
DECLARE @.count INT
SET @.count = (SELECT COUNT(*) FROM DocumentTrans INNER JOIN Deleted
ON DocumentTrans.TableReference = Deleted.TableReference
AND DocumentTrans.RowNumberReference = Deleted.RowNumberReference)
IF @.count > 0
return
DECLARE @.TableName VARCHAR(100)
SET @.TableName = (SELECT TableReference FROM Deleted)
DECLARE @.SQLString VARCHAR(1000)
SET @.SQLString = 'UPDATE ' + @.TableName +
' SET DocumentsExists = NULL WHERE ' +
@.TableName + '.RowNumber = ' + CAST((SELECT RowNumberReference FROM
Deleted) AS VARCHAR(100))
EXEC(@.SQLString)
I have tried with a loop. But it also gives me an error
WHILE (SELECT TableReference FROM Deleted) IS NOT NULL
BEGIN
DECLARE @.TableName VARCHAR(100)
SET @.TableName = (Select TableReference FROM Deleted)
DECLARE @.SQLString VARCHAR(1000)
SET @.SQLString = 'UPDATE ' + @.TableName +
' SET DocumentsExists = NULL WHERE ' +
@.TableName + '.RowNumber = ' + CAST((SELECT RowNumberReference FROM
Deleted) AS VARCHAR(100))
EXEC(@.SQLString)
END
Any ideas?
Best regards
HenrikHi
The offending line could be:
SET @.TableName = (SELECT TableReference FROM Deleted)
A trigger fires once per batch, and not once per row deleted. The assumption
that only 1 row is being deleted fails on that line. The select is returning
more than one row, but the variable can not hold more than one row's value.
Either look at the way you process the row, or disallow more than one row to
be deleted at the same time with another check earlier on the in trigger.
Regards
Mike
"Henrik Skak Pedersen" wrote:
> Hi,
> I get an error when I try to delete multiple rows from a table.
> Server: Msg 512, Level 16, State 1, Procedure tr_Documents_Delete, Line 16
> Subquery returned more than 1 value. This is not permitted when the subque
ry
> follows =, !=, <, <= , >, >= or when the subquery is used as an expression
.
> The statement has been terminated.
> I guess it is because of my trigger. The trigger looks like this:
> ALTER TRIGGER tr_Documents_Delete
> ON DocumentTrans
> AFTER DELETE
> AS
> if @.@.rowcount = 0
> return
> DECLARE @.count INT
> SET @.count = (SELECT COUNT(*) FROM DocumentTrans INNER JOIN Deleted
> ON DocumentTrans.TableReference = Deleted.TableReference
> AND DocumentTrans.RowNumberReference = Deleted.RowNumberReference)
> IF @.count > 0
> return
> DECLARE @.TableName VARCHAR(100)
> SET @.TableName = (SELECT TableReference FROM Deleted)
> DECLARE @.SQLString VARCHAR(1000)
> SET @.SQLString = 'UPDATE ' + @.TableName +
> ' SET DocumentsExists = NULL WHERE ' +
> @.TableName + '.RowNumber = ' + CAST((SELECT RowNumberReference FROM
> Deleted) AS VARCHAR(100))
> EXEC(@.SQLString)
> I have tried with a loop. But it also gives me an error
> WHILE (SELECT TableReference FROM Deleted) IS NOT NULL
> BEGIN
> DECLARE @.TableName VARCHAR(100)
> SET @.TableName = (Select TableReference FROM Deleted)
> DECLARE @.SQLString VARCHAR(1000)
> SET @.SQLString = 'UPDATE ' + @.TableName +
> ' SET DocumentsExists = NULL WHERE ' +
> @.TableName + '.RowNumber = ' + CAST((SELECT RowNumberReference FROM
> Deleted) AS VARCHAR(100))
> EXEC(@.SQLString)
> END
> Any ideas?
> Best regards
> Henrik
>
>
Error in dbcc From Osql
i get this error when i run Dbcc on one of my production server database
From Osql Utility.
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
But when i run Dbcc from QA Utility i dont get any error and the Dbbc Gives
me CHECKDB found 0 allocation errors and 0 consistency errors in database I
tried to set
SET ARITHABORT Off
SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
ThanksHi,
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
TRY
SET ARITHABORT ON
SET QUOTED_IDENTIFIER ON
--
SHINICHI YONEDA MXL04371@.nifty.ne.jp
Microsoft Most Valuable Professional
MVP for SQL Server 2002-2005
"dines" <dines@.discussions.microsoft.com> wrote in message
news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Hi,
> i get this error when i run Dbcc on one of my production server database
> From Osql Utility.
> Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
> DBCC failed because the following SET options have incorrect settings:
> 'QUOTED_IDENTIFIER, ARITHABORT'.NULL
> But when i run Dbcc from QA Utility i dont get any error and the Dbbc
Gives
> me CHECKDB found 0 allocation errors and 0 consistency errors in database
I
> tried to set
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
> Thanks
>|||Hi,
I tried that too but still i get the same error
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
thanks
"Shinichi Yoneda" wrote:
> Hi,
> > SET ARITHABORT Off
> > SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
> TRY
> SET ARITHABORT ON
> SET QUOTED_IDENTIFIER ON
> --
> SHINICHI YONEDA MXL04371@.nifty.ne.jp
> Microsoft Most Valuable Professional
> MVP for SQL Server 2002-2005
> "dines" <dines@.discussions.microsoft.com> wrote in message
> news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> > Hi,
> >
> > i get this error when i run Dbcc on one of my production server database
> > From Osql Utility.
> >
> > Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
> > DBCC failed because the following SET options have incorrect settings:
> > 'QUOTED_IDENTIFIER, ARITHABORT'.NULL
> >
> > But when i run Dbcc from QA Utility i dont get any error and the Dbbc
> Gives
> > me CHECKDB found 0 allocation errors and 0 consistency errors in database
> I
> > tried to set
> > SET ARITHABORT Off
> > SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
> >
> > Thanks
> >
>
Error in dbcc From Osql
i get this error when i run Dbcc on one of my production server database
From Osql Utility.
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
But when i run Dbcc from QA Utility i dont get any error and the Dbbc Gives
me CHECKDB found 0 allocation errors and 0 consistency errors in database I
tried to set
SET ARITHABORT Off
SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
Thanks
Hi,
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
TRY
SET ARITHABORT ON
SET QUOTED_IDENTIFIER ON
SHINICHI YONEDA MXL04371@.nifty.ne.jp
Microsoft Most Valuable Professional
MVP for SQL Server 2002-2005
"dines" <dines@.discussions.microsoft.com> wrote in message
news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Hi,
> i get this error when i run Dbcc on one of my production server database
> From Osql Utility.
> Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
> DBCC failed because the following SET options have incorrect settings:
> 'QUOTED_IDENTIFIER, ARITHABORT'.NULL
> But when i run Dbcc from QA Utility i dont get any error and the Dbbc
Gives
> me CHECKDB found 0 allocation errors and 0 consistency errors in database
I
> tried to set
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
> Thanks
>
|||Hi,
I tried that too but still i get the same error
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
thanks
"Shinichi Yoneda" wrote:
> Hi,
> TRY
> SET ARITHABORT ON
> SET QUOTED_IDENTIFIER ON
> --
> SHINICHI YONEDA MXL04371@.nifty.ne.jp
> Microsoft Most Valuable Professional
> MVP for SQL Server 2002-2005
> "dines" <dines@.discussions.microsoft.com> wrote in message
> news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Gives
> I
>
|||Try to execute the following statement in both QA and with OSQL:
DBCC USEROPTIONS
Then compare the two. This command will tell you the current settings under each API. QA sets many environment values quite differently than other APIs.
Sincerely,
Anthony Thomas
"dines" <dines@.discussions.microsoft.com> wrote in message news:5A9AE886-FA9B-440E-8A38-CCF3AF110083@.microsoft.com...
Hi,
I tried that too but still i get the same error
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
thanks
"Shinichi Yoneda" wrote:
> Hi,
>
> TRY
> SET ARITHABORT ON
> SET QUOTED_IDENTIFIER ON
>
> --
> SHINICHI YONEDA MXL04371@.nifty.ne.jp
> Microsoft Most Valuable Professional
> MVP for SQL Server 2002-2005
>
> "dines" <dines@.discussions.microsoft.com> wrote in message
> news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Gives
> I
>
>
Error in dbcc From Osql
i get this error when i run Dbcc on one of my production server database
From Osql Utility.
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
But when i run Dbcc from QA Utility i dont get any error and the Dbbc Gives
me CHECKDB found 0 allocation errors and 0 consistency errors in database I
tried to set
SET ARITHABORT Off
SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
ThanksHi,
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
TRY
SET ARITHABORT ON
SET QUOTED_IDENTIFIER ON
SHINICHI YONEDA MXL04371@.nifty.ne.jp
Microsoft Most Valuable Professional
MVP for SQL Server 2002-2005
"dines" <dines@.discussions.microsoft.com> wrote in message
news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Hi,
> i get this error when i run Dbcc on one of my production server database
> From Osql Utility.
> Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
> DBCC failed because the following SET options have incorrect settings:
> 'QUOTED_IDENTIFIER, ARITHABORT'.NULL
> But when i run Dbcc from QA Utility i dont get any error and the Dbbc
Gives
> me CHECKDB found 0 allocation errors and 0 consistency errors in database
I
> tried to set
> SET ARITHABORT Off
> SET QUOTED_IDENTIFIER Off in my osql comand but still i get the same error
> Thanks
>|||Hi,
I tried that too but still i get the same error
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
thanks
"Shinichi Yoneda" wrote:
> Hi,
>
> TRY
> SET ARITHABORT ON
> SET QUOTED_IDENTIFIER ON
> --
> SHINICHI YONEDA MXL04371@.nifty.ne.jp
> Microsoft Most Valuable Professional
> MVP for SQL Server 2002-2005
> "dines" <dines@.discussions.microsoft.com> wrote in message
> news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Gives
> I
>|||Try to execute the following statement in both QA and with OSQL:
DBCC USEROPTIONS
Then compare the two. This command will tell you the current settings under
each API. QA sets many environment values quite differently than other API
s.
Sincerely,
Anthony Thomas
--
"dines" <dines@.discussions.microsoft.com> wrote in message news:5A9AE886-F
A9B-440E-8A38-CCF3AF110083@.microsoft.com...
Hi,
I tried that too but still i get the same error
Msg 1934, Level 16, State 1, Server JorSRv3, Line 1
DBCC failed because the following SET options have incorrect settings:
'QUOTED_IDENTIFIER, ARITHABORT'.NULL
thanks
"Shinichi Yoneda" wrote:
> Hi,
>
> TRY
> SET ARITHABORT ON
> SET QUOTED_IDENTIFIER ON
>
> --
> SHINICHI YONEDA MXL04371@.nifty.ne.jp
> Microsoft Most Valuable Professional
> MVP for SQL Server 2002-2005
>
> "dines" <dines@.discussions.microsoft.com> wrote in message
> news:CDB35652-383C-4A62-953B-2386CAA5A8BF@.microsoft.com...
> Gives
> I
>
>
Friday, February 24, 2012
Error in CrystalReport
Crystal Reports. I am getting the following error message.
"Line 77: Cannot load control CrystalReport1."
the code is
CrystalReport1.SQLQuery = lstrsql.
I have also activated the crystal report control in the components dialog box.
regs
R.PriyaraniIs there an error number? Try looking up the error number or the error description online. Sometimes you can find the answer that way.
Did you rename the control to something different and are trying to call it by the default name?
Do you have the correct dll installed on the machine you're getting the error on?|||Thank you, Malleyo I've solved the problem