Hi!
I try to find out how to write an tsql program that sends dmx-ddl to SSAS.
this works:
select * from openquery(bdjOLAP, 'select <col> from <modelname>.content')
because it returns an resultset.
but how to something similar this (would fail, because no result set is returned):
select * from openquery(bdjOLAP, 'create mining structure...')
For our customer we are trying to create dynamically local cube files. Because the requirements are complex and we need to generate a lot of cube files, we can't use the MDX script CREATE GLOBA CUBE to create the local cubes and we have to use SSIS to have it done automatically. These are the steps we are following: 1. In a SSIS package, through a Script task, we generate the ASSL script in order to create the database and we stores the script in a column of the XML datatype in SQL Server through a stored procedure "SSAS_TEST.InsertASSLScript". The following code is use in the script task:
Code Block Imports System Imports System.IO Imports System.Data Imports System.Math Imports System.Xml Imports System.Data.SqlClient Imports Microsoft.SqlServer.Dts.Runtime Imports Microsoft.AnalysisServices Class ScriptMain 'Create writers and set formating for xml Dim myScripter As Scripter 'Represents a writer to write information to a string Dim myStringWriter As New System.IO.StringWriter() Dim myStringWriterTrans As New System.IO.StringWriter() 'Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations. Dim myXmlTextWriter As System.Xml.XmlTextWriter Dim myXmlTextWriterTrans As System.Xml.XmlTextWriter Dim myXmlWriterSettings As XmlWriterSettings Sub New() myScripter = New Scripter myXmlTextWriter = New System.Xml.XmlTextWriter(myStringWriter) myXmlTextWriterTrans = New System.Xml.XmlTextWriter(myStringWriterTrans) myXmlWriterSettings = New XmlWriterSettings myXmlWriterSettings.OmitXmlDeclaration = True myXmlWriterSettings.ConformanceLevel = ConformanceLevel.Auto myXmlTextWriter.Formatting = Formatting.Indented myXmlTextWriter.Indentation = 2 End Sub Public Sub Main() 'Get Server name from DTS connection object and store in variable Dim oDTSASConnection As ConnectionManager = Dts.Connections("SARP_Cubes") Dim sASServer As String = CStr(oDTSASConnection.Properties("ServerName").GetValue(oDTSASConnection)) 'MsgBox("Server " & sASServer & " has been connected") Dim oASServer As New Microsoft.AnalysisServices.Server 'Connect to the requested server oASServer.Connect(sASServer) 'Get Database name from DTS connection object and store in variable Dim sASDBName As String = CStr(oDTSASConnection.Properties("InitialCatalog").GetValue(oDTSASConnection)) Dim oASDatabase As New Microsoft.AnalysisServices.Database 'MsgBox("InitialCatalog " & sASDBName & " has been found") 'Get database sASDBName and store in variable oASDatabase = oASServer.Databases.GetByName(sASDBName) 'MsgBox("Database " & sASDBName & " has been connected") 'Get Cube Dim CubName As String If Dts.Variables.Contains("CubName") = True Then CubName = CType(Dts.Variables("CubName").Value, String) End If Dim oASCube As New Microsoft.AnalysisServices.Cube 'MsgBox("Database " & sASDBName & " has been connected") 'Create a variable to store the create cube ASSL-script 'Dim sASSLCreateCub As String 'Store the create script in myXmlTextWriter myScripter.ScriptCreate(New MajorObject() {oASDatabase}, myXmlTextWriter, False) myXmlTextWriter.Flush()
'Create a string in order to manipulate the XML-string and append the Batch and process element Dim sASSLString As String sASSLString = "" & myStringWriter.ToString & "ProcessFull SARP_Cubes"
'Make a database conenction through connection manager 'Get Server name from DTS connection object and store in variable Dim oDTSDBConnection As ConnectionManager = Dts.Connections("METADATA") Dim sDBServer As String = CStr(oDTSDBConnection.Properties("ServerName").GetValue(oDTSDBConnection)) Dim sDBDatabase As String = CStr(oDTSDBConnection.Properties("InitialCatalog").GetValue(oDTSDBConnection)) Dim oBuilder As New SqlConnectionStringBuilder() oBuilder.DataSource = sDBServer oBuilder.InitialCatalog = sDBDatabase oBuilder.ConnectTimeout = 1000 oBuilder.IntegratedSecurity = True oBuilder.ApplicationName = "InsertASSLScript" Dim oDBConnection As New SqlConnection(oBuilder.ConnectionString.ToString) ' Create Sql Command Dim cmd As New SqlCommand("SSAS_TEST.InsertASSLScript", oDBConnection) cmd.CommandTimeout = 60 cmd.Connection = oDBConnection cmd.CommandType = CommandType.StoredProcedure ' Add parameters and their values cmd.Parameters.Add(New SqlParameter("@COUNTRY_CODE", SqlDbType.VarChar, 255)).Value = "999" cmd.Parameters.Add(New SqlParameter("@CUBE_XMLA", SqlDbType.VarChar)).Value = sASSLString cmd.Parameters.Add(New SqlParameter("@DATABASE_ID", SqlDbType.VarChar, 255)).Value = sASDBName cmd.Parameters.Add(New SqlParameter("@CUBE_ID", SqlDbType.VarChar, 255)).Value = "ALL CUBES" ' Open the connection oDBConnection.Open() ' Execute the command cmd.ExecuteNonQuery() ' Clean Up myStringWriter.Close() myStringWriterTrans.Close() 'myStringReader.Close() 'myXMLReader.Close() myXmlTextWriter.Close() 'oDBConnection.Close() oASServer.Disconnect() Dts.TaskResult = Dts.Results.Success End Sub
End Class
2. We manipulate the ASSL-script in order to create the cube that we want to have as local cube
3. We extract the final ASSL-script from the database through an "Execute SQL Task" with a XML Result Set. The SQL use in the task is:
Code Block SELECT cast(CUBE_XMLA as varchar(max)) FROM SSAS_TEST.CUBE_XMLA WHERE (COUNTRY_CODE = '500')
I have also tried
Code Block SELECT CUBE_XMLA FROM SSAS_TEST.CUBE_XMLA WHERE (COUNTRY_CODE = '500')
and
Code Block SELECT CUBE_XMLA FROM SSAS_TEST.CUBE_XMLA WHERE (COUNTRY_CODE = '500') FOR XML AUTO
I always get the same error: "Execute SQL Task: Executing the query "SELECT cast(CUBE_XMLA as varchar(max))
FROM SSAS_TEST.CUBE_XMLA
WHERE (COUNTRY_CODE = '500') " failed with the following error: "/ROOT/*[local-name()="Batch" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="Create" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="ObjectDefinition" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="Database" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="Cubes" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="Cube" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="MeasureGroups" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="MeasureGroup" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]/*[local-name()="Source" and namespace-uri()="http://schemas.microsoft.com/analysisservices/2003/engine"][1]
Type '{http://schemas.microsoft.com/analysisservices/2003/engine}MeasureGroupBinding' is not found in Schema."
Does anyone know how to handle this?
If we could use this XML variable, we will use another Script task to generate our Local Cube(s). The script task looks like this:
Code Block Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Runtime Imports Microsoft.AnalysisServices.AdomdClient Imports System.Data.SqlClient Imports System.Xml Public Class ScriptMain ' The execution engine calls this method when the task executes. ' To access the object model, use the Dts object. Connections, variables, events, ' and logging features are available as static members of the Dts class. ' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure. ' ' To open Code and Text Editor Help, press F1. ' To open Object Browser, press Ctrl+Alt+J. Public Sub Main() 'Declare variables 'Connection Dim conn As AdomdConnection 'Command Dim cmd As AdomdCommand 'Cellset Dim cst As CellSet Dim strFilename As String = "D:TestLocal.cub" Dim strSource As String = Dts.Variables("ASSLCreateScript").Value.ToString() '*----------------------------------------------------------------------- '* Open connection. '*----------------------------------------------------------------------- Try ' Create a new AdomdConnection object, providing the connection ' string. conn = New AdomdConnection("Data Source=" & strFilename) ' Open the connection. conn.Open() Catch ex As Exception Throw New ApplicationException( _ "An error occurred while connecting.") End Try Try '*----------------------------------------------------------------------- '* Open cellset. '*----------------------------------------------------------------------- ' Create a new AdomdCommand object, providing the ASSL query string. cmd = New AdomdCommand(strSource, conn) ' Run the command and return a CellSet object. cst = cmd.ExecuteCellSet() '*----------------------------------------------------------------------- '* Release resources. '*----------------------------------------------------------------------- conn.Close() Catch ex As Exception ' Ignore or handle errors. Finally cst = Nothing cmd = Nothing conn = Nothing End Try Dts.TaskResult = Dts.Results.Success End Sub End Class
I hope that someone can help us. We browse the net without result,
I've created a cube and it processed fine. The calculate command is there. The measure that I'm attempting to run in the SSAS/Visual Studios browser is simply a count rows measure. When I drag the measure to the window, it says no rows available. If I click on the filter that allows nulls, the only change it makes is that it goes from no rows available to "NULL".Â
All, I am developing the data mart refresh task in SSIS. I wanted to call the package in command prompt. I need help. Can any one give any tips on it. Thanks and appricate in advance.
We have a user-defined function that can be called directly via SQL (in SQL Server Management Studio) without error. We would like to use this function to populate a column, whist data is being processed within Integration Services. Using an OLE DB Command transformation to achieve this would seem the most appropriate.
The following was inserted for the SQLCommand property:
However, when the Refresh button is pressed we are presented with the error below:
Error at Load Orderline [OLE DB Command [15171]]: An OLE DB error has occurred. Error code: 0x8004E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x8004E14 Description: "Invalid parameter number".
If we use SET instead of EXEC (e.g. SET ? = dbo.GetOrderlineStatus(@dt_required = ?, @dt_invoice = ?, @dt_despatch = ?, @ch_status = ?, @si_suffix = ?, @re_quantity = ?, @vc_invoice_id = ?, @vc_order_id = ?)) the following error is produced:
Error at Load Orderline [OLE DB Command [15171]]: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Syntax error, permission violation, or other nonspecific error".
1. (calls an oracle package) - call lpaarchive.pibrdg.setlastbridgeruntime(sysdate);
2. (selects rows) - select timestamp ,
pitag ,
rtlmp from LPAARCHIVE.I_PIBRDG_BUS5MINRTLMPS
where timestamp <= (sysdate + 0.002777778)
order by TIMESTAMP ASC; I need to execute these 2 statements together. I tried using Execute SQL task to call the package and then an OLEDB source that calls a variable with the select statement. But it does not retrieve any rows. It seems like the result of calling the package is used by the select statement to give the final rows. Could anyone please help me resolve this issue.
I need to call a function to calculate a value. This function accepts a varchar parameter and returns a boolean value. I need to call this function for each row in the dataflow task. I thought I would use an oledb command transformation and for some reason if I say..
'select functioname(?)' as the sqlcommand, it gives me an error message at the design time. In the input/output properties, I have mapped Param_0(external column) to an input column.
I get this erro.."syntax error, ermission violation or other non specific error". Can somebiody please suggest me what's wrong with this and how should I deal this.
Hi, all I'm using Sql server 2000 I want to make select statement dynamically and return table using function. in sp, I've done this but, in function I don't know how to do so. (I have to create as function since our existing API..)
Following is my tials... 1. alter Function fnTest ( @fromTime datetime, @toTime datetime) RETURNS Table AS
RETURN Exec spTest @from, @to GO
Yes, it give syntax error..
2. So, I found the following
From Sql Server Books Online, Remark section of CREATE FUNCTION page of Transact-SQL Reference , it says following..
"The following statements are allowed in the body of a multi-statement function. Statements not in this list are not allowed in the body of a function: " ..... * EXECUTE statements calling an extended stored procedures.
So, I tried.
alter Function fnTest ( @fromTime datetime, @toTime datetime) RETURNS Table AS
RETURN Exec master..xp_msver GO
It doesn't work... syntax err...
Here I have quick question.. How to execute statements calling an extended stored procedures. any examples?
Now, I'm stuck.. how can I create dynamic select statement using function?
Iam using 'Execute SQl task' which calls a stored procedure located in sql server database.The task's SQL source type is variable and the variable has the follwoing expression "EXEC PROC_SEL_MBO_REPORT "+@[User::V_SP_Job_Date]after evaluation it is like EXEC PROC_SEL_MBO_REPORT '01/NOV/2007'.It is working fine
Now the procedure is changed to Oracle.So I have changed it to "BEGIN PROC_SEL_MBO_REPORT " + "("+ @[User::V_SP_Job_Date]+")"+"; END"+";" after evaluation it is like BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;.It is sucessfully executing from the task but no data is loaded into the tables which are used by the procedure internally. Executing 'execute BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;' is perfectly alright from SQl developer or sql plus.
I have a remote batch file on machine B that I need to execute using 'Execute process task' control from a package on machine A. The batch file uses pgp software and encrypts a file sitting on machine B itself. The reason why my batch file is sitting on machine B, is because the PGP software is on machine B.
If I execute the batch file by itself from machine B, the script runs fine. I refer the same batch file as a UNC path from my package on machine A. But that does not work since the 'Working directory' is still machine A. I can not set machine B's folder as the working dir because it does not accept UNC path. So I say, ok , let me map a path to that UNC location and map it as drive 'Z:'. Certainly if I do so, I will be running the process on machine A and the batch file will look for the pgp software on machine A, and hence fail.
I have tried third party remote batch execution tools (PSEXEC) but have not had success, not because of SSIS limitations, but simply because the PGP executable when run through the PSEXEC tool, does not identify the location of the public keys on machine B and hence gives an encrytion failure.
How do I get the remote batch file to execute such that it executes with its own env? Is there a better remote execution tool I can try or are there any other features of SSIS I can use to get around this issue? I need the results of the batch file and hence do not want to make it an asyncronous process.
When running an integration services package from a windows service I get the "Object ... has been disconnected or does not exist at the server." exception after aproximately six minutes of execution.
This is *not* my windows service failing. I can loop indefinately while tracing to a log file within the service and it will run forever. While calling the mypackage.execute(...) method however, after six minutes (give or take) the exception is thrown...
my code looks something like this: <code> dim foo as Microsoft.SqlServer.Dts.Runtime.Application mypackage = foo..LoadPackage(strimportPkgFilename, pkgevents) results = myPackage.Execute(Nothing, Nothing, pkgevents, Nothing, Nothing) </code>
<error> A first chance exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll Exception in: frmMyForm.DoImports Message: Object '/b76f98a0_5bd9_49d8_a524_eeb49d55b303/bqbhkjnaofq_ifr_cwz+srid_1.rem' has been disconnected or does not exist at the server. </error>
oddly, this same code works perfectly if I run it within a windows form application no matter how long it takes.
It also runs fine if the package can complete in under six minutes.
This is the first time I've tried creating an "execute sql task" with a "full result set".
I've read in the documentation that I must set the resultname to 0, which is done, and that the variable must be of type object. Also done.
[Execute SQL Task] Error: Executing the query "select * from blah" failed with the following error: "The SelectCommand property has not been initialized before calling 'Fill'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Has anyone else had success with a full result set?
SET IDENTITY_INSERT table name ON I use this to run it:
Code Snippet
.
.
.
Dim command As SqlCommand = New SqlCommand("SET IDENTITY_INSERT table name ON", msSqlConexion) command.ExecuteNonQuery() It doesn't throw any kind of errors, but it actually don't execute it, and If I run it on console it works ok.
I have a little application that I have designed where I need to be able to execute create table and create function comands against the database. It seems that it does not like my sql file. Does anyone know of a different method of doing this?
Error message Line 2: Incorrect syntax near 'GO'. Line 4: Incorrect syntax near 'GO'. Line 8: Incorrect syntax near 'GO'. 'CREATE FUNCTION' must be the first statement in a query batch. Must declare the variable '@usb'. Must declare the variable '@usb'. Must declare the variable '@i'. A RETURN statement with a return value cannot be used in this context. Line 89: Incorrect syntax near 'GO'. Line 91: Incorrect syntax near 'GO'. Line 94: Incorrect syntax near 'GO'.
Protected Sub Install() Dim err As String = "" While err.Length < 1 ' Dim your StreamReader Dim TextFileStream As System.IO.TextReader 'Load the textfile into the stream TextFileStream = System.IO.File.OpenText(Request.PhysicalApplicationPath & "Scripts .sql") 'Read to the end of the file into a String variable. executesql(TextFileStream.ReadToEnd, err)
err = "Susscessful" End While If err = "Susscessful" Then Response.Redirect("Default.aspx") Else Me.lblError.Text = err End If End Sub Private Function executesql(ByVal s As String, ByRef err As String) As Boolean Try Dim conn As New Data.SqlClient.SqlConnection(GenConString()) Dim cmd As New Data.SqlClient.SqlCommand(s, conn) conn.Open() cmd.ExecuteNonQuery() conn.Close() Return True Catch ex As Exception err = ex.Message.ToString Return False End Try End Function
Example sql file SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MyFunc]') and xtype in (N'FN', N'IF', N'TF')) drop function [dbo].[MyFunc] GO CREATE FUNCTION [dbo].[MyFunc] ( -- Add the parameters for the function here
) RETURNS varchar(1000) AS BEGIN -- Declare the return variable here DECLARE @Result varchar(1000) -- Add the T-SQL statements to compute the return value here -- Do something here -- Return the result of the function RETURN @Result END GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
In SQL Server using xp_cmdshell we can excute any of the command or executable files which can be executed in command prompt. Here my problem is that .. I am trying to execute OSQL from the MSSQL(Query Analyser) using xp_cmdshell.. but its give error saying "'osql' is not recognized as an internal or external command, operable program or batch file." This error occours when it is not able to find the executable file... but same thing I am able to execute from the command prompt. So I feel this problem is some where related to the path setting of windows. If some one can solve this problem or sugesst the how to set the path for window it will be help full.. waiting for reply
I wanted to know if there is a way to execute sql commands on the operating system's command line. If it is possible, then how do we do it ? For example to execute a SELECT * from Table statement what are we supposed to do ?
Hi, I need to execute some store procedures I have in the SQL editor but I seem to been having problems with the formatting for datetime variables needed for the execution of my code. can anyone please help? thanks in Advance
THE STORED PROCEDURE SAMPLE ALTER PROCEDURE [dbo].[usp_CMSTemplateCreateNewTemplate] @SiteID AS INT, @PageID AS INT, @Title AS NVARCHAR(50), @EditHREF AS NVARCHAR(512), @CreatorID AS INT, @StartDate AS DATETIME, @EndDate AS DATETIME, @Child AS INT,@PageTemplateID AS INT OUTPUT AS
I'm wondering if there is any way for me to execute any type of command (delete, insert, create, alter, etc) on management studio without having to wait the server answer.
On Oracle, I use DBMS_JOB. On SQL Server, do I have to create a SQL SERVER Agent Job? What if I don't have permission to create that kind of jobs?
Hello, the following code works perfectly in SQL Server 2000 and SQL Server 2005 Express over WinXP but when run against an instance of SL Server2005 Express over Win2003Server, the first time Command.Execute is invoked returns no error (even though no action seems to be take by the server), subsequent calls return the error -2147217900 couldn't find prepared instruction with identifer -1 (message may vary, it is a translation from may locale)
Any ideas? Thanks
Code Block Public Sub Insert_Alarm(sIP As String, nAlarm As Long) Static cmdInsert As ADODB.Command Static Initialized As Boolean On Error GoTo ErrorHndl If Not Initialized Then Set cmdInsert = New ADODB.Command Set cmdInsert.ActiveConnection = db cmdInsert.Parameters.Append cmdInsert.CreateParameter("IP", adVarChar, adParamInput, Len(sIP), sIP) cmdInsert.Parameters.Append cmdInsert.CreateParameter("Alarm", adInteger, adParamInput, , nAlarm) cmdInsert.CommandText = "insert into ALARMS(date_time,ip,alarm,status) values (getdate(),?,?,1)" cmdInsert.CommandType = adCmdText cmdInsert.Prepared = True Initialized = True End If cmdInsert.Parameters(0).value = sIP cmdInsert.Parameters(1).value = nAlarm cmdInsert.Execute Exit Sub ErrorHndl: ... End Sub
We have an ASP 3.0 application that currently works "correctly" on one server, Server A, and we€™re testing it on another server, Server B, which is 64 bit.
For this example, the stored procedure sp_TestProcedure is:
CREATE PROCEDURE sp_TestProcedure @Name varchar(50) AS INSERT INTO tblTest ([Name], Date) VALUES (@Name, getDate()) SELECT COUNT(*) AS 'Count' FROM tblTest
The basic point is the stored procedure does an INSERT and then a SELECT.
Now... to the issue. On Server A, the variable rs above ends up with a single open Recordset which is the results of the SELECT statement. However, on Server B, rs is set to a closed recordset, and rs.NextRecordset() gets a second recordset of the results of the SELECT statement.
I understand what's going on. Server B is first returning the number of rows affected by the INSERT which translates to a closed recordset. But Server A does not do this.
I would like to know why the default behavior of the command's .Execute is different on the different servers. Does it relate to the Provider/Driver settings in the connection string? Does it have anything to do with 64 bit VS. 32 bit servers?
I know that one way to address this issue to add SET NOCOUNT ON to the start of the stored procedure. But we have many stored procedures, and if the solution is a change in the connection string, that would be preferred. Also, whatever the possible solution is, I also looking to discover *why* it's happening.
Hi everybody, I would like to know if it's possible to execute a stored procedure, passing it parameters, using not CommandType.StoredProcedure value of sqlcommand, but CommandType.Text.
I tried to use this: sqlCmd.CommandType = CommandType.Text sqlCmd.Parameters.Add(sqlPar) sqlCmd.ExecuteNonQuery()
With this sql command: "exec sp ..."
I wasn't able to make it to work, and I don't know if it's possible.
Another question: if it's not possible, how can I pass a Null value to stored procedure? This code: sqlPar = new SqlParameter("@id", SqlDbType.Int) sqlPar.Direction = ParameterDirection.Output cmd.Parameters.Add(sqlPar)
sqlPar = new SqlParameter("@parent_id", DBNull) cmd.Parameters.Add(sqlPar)
doesn't work, 'cause I get this error: BC30684: 'DBNull' is a type and cannot be used as an expression.
How can I solve this? Bye and thanks in advance.
P.S. I would prefer first method to call a stored procedure ('cause I could call it with 'exec sp null' sql command, solving the other problem), but obviusly if it's possible...=)
Hi, I need to send a table data into flat and then ftp into different location. I was using xp_cmdshell via sql task but my network engineer is saying that this xp_cmdshell will break the security and recomond to use "Execute Process Task". If i'm using this task getting the below error. Could you advice me regrding network engineer thought and any solution for avoiding this error.
--------------------------- Execute Process Task: C:WINDOWSsystem32ftp.exe --------------------------- CreateProcessTask 'DTSTask_DTSCreateProcessTask_1': Process returned code 2, which does not match the specified SuccessReturnCode of 0. --------------------------- Thanks,
Hi, I'm looking into the idea of building an enhanced version of dtexec.exe that builds in some extra logging features. My utility will execute packages using the Package.Execute() method.
Thing is, I'd still want to support all of the command-line options that dtexec supports. For example, my utility should accept "/set package.variables[myvariable].Value;myvalue" and pass it through to the executing package but I can't find a way of doing it using Package.Execute().
Am I missing something or is this just not possible?
We connect to the remote database servers through the network from loca by using Query Analyzer. Previously we were able to execute the xp_cmdshell command from local Query Analyzer to fetch the remote databases data. But now we are unable to execute the xp_cmdshell command on remote databases from local Query Analyzer We do not know what happened but i think due to network updates this command is not able to execute...
For ex: Previously i was able to execute master..xp_cmdshell 'net start' from local Query Analyzer.But now not able to execute
Now my question is, is there any other way(Directly or indirectly) to execute the xp_cmdshell command on remote databases from local?
Note : we are able to execute this command on remote Query Analyzer but not from local QA