SQL Job Fails After 4 Failed Exec() Calls

Apr 16, 2008

I am running the code below in a sql job. Exec (@SQL) errors every time but after 4 failures the job fails instead of trying @MaxRetries times. Any idea on why this is happening?
Set @RetryCounter = 0
WHILE (@RetryCounter < @MaxRetries)
Begin
SELECT @error_value = 0
Exec (@SQL)
SELECT @error_value = @@ERROR
If @error_value = 0
Set @RetryCounter = @MaxRetries
Else
Begin
WAITFOR DELAY '00:05:00'
Set @RetryCounter = @RetryCounter + 1
End
End

View 17 Replies


ADVERTISEMENT

Join Results From Multiple EXEC Calls

Apr 25, 2006

I would like to make inner join with results from different exec %procedureName% calls.

thanks.

View 3 Replies View Related

Maitenace Plan Check Database Integrity Task Fails With Failed:(0) Alter Failed For Server 'xyz'

Feb 21, 2008



Hi,



I am administering several SQL Servers running SQL Server 2005 SP2 Build 3042.
I have a common maintenance plan that runs on each of the servers. The maintenance plan runs
fine on all the servers except for one. On the one server the Database Integrity check fails with the following error:


Check Database integrity on Local server connection
Databases: <list of databases>
Include indexes
Task start: 2008-02-21T00:05:42.
Task end: 2008-02-21T00:05:46.
Failed0) Alter failed for Server €˜XYZ€™

I created a test maintenance plan to just do the integrity check and selected one database only and this also failed with the same error message. I ran this test maintenance plan and configured it for each of the databases in question and it failed each time.
If I run the DBCC manually against the databases they all report fine.


I read some of the post that talked about the €œAllow Updates€? being set incorrectly but that does not apply to my problem since my configured and run values are set to 0.

Does anyone know what the problem could be?

View 23 Replies View Related

Ssis Job Fails With Package Execution Failed

Jan 30, 2007

Hi,

I have a dts package migrated from sql server 2000 to sql server 2005 clustered server using migration wizard without any problem.

I have created a new job on sql server 2005 and one of the steps involves executing the SSIS package. It keeps failing with the error message "package execution failed". I have logged in here as a domain administrator (as also a local administrator).

I followed Article ID: 918760 but did not help.

I need this to be resolved asap.

Any quick help, much appreciated.

Thx

Murali



View 4 Replies View Related

Execute SQL Task: Executing The Query Exec (?) Failed With The Following Error: Syntax Error Or Access Violation. Possible F

Jan 23, 2008

Hi,
I'm having an SSIS package which gives the following error when executed :

Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server

The package has a single Execute SQL task with the properties listed below :

General Properties
Result Set : None

ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False

Parameter Mapping Properties

variableName Direction DataType ParameterName

User::AddLinkSql Input Varchar 0


'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'

When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"

I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.

I would appreciate if anybody can help me out of this issue by suggeting where the problem is.

Thanks in Advance.

View 12 Replies View Related

Express Instance Fails When Installing ACT - SQL Server Setup Failed

Dec 4, 2006

I just upgraded ACT database and it needs SQL Server. I just keep getting "SQL Server Setup Failed". I downloaded SQL from Microsoft, went to install and get the same error. It then refers to a summary txt log which I have had a look at but to be quite honest means nothing to me.

I only want to be able to use ACT!!



Anyone help PLEASE!!

View 20 Replies View Related

BIDS Debug Fails With Login Failed For User Error

Mar 17, 2008

Hi all

I configured my packages to user package configurations, but when i try to debug a package in BIDS in get the following error in the execution results tab :


[Connection manager "XXXXXXXXXX"] Error: An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user 'XXXXXXX'.".


Edit.

Now the degub works but after i deply the package to the sql server the package execution fails and the following is written into sql server errorlog

2008-03-17 15:56:31.71 Logon Error: 18456, Severity: 14, State: 8.
2008-03-17 15:56:31.71 Logon Login failed for user 'XXXXXXX'. [CLIENT: <local machine>]

The state 8 indicates bad password, but it isnt... because logging into sql server with that user and password works.

View 4 Replies View Related

FAILED Again! Express Fails To Install On Windows Server 2003

Dec 17, 2006

VERY frustrating. I have tried uninstalling. removing regietry keys. removing with the windows unistaller etc... to NO avial. See my Core.Log:



