Hi ,
I have used some of code in my applicatoin with
xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for security
reasons . is there any other way to do that .(to interact with OS)
Thanks
Aju
Aju wrote:
> Hi ,
> I have used some of code in my applicatoin with
> xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for
> security reasons . is there any other way to do that .(to interact
> with OS)
> Thanks
> Aju
Once option is to limit the access the SQL Server Service Account has in
the OS to limit any security issues with using xp_cmdshell.
You can create an extended stored procedure and kick that off.
You can create a job in the SQL Server Agent (programmatically) and have
it execute the SQL.
You can access the FileSystemObject COM object using the sp_OA* methods.
What are you doing in the OSQL script? Can this be something you can do
with T-SQL directly?
David Gugick
Imceda Software
www.imceda.com
Showing posts with label osql. Show all posts
Showing posts with label osql. Show all posts
Monday, March 26, 2012
External proc
Labels:
applicatoin,
code,
database,
decide,
external,
microsoft,
mysql,
oracle,
osql,
proc,
securityreasons,
server,
sql,
withxp_cmdshell,
xp_cmdshell
External proc
Hi ,
I have used some of code in my applicatoin with
xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for security
reasons . is there any other way to do that .(to interact with OS)
Thanks
AjuAju wrote:
> Hi ,
> I have used some of code in my applicatoin with
> xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for
> security reasons . is there any other way to do that .(to interact
> with OS)
> Thanks
> Aju
Once option is to limit the access the SQL Server Service Account has in
the OS to limit any security issues with using xp_cmdshell.
You can create an extended stored procedure and kick that off.
You can create a job in the SQL Server Agent (programmatically) and have
it execute the SQL.
You can access the FileSystemObject COM object using the sp_OA* methods.
What are you doing in the OSQL script? Can this be something you can do
with T-SQL directly?
David Gugick
Imceda Software
www.imceda.com
I have used some of code in my applicatoin with
xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for security
reasons . is there any other way to do that .(to interact with OS)
Thanks
AjuAju wrote:
> Hi ,
> I have used some of code in my applicatoin with
> xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for
> security reasons . is there any other way to do that .(to interact
> with OS)
> Thanks
> Aju
Once option is to limit the access the SQL Server Service Account has in
the OS to limit any security issues with using xp_cmdshell.
You can create an extended stored procedure and kick that off.
You can create a job in the SQL Server Agent (programmatically) and have
it execute the SQL.
You can access the FileSystemObject COM object using the sp_OA* methods.
What are you doing in the OSQL script? Can this be something you can do
with T-SQL directly?
David Gugick
Imceda Software
www.imceda.com
Labels:
applicatoin,
code,
database,
decide,
external,
microsoft,
mysql,
oracle,
osql,
proc,
securityreasons,
server,
sql,
withxp_cmdshell,
xp_cmdshell
External proc
Hi ,
I have used some of code in my applicatoin with
xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for security
reasons . is there any other way to do that .(to interact with OS)
Thanks
AjuAju wrote:
> Hi ,
> I have used some of code in my applicatoin with
> xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for
> security reasons . is there any other way to do that .(to interact
> with OS)
> Thanks
> Aju
Once option is to limit the access the SQL Server Service Account has in
the OS to limit any security issues with using xp_cmdshell.
You can create an extended stored procedure and kick that off.
You can create a job in the SQL Server Agent (programmatically) and have
it execute the SQL.
You can access the FileSystemObject COM object using the sp_OA* methods.
What are you doing in the OSQL script? Can this be something you can do
with T-SQL directly?
David Gugick
Imceda Software
www.imceda.com
I have used some of code in my applicatoin with
xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for security
reasons . is there any other way to do that .(to interact with OS)
Thanks
AjuAju wrote:
> Hi ,
> I have used some of code in my applicatoin with
> xp_cmdshell & osql . IF I have to decide not to use xp_cmdshell for
> security reasons . is there any other way to do that .(to interact
> with OS)
> Thanks
> Aju
Once option is to limit the access the SQL Server Service Account has in
the OS to limit any security issues with using xp_cmdshell.
You can create an extended stored procedure and kick that off.
You can create a job in the SQL Server Agent (programmatically) and have
it execute the SQL.
You can access the FileSystemObject COM object using the sp_OA* methods.
What are you doing in the OSQL script? Can this be something you can do
with T-SQL directly?
David Gugick
Imceda Software
www.imceda.com
Friday, February 24, 2012
Exporting XML file from SQL Server using FOR XML AUTO
Hello All,
I'm trying to export XML using osql or the sp_makewebtask and having
problems having IE 6.0 read the outputted format. The file is outputted
contains control line feeds in the middle of a row causing IE to throw up
errors. Is there a way to avoid these random control linefeeds in the file?
Any help is greatly appreciated.
Thanks in advance,
Frank
Hi Frank,
We have experienced this problem also and found out that there is actually a bug with FOR...XML statements when executed over ODBC. As you've discovered, it only returns 2083 characters per line.
Here is the link to the KB article:
http://support.microsoft.com/default...;en-us;Q275583
If you do a "Search By Author" on my username, you can find a list of some other posts I've made regarding this issue one of which discusses a workaround using OLE DB and DTS.
HTH,
Denise E. White
Technical Director
The Next Version Ltd. UK
www.thenextversion.com
www.denisewhite.co.uk
-- Frank DeLuccia wrote: --
Hello All,
I'm trying to export XML using osql or the sp_makewebtask and having
problems having IE 6.0 read the outputted format. The file is outputted
contains control line feeds in the middle of a row causing IE to throw up
errors. Is there a way to avoid these random control linefeeds in the file?
Any help is greatly appreciated.
Thanks in advance,
Frank
|||Hi...
My solutions... after 3 weeks....
PROCEDURE XXX
AS
SET NOCOUNT ON
CREATE TABLE ##Tmp_OTs
(
WoXML nvarchar(200)
)
INSERT INTO ##Tmp_OTs VALUES (HTMLFILE)
INSERT INTO ##Tmp_OTs VALUES ('<XML id="xmlWO" version="1.0"
encoding="ISO-8859-1">')
INSERT INTO ##Tmp_OTs VALUES ('<OTS>')
INSERT INTO ##Tmp_OTs
SELECT ( CREATE XML FORMAT BY RECORD)
'<OT>' +
'<A>' + FIELD1 + '</A>' +
'</OT>'
FROM TABLE
INSERT INTO ##Tmp_OTs VALUES ('</OTS>')
INSERT INTO ##Tmp_OTs VALUES ('</XML>')
EXEC sp_makewebtask
@.outputfile = 'OUTPUT FILE',
@.query = 'SELECT * FROM ##Tmp_OTs',
@.templatefile = 'TEPLATE FILE'
*************************************************
TEMPLATE FILE
<%begindetail%>
<%insert_data_here%>
<%enddetail%>
I'm sorry my english not good.
Regards
Don Cata
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
a bug with FOR...XML statements when executed over ODBC. As you've
discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
other posts I've made regarding this issue one of which discusses a
workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
having
> problems having IE 6.0 read the outputted format. The file is
outputted
> contains control line feeds in the middle of a row causing IE to
throw up
> errors. Is there a way to avoid these random control linefeeds in
the file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
|||Thanks for the help!!
"DonCata" <cavelardo@.hotmail.com> wrote in message
news:%23EfO7xZSEHA.644@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi...
> My solutions... after 3 weeks....
> PROCEDURE XXX
> AS
> SET NOCOUNT ON
> CREATE TABLE ##Tmp_OTs
> (
> WoXML nvarchar(200)
> )
> INSERT INTO ##Tmp_OTs VALUES (HTMLFILE)
> INSERT INTO ##Tmp_OTs VALUES ('<XML id="xmlWO" version="1.0"
> encoding="ISO-8859-1">')
> INSERT INTO ##Tmp_OTs VALUES ('<OTS>')
> INSERT INTO ##Tmp_OTs
> SELECT ( CREATE XML FORMAT BY RECORD)
> '<OT>' +
> '<A>' + FIELD1 + '</A>' +
> '</OT>'
> FROM TABLE
> INSERT INTO ##Tmp_OTs VALUES ('</OTS>')
> INSERT INTO ##Tmp_OTs VALUES ('</XML>')
> EXEC sp_makewebtask
> @.outputfile = 'OUTPUT FILE',
> @.query = 'SELECT * FROM ##Tmp_OTs',
> @.templatefile = 'TEPLATE FILE'
>
> *************************************************
> TEMPLATE FILE
> <%begindetail%>
> <%insert_data_here%>
> <%enddetail%>
> I'm sorry my english not good.
> Regards
> Don Cata
> "mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
> news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
actually[vbcol=seagreen]
> a bug with FOR...XML statements when executed over ODBC. As you've
> discovered, it only returns 2083 characters per line.
some
> other posts I've made regarding this issue one of which discusses a
> workaround using OLE DB and DTS.
> having
> outputted
> throw up
> the file?
>
|||Thanks for the help!!!
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
a bug with FOR...XML statements when executed over ODBC. As you've
discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
other posts I've made regarding this issue one of which discusses a
workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
having
> problems having IE 6.0 read the outputted format. The file is
outputted
> contains control line feeds in the middle of a row causing IE to
throw up
> errors. Is there a way to avoid these random control linefeeds in
the file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
|||Sorry, this was not a bug, this was a design decision that you needed to
recompose the FOR XML results yourself over ODBC.
Yukon will do it for you.
Best regards
Michael
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
> a bug with FOR...XML statements when executed over ODBC. As you've
> discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
> other posts I've made regarding this issue one of which discusses a
> workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
> having
> problems having IE 6.0 read the outputted format. The file is
> outputted
> contains control line feeds in the middle of a row causing IE to throw
> up
> errors. Is there a way to avoid these random control linefeeds in the
> file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
I'm trying to export XML using osql or the sp_makewebtask and having
problems having IE 6.0 read the outputted format. The file is outputted
contains control line feeds in the middle of a row causing IE to throw up
errors. Is there a way to avoid these random control linefeeds in the file?
Any help is greatly appreciated.
Thanks in advance,
Frank
Hi Frank,
We have experienced this problem also and found out that there is actually a bug with FOR...XML statements when executed over ODBC. As you've discovered, it only returns 2083 characters per line.
Here is the link to the KB article:
http://support.microsoft.com/default...;en-us;Q275583
If you do a "Search By Author" on my username, you can find a list of some other posts I've made regarding this issue one of which discusses a workaround using OLE DB and DTS.
HTH,
Denise E. White
Technical Director
The Next Version Ltd. UK
www.thenextversion.com
www.denisewhite.co.uk
-- Frank DeLuccia wrote: --
Hello All,
I'm trying to export XML using osql or the sp_makewebtask and having
problems having IE 6.0 read the outputted format. The file is outputted
contains control line feeds in the middle of a row causing IE to throw up
errors. Is there a way to avoid these random control linefeeds in the file?
Any help is greatly appreciated.
Thanks in advance,
Frank
|||Hi...
My solutions... after 3 weeks....
PROCEDURE XXX
AS
SET NOCOUNT ON
CREATE TABLE ##Tmp_OTs
(
WoXML nvarchar(200)
)
INSERT INTO ##Tmp_OTs VALUES (HTMLFILE)
INSERT INTO ##Tmp_OTs VALUES ('<XML id="xmlWO" version="1.0"
encoding="ISO-8859-1">')
INSERT INTO ##Tmp_OTs VALUES ('<OTS>')
INSERT INTO ##Tmp_OTs
SELECT ( CREATE XML FORMAT BY RECORD)
'<OT>' +
'<A>' + FIELD1 + '</A>' +
'</OT>'
FROM TABLE
INSERT INTO ##Tmp_OTs VALUES ('</OTS>')
INSERT INTO ##Tmp_OTs VALUES ('</XML>')
EXEC sp_makewebtask
@.outputfile = 'OUTPUT FILE',
@.query = 'SELECT * FROM ##Tmp_OTs',
@.templatefile = 'TEPLATE FILE'
*************************************************
TEMPLATE FILE
<%begindetail%>
<%insert_data_here%>
<%enddetail%>
I'm sorry my english not good.
Regards
Don Cata
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
a bug with FOR...XML statements when executed over ODBC. As you've
discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
other posts I've made regarding this issue one of which discusses a
workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
having
> problems having IE 6.0 read the outputted format. The file is
outputted
> contains control line feeds in the middle of a row causing IE to
throw up
> errors. Is there a way to avoid these random control linefeeds in
the file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
|||Thanks for the help!!
"DonCata" <cavelardo@.hotmail.com> wrote in message
news:%23EfO7xZSEHA.644@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi...
> My solutions... after 3 weeks....
> PROCEDURE XXX
> AS
> SET NOCOUNT ON
> CREATE TABLE ##Tmp_OTs
> (
> WoXML nvarchar(200)
> )
> INSERT INTO ##Tmp_OTs VALUES (HTMLFILE)
> INSERT INTO ##Tmp_OTs VALUES ('<XML id="xmlWO" version="1.0"
> encoding="ISO-8859-1">')
> INSERT INTO ##Tmp_OTs VALUES ('<OTS>')
> INSERT INTO ##Tmp_OTs
> SELECT ( CREATE XML FORMAT BY RECORD)
> '<OT>' +
> '<A>' + FIELD1 + '</A>' +
> '</OT>'
> FROM TABLE
> INSERT INTO ##Tmp_OTs VALUES ('</OTS>')
> INSERT INTO ##Tmp_OTs VALUES ('</XML>')
> EXEC sp_makewebtask
> @.outputfile = 'OUTPUT FILE',
> @.query = 'SELECT * FROM ##Tmp_OTs',
> @.templatefile = 'TEPLATE FILE'
>
> *************************************************
> TEMPLATE FILE
> <%begindetail%>
> <%insert_data_here%>
> <%enddetail%>
> I'm sorry my english not good.
> Regards
> Don Cata
> "mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
> news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
actually[vbcol=seagreen]
> a bug with FOR...XML statements when executed over ODBC. As you've
> discovered, it only returns 2083 characters per line.
some
> other posts I've made regarding this issue one of which discusses a
> workaround using OLE DB and DTS.
> having
> outputted
> throw up
> the file?
>
|||Thanks for the help!!!
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
a bug with FOR...XML statements when executed over ODBC. As you've
discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
other posts I've made regarding this issue one of which discusses a
workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
having
> problems having IE 6.0 read the outputted format. The file is
outputted
> contains control line feeds in the middle of a row causing IE to
throw up
> errors. Is there a way to avoid these random control linefeeds in
the file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
|||Sorry, this was not a bug, this was a design decision that you needed to
recompose the FOR XML results yourself over ODBC.
Yukon will do it for you.
Best regards
Michael
"mizwhite" <anonymous@.discussions.microsoft.com> wrote in message
news:DAEB7668-1A03-4156-A99D-531700166BC1@.microsoft.com...
> Hi Frank,
> We have experienced this problem also and found out that there is actually
> a bug with FOR...XML statements when executed over ODBC. As you've
> discovered, it only returns 2083 characters per line.
> Here is the link to the KB article:
> http://support.microsoft.com/default...;en-us;Q275583
> If you do a "Search By Author" on my username, you can find a list of some
> other posts I've made regarding this issue one of which discusses a
> workaround using OLE DB and DTS.
> HTH,
> Denise E. White
> Technical Director
> The Next Version Ltd. UK
> www.thenextversion.com
> www.denisewhite.co.uk
>
> -- Frank DeLuccia wrote: --
> Hello All,
> I'm trying to export XML using osql or the sp_makewebtask and
> having
> problems having IE 6.0 read the outputted format. The file is
> outputted
> contains control line feeds in the middle of a row causing IE to throw
> up
> errors. Is there a way to avoid these random control linefeeds in the
> file?
> Any help is greatly appreciated.
> Thanks in advance,
> Frank
>
>
Subscribe to:
Posts (Atom)