pavithra123
IS-IT--Management
Hi
to the GURUS of SQL server:
I want to achieve the following objective:
the SQL server ver is 7.0
Query the result of a SQL statement into a file and the filename should be unique ( i tried to use xp_cmdshell as suggested by terry.L.Broadbent)
Automate this option so that it happens at pre-defined time.
to accomplish this I am doing the following.
declare @t varchar(255)
declare @d varchar(30)
d=datetime()
select @t ='isql -Q "select count(*) from <tablename>" -E -o <path>'
exec <dbname>..xp_cmdshell @t
I get the following errors:
server msg2812 , level 16, state 62
could not find stored procedure 'xp_cmdshell'
I checked the stored procedures for the DB there was no extended stored procedure with the name 'xp_cmdshell'.
It does not allow me to create any extended stored procedure as it is greyed out in the DB i have created.
what needs to be done, any help would be greatly appreciated.
Best Regards
Prem.
to the GURUS of SQL server:
I want to achieve the following objective:
the SQL server ver is 7.0
Query the result of a SQL statement into a file and the filename should be unique ( i tried to use xp_cmdshell as suggested by terry.L.Broadbent)
Automate this option so that it happens at pre-defined time.
to accomplish this I am doing the following.
declare @t varchar(255)
declare @d varchar(30)
d=datetime()
select @t ='isql -Q "select count(*) from <tablename>" -E -o <path>'
exec <dbname>..xp_cmdshell @t
I get the following errors:
server msg2812 , level 16, state 62
could not find stored procedure 'xp_cmdshell'
I checked the stored procedures for the DB there was no extended stored procedure with the name 'xp_cmdshell'.
It does not allow me to create any extended stored procedure as it is greyed out in the DB i have created.
what needs to be done, any help would be greatly appreciated.
Best Regards
Prem.