Error: Action "LaunchLocalBootstrapAction" threw an exception during execution. Error information reported during run:
"c:Program FilesMicrosoft SQL Server90Setup Bootstrapsetup.exe" finished and returned: 3221225477
Aborting queue processing as nested installer has completed
Message pump returning: 3221225477



And my Core(local).log:



Error: Action "ReportChainingResults" threw an exception during execution.
DwLaunchMsiExec() returned : -1073741819
Error Code: -1073741819
Windows Error Text: Source File Name: sqlchainingsqlchainingactions.cpp
Compiler Timestamp: Mon Jan 16 02:06:13 2006
Function Name: sqls::ReportChainingResults::perform
Source Line Number: 3140

Error: Failed to add file :"C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0014_APPS_.NET Framework 2.0.log" to cab file : "C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGSqlSetup0014.cab" Error Code : 2
Running: UploadDrWatsonLogAction at: 2006/11/17 1:32:51
Message pump returning: 3221225477



PLEASE Help.

Rich

View 7 Replies View Related

Object Explorer Connection Fails - Failed To Retrieve Data.......SmoEnum)

Oct 17, 2006

Hi

First up - my apologies if this is not the right forum for this question. Please let me know if there is a more appropriate one for this question.

I have come across an issue with my SQL Server 2005 Express Edition install. It has been running fine since the install (a few months back). And I can still interact (query, update etc) the databases just fine. However, SQL Management Server Studio Express has started to produce an error message when I attempt to connect the Object Explorer.

The error message is shown below.

I have tried to access the link shown in the error message but there is no information provided there.

I can use SQL Management Server Studio Express to run queries on the databases so it would appear that the underlying services are all running OK.

The SQL Server is installed using SQL Authentication only and I have not made any changes to Service accounts or the services themselves. The protocols all appear to be in order too - Shared Memory, Named Pipes, TCP/IP are all enabled.

I have restarted the SQL services and even rebooted the machine, but to no avail.

I would really appreciate if anyone out there could give me some guidance on what may be causing this issue.

Note: The SQL Server is installed on WinXP Pro SP2 running in a VirtualPC. All apps are release versions (no beta or CTP)





TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

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

A severe error occurred on the current command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

View 10 Replies View Related

Snapshot Agent Fails On Table With XML Datatype : Script Failed For Table 'dbo.TableName'

Sep 11, 2007

SQL Server 2005 SP2 Error: Script failed for Table 'dbo.TableName'

I keep getting this error when trying to generate a snapshot for transact replication.
Here is the publishing table schema:

CREATE TABLE [dbo].[viMediaPlaylist](
[MemberID] [bigint] NOT NULL,
[xmlPlaylist] [xml](CONTENT [dbo].[viMediaPlaylistCollectionSchema]) NOT NULL,
PRIMARY KEY CLUSTERED
(
[MemberID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]


I tried the following:
#1)Create table schema at the subscriber manually, and change package to Keep object as is. Got the same error during snapshot.

#2Filtered replication to NOT include XML column. This worked, and no error was generated, replication was up and running.


So my question is, what is the problem with XML column being replicated?
Any ideas how i can make this work? At this point i'm not sure what the problem is with the xml column, but it seems like ti tries to run schema script, but i'm not asking it to create the schema i already did it myself. Thanks!

Here is a log dump from the distributor:

2007-09-11 16:40:14.56 SQL Command dump
2007-09-11 16:40:14.56 ================
2007-09-11 16:40:14.56 Server: SQL02
2007-09-11 16:40:14.56 Database: Video
2007-09-11 16:40:14.56 Command Text: sys.sp_releaseapplock
2007-09-11 16:40:14.56 Parameters:
2007-09-11 16:40:14.56 @Resource = SQL02-Video_viMediaPlaylis-71
2007-09-11 16:40:14.56 @LockOwner = Session
2007-09-11 16:40:14.56 @DbPrincipal = db_owner
2007-09-11 16:40:15.17 [0%] The replication agent had encountered an exception.
2007-09-11 16:40:15.17 Source: Unknown
2007-09-11 16:40:15.17 Exception Type: Microsoft.SqlServer.Management.Smo.FailedOperationException
2007-09-11 16:40:15.17 Exception Message: Script failed for Table 'dbo.viMediaPlaylist'.
2007-09-11 16:40:15.17 Message Code: Not Applicable
2007-09-11 16:40:15.17
2007-09-11 16:40:15.17 Call Stack:
2007-09-11 16:40:15.17 Microsoft.SqlServer.Management.Smo.FailedOperationException: Script failed for Table 'dbo.viMediaPlaylist'. ---> Microsoft.SqlServer.Management.Smo.UnsupportedVersionException: Either the object or one of its properties is not supported on the target server version.
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.UserDefinedDataType.GetTypeDefinitionScript(ScriptingOptions so, SqlSmoObject oObj, String sTypeNameProperty, Boolean bSquareBraketsForNative)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.UserDefinedDataType.AppendScriptTypeDefinition(StringBuilder sb, ScriptingOptions so, SqlSmoObject oObj, SqlDataType sqlDataType)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Column.ScriptDdlCreateImpl(StringBuilder sb, ScriptingOptions so)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Column.ScriptDdl(StringCollection queries, ScriptingOptions so)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Table.ScriptTableInternal(ScriptingOptions so, StringBuilder sb, ColumnCollection columns, IndexCollection indexes)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Table.GetTableCreationScript(ScriptingOptions so, StringBuilder sb)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Table.ScriptCreate(StringCollection queries, ScriptingOptions so)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithListWorker(DependencyCollection depList, SqlSmoObject[] objects)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects)
2007-09-11 16:40:15.17 --- End of inner exception stack trace ---
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(SqlSmoObject[] objects)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleScripts(ArticleScriptingBundle articleScriptingBundle)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
2007-09-11 16:40:15.17 at Microsoft.SqlServer.Replication.AgentCore.Run()

View 6 Replies View Related

Job Fails For Package Containing Script Task With Error The Script Files Failed To Load.

Apr 7, 2006

I have developed an SSIS package that includes a Script Task on a 32-bit machine. The PrecompileScriptIntoBinaryCode property is set to True. After I build the package, the .dtsx file includes a <BinaryItem> element for that Task. Package runs fine on the dev machine, both in BIDS and as SQL Server Agent job.

When I deploy the package to a 64-bit server, it runs fine when I execute the package ad hoc from SQL Server Management Studio. However, when I schedule the package for execution as a SQL Server Agent job, the package fails with the message: "the script files failed to load."

I have reviewed posts on this error from late 2005, but the solutions don't work in this case. Specifically:

1. The Precompile property is already set to True.

2. I have already verified that the script was compiled.

Any further suggestions?

View 7 Replies View Related

SSIS Job Fails For Package Containing Script Task With Error The Script Files Failed To Load.

Apr 10, 2006

I have developed a SQL Server 2005 Integration Services (SSIS) package that includes a Script Task on a 32-bit machine.  The PrecompileScriptIntoBinaryCode property is set to True.  After I build the package, the .dtsx file includes a <BinaryItem> element for that Task.  Package runs fine on the dev machine, both in BIDS and as SQL Server Agent job.
When I deploy the package to a 64-bit server, it runs fine when I execute the package ad hoc from SQL Server Management Studio.  However, when I schedule the package for execution as a SQL Server Agent job, the package fails with the message: "the script files failed to load."
I have reviewed posts on this error from late 2005, but the solutions don't work in this case.  Specifically:
1. The Precompile property is already set to True.
2. I have already verified that the script was compiled.
Any further suggestions?

View 1 Replies View Related

Calls Vs. Sales

Apr 25, 2005

Hi.
I’m having a conceptual problem with tracking sales vs. call center calls.
Each record in the fact table represents a call to the call center.
In this record are various facts and foreign keys that map to marketing campaigns, etc.
The product sold ID is NULL on no sale, and filled in for a sale.
When creating MDX to retrieve data by campaign, for example, to track the number of calls for a campaign vs. it’s sales, that works fine (because there’s a column labeled sale that’s either 0 or 1 for the sale and I just sum it). This way I get the conversion percentage of calls to sales.

But when creating MDX to track the product sold, as soon as I do a crossjoin on campaign and products sold, for example, I lose the total calls- the number of calls is the same as the sales (similar results as a SQL join). Am I doing something wrong or is it conceptually impossible to track this type of metric down to the product when there are NULLs in the fact table? I’ve tried converting the nulls to a NONE category, but that doesn’t stop the crossjoin from not giving me the desired results, plus I then have to filter out NONE as a product.
Is that why a lot of sample warehouses have a separate sales cube?

Thank you,
Richard

View 2 Replies View Related

Multiple Calls To SP

May 16, 2006

Hi group,

I've got a performance issue.
Here's in global what the sp (Let's call it SP_A) does.
Step 1 Call a different SP (Lets call it SP_B) and store the output in a variable
Step 2 SP_B runs a select statement that returns 1 value
Step 3 SP_A uses this value as a parameter in a select statement.
Step 4 The result of the SP_A is the result of the select statement (744 rows (always))

All tables used in SP_A and SP_B are temp tables.
Total performance of SP_A is between 0.090 and 0.140 seconds.

The problem is that this SP is called 180 times from outside SQL server. That means that the total processing time is somewhere between 21 and 25 seconds.

When I move the entire processing to within SQL server I gain only 2 seconds. So I lose 2 seconds in connecting to the database 180 times.

Can someone give me some pointers on where to look for performance wins?

If you like I can add the SP's

Regards,

Sander

View 7 Replies View Related

Combine Multiple Sql Calls Into 1

Jan 15, 2006

I have an old app that I'm trying to recode and improve performance.

From the start it makes three seperate calls to a db, checks to see if the record exists, if it doesn't it adds it, then takes the data from all three and inserts it into a final call.

Here is a quick example of the script

Select * from table1 where id = " & tempVariable
If Not RS.EOF Then
strTable1 = RS("SomeRec")
Else
RS.ADDNEW
RS("SomeRec") = tempRec1
RS.UPDATE
RS.Requery
strTable1 = RS("SomeRec")
End If
RS.CLOSE

Select * from table2 where id =2
If Not RS.EOF Then
strTable2 = RS("SomeRec")
Else
RS.ADDNEW
RS("SomeRec") = tempRec2
RS.UPDATE
RS.Requery
strTable2 = RS("SomeRec")
End If
RS.CLOSE

Select * from table3 where id =3
If Not RS.EOF Then
strTable3 = RS("SomeRec")
Else
RS.ADDNEW
RS("SomeRec") = tempRec3
RS.UPDATE
RS.Requery
strTable3 = RS("SomeRec")
End If
RS.CLOSE

INSERT INTO Table4 (Table1, Table2, Table3) VALUES ('" & strTable1 & "', '" & strTable2 & "', '" & strTable3 & "'


These is probably an easy solution however I don't know where to start. Any help or ideas will be greatly appreciated.
Thanks
-Scott

View 1 Replies View Related

Can't See Procedure Calls In Profiler, HELP

Feb 28, 2008

I am attempting to see if an application is calling a particular stored proc. i have the Profiler setup to only display the login and it is. I have all items set to display under Stored Procedures, but I can't see names of procedures in the Text Data.

View 4 Replies View Related

Should I Use Function Calls In My Procedures

Feb 4, 2008

hi all.
when i worked with oracle before, it was very common to call a function from inside a s.procedure.
now, someone talled me that in sqlserver this is not a best performance approach, and i should try to avoid this.
is this true?

View 4 Replies View Related

Number Of Licences &&amp; Calls

May 2, 2007

My Problem is that I don€™t know really what does a call means.

We got a SQL Standard Edition.
Can I install as many instances I want in a Server?
How many users can access the Server at the same time?

If I use SQL authentication, and two users use this logging information, how many calls do they made? 2 one per each user (PC) or just 1 one per logging.

If I have a client / server application, and the server access the SQL Server using SQL authentication. Can I have unlimited number of clients?

View 3 Replies View Related

Keeping State Between Calls To A UDF

Dec 14, 2006

Hi,

I'd like to keep state between calls to a UDF (mainly for caching purposes). I can shove an object into the appdomain using SetData and read it using GetData, but that requires the assembly to be set to UNSAFE. I'm confident I can secure the DB and the assembly fairly well, but I like defense in depth, and if there's another way to save state between calls to a UDF, I would prefer those.

Is there another way to store state between calls to a UDF, without putting data into DB tables or using things that will require the assembly to have such a wide permission set?

Thanks,

Alex

View 4 Replies View Related

Union V Individual Calls

Aug 18, 2007

Suppose my database has 3 table A though C and I need to get the number of records in each. I could do it as individual selects like
SELECT 'A' AS 'Table', COUNT(*) AS 'Count' FROM A
SELECT 'B' AS 'Table', COUNT(*) AS 'Count' FROM B
SELECT 'C' AS 'Table', COUNT(*) AS 'Count' FROM C

or
SELECT 'A' AS 'Table', COUNT(*) AS 'Count' FROM A
UNION
SELECT 'B' AS 'Table', COUNT(*) AS 'Count' FROM B
UNION
SELECT 'C' AS 'Table', COUNT(*) AS 'Count' FROM C

Is there any problem in unioning statements like these? In reality there were over a hundred tables and the TSQL was generated by looping through SYSOBJECTS. I eventually used the first construct as the XML was simpler to generate.

View 6 Replies View Related

Error: Cannot Open Database Requested In Login 'projectAllocations'. Login Fails. Login Failed For User 'sa'.

Oct 27, 2004

Hi,
Im getting this error when attempting to retrieve data from an sql database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:


Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:finalyearproject2sample.aspx Line: 15



Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks

View 3 Replies View Related

Cannot Open Database Requested In Login 'dbName'. Login Fails. Login Failed For User 'machineNameASPNET'

Jul 27, 2005

Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.

View 9 Replies View Related

Cannot Open Database Requested In Login 'sql'. Login Fails. Login Failed For User 'ASPNET'.

Dec 19, 2003

I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?

Thanks for any help,

Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.

View 5 Replies View Related

Recursive Calls To Stored Procedure

Aug 24, 2007

I need to develope a stored procedure (eventually called by a trigger) that creates a record in an event table for all the descendants of a drawing. There are 3 tables involved as example tables shown below:



DwgTable


DwgID (integer)--drawing record identifier

PrntDwgID (integer)--parent drawing record identifier (a previously defined DwgID from this table)

DwgEventTable


DwgEventID (integer)--record identifier

DwgID (integer)--value from DwgTable

EventID (integer)--value from EventTable

EventTable


EventID
There are other fields in two of the tables and only the fields shown in the DwgEventTable, but only the fields shown are required for adding a record in the DwgEventTable for a new event in the EventTable. The problem is identifying all the DwgID's of the descendant of the DwgID where the EventID occurred. There may be 0 to N descendants in 0 to N generations. I need to add a record for the original DwgID and all the descendant DwgID's in the DwgEventTable for the event identified by EventID.

I could do this from the client side, but a better place would be from the server side. I need some clue(s) on how to start coding a recursive stored procedure in SQL Server 2005. From what I have read, you cannot create a managed code procedure that appends or updates records--if managed code can add/modify records then I can do the above with managed code procedure.

Any Suggestions?

View 4 Replies View Related

Synchronizing SSIS Packages Calls

Feb 26, 2007

I have several SSIS Packages which are called by few different applications. I need to make packages Mutually Exclusive, so that If one is running; calls to any other Package should be put on wait till the running one has finished its execution.
What are the best ways to do this ?


I would sincerely appreciate inputs in this.

View 6 Replies View Related

Fixing A Slow, Brute Force Set Of SQL Calls

Dec 24, 2003

I've got a huge inefficiency in my code that I'm trying to fix. I’m coding in VB.NET using ASP.NET and an MSSQL 2000 server.

I’m working in a temporary table that has an identical layout as another, non-temporary table in my database. Once I get the temp table how I want it, I need to insert everything from that table into my main table. Before I can do that, however, I need to delete all the records in the main table with certain fields that match a record’s fields in the temporary table.

Right now, I have a method that builds one delete statement per record in the temporary table and then runs those statements on the main table. Since I’m dealing with the order of 50,000 records (at least) here, building and sending those statements to the server takes forever.

Is there a way I can accomplish the same thing without building and sending such a huge SQL call to the server? If so, how would I go about doing that?

Thanks in advance for whatever help you can give,
-Starwiz

View 6 Replies View Related

Output Param In Oledb Transformation That Calls An Sp

Feb 17, 2008

is it true that I will not be able to use the returned value from an sp that is called on every row from an oledb command transformation? I see all kinds of complaints on the web but cant determine if this would be a waste of time. I'd like to append the returned value (which is calculated and cannot be joined in the buffer) to the data on its way out of the transformation.

View 3 Replies View Related

Internal Activation - Calls Stored Procs In Other DBs

Mar 7, 2006

Hi all

I am using internal activation on a queue to process the messages, should an error be encountered I call stored procedure A in the same database to log the error. Part of the processing in stored procedure A is a call to stored procedure B in another database (on the same server), however I have not been able to get this call to B to work. Currently I get the error "The server principal XXXXXX is not able to access the database YYYYYYY under the current security context".

I have tried various combinations (too many to remember) of database owners, roles and permissions as well as EXECUTE AS on both A and B and the Queue but none seem to work. Can anyone give me simple example of a setup which would allow this cross database call to work?



Thanks



Ian

View 6 Replies View Related

Can I Keep A Object In Memory Betweek Calls To SqlProcedure?

Feb 25, 2008

I am wondering if it is at all possible to keep an object in memory between calls to a SqlFunction or SqlProcedure.

Every time a row is inserted in to a table, i need to do some processing on the data. The processing becomes many times faster if I can do some preprocessing (the preprocessing is independent of the data inserted into the table). So basically, I want to save the result of the preprocessing, only do it one time, and save the result in a object in memory. Is this at all possible?

Regards, Egil.

View 5 Replies View Related

Deploying A Custom Assembly That Calls A Web Service

Sep 27, 2007

I'm having a terrible time trying to figure out how to do this, does anyone have experience?

My code works fine in the report viewer, but all I get from the deployment is #Error symbols. I've added my custom dll file to the config file and gave it full trust, as well as the URL of the web service I'm calling. I've even modified the rest of the codegroups within the file to FullTrust just in case.

I've also added the [assembly: AllowPartiallyTrustedCallers] to the AssemblyInfo class, and [WebPermission(SecurityAction.Assert)] to the constructor of my custom assembly no avail.

I'm at a complete loss now as to why my deployment cannot run this code. As far as debugging goes, Visual Studio is not located on the reporting server, nor is it an option to have it put there. I've been able to run the code with the web service lines commented out, but as soon as I put even the webservice.Credentials = CredentialCache.DefaultCredentials in I'm greeted with the nice and calming #Error.

Any suggestions?

View 1 Replies View Related

Date/Time Format For Webservice API Calls

Feb 5, 2008

Hi,

I want to retrieve some parameter values from Reporting Services using GetReportParameters from

Microsoft.SqlServer.ReportingServices.ReportService2005.
It works fine unless the parameter types are date/time. In such a case it seems as if the format of the parameter depends on the ReportServices installation:

Example:
On a German installation the date/time format is "dd.mm.yyyy" but on an English installation the format is different (mm/dd/yyyy) (and of course the time part is also different).

Is there a way to determine the format to be expected? (... even in the case I've no knowledge about the server ReportingServices is running.)

View 5 Replies View Related

Webservice Calls With Parameters From Reporting Services

May 21, 2007

I am trying to query a list in sharepoint using its lists.asmx webservice and in turn its GetListItems call. I currently have the call working using the following code in the Querystring for the report



<Query>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems"/>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
</Query>



This seems to work fine except that the list has some empty fields in the first record and for some unbelivable reason they (the empty fields) do not get returned as part of the dataset unless i put a value into them. I then came across a parameter for GetListItems called viewFields which is supposed to . Tehn sample Soap request is shown as follows



<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlnsoap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>string</listName>
<viewName>string</viewName>
<query>
<xsdchema>schema</xsdchema>xml</query>
<viewFields>
<xsdchema>schema</xsdchema>xml</viewFields>
<rowLimit>string</rowLimit>
<queryOptions>
<xsdchema>schema</xsdchema>xml</queryOptions>
</GetListItems>
</soap:Body>
</soap:Envelope>





As i have a parameter for viewfields setup.... What value do i pass to it ??? My XML is in its infancy but i though something along the lines of the following would do as an input.



<FieldRef Name='Title'/><FieldRef Name='Address1'/>



Also, maybe i am going the wrong way about this.Is there an easier way of defining the Parameters as part of the Querystring or do Parameters always have to be setup in the parameters tab (My Parameter values are static and will never change).

View 1 Replies View Related

Can Exec Select But Can't Exec Sp

Oct 31, 2007

I have two SQL Server 2000 (one is localhost, one is remote with VPN IP 192.168.5.4).

I can select * from [192.168.5.4].db.dbo.test but I can't exec [192.168.5.4].db..spAdd in localhost.

These select and sp is OK for 1 or 2 week without any problem,but it didn't work one day.

Can some one explain why?

View 5 Replies View Related







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