Monday, February 20, 2012

problem in xp_cmdshell

Hi All,
I am new in sql server. I am taking backup of databases by
using xp_cmdshell. Can any one tell where this procedure stores the
data. I am not able to find the path for this.If you are new to SQL Server I recommend to use the Database Maintenance
Plans to do your backups instead.
You can also directly use the BACKUP DATABASE command and schedule it in a
job.
xp_cmdshell is used to execute operating system commands so you will need to
check which commands your xp_cmdshell statement is executing.
Hope this helps,
Ben Nevarez
"mohit" wrote:
> Hi All,
> I am new in sql server. I am taking backup of databases by
> using xp_cmdshell. Can any one tell where this procedure stores the
> data. I am not able to find the path for this.
>|||xp_cmdshell doesn't store any data, it only allow you to execute some command in the OS command
interpreter. It is *what you execute* which is important.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mohit" <goenka.mohit@.gmail.com> wrote in message
news:0987f8ee-33db-459a-92d7-073a0d494efb@.t1g2000pra.googlegroups.com...
> Hi All,
> I am new in sql server. I am taking backup of databases by
> using xp_cmdshell. Can any one tell where this procedure stores the
> data. I am not able to find the path for this.|||Hi
You don't say which version of SQL Server you are using! My guess would be
SQL Express which means that you don't have SQL Agent and that is why you are
using xp_cmdshell. If you are using a different version you could use the
backup/restore wizard and save the task as a job that can be scheduled,
otherwise check out the backup command syntax in Books Online, although SQL
Express does not come with books online it can be downloaded see
http://technet.microsoft.com/en-gb/sqlserver/bb428874.aspx for SQL 2000 see
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
John
"mohit" wrote:
> Hi All,
> I am new in sql server. I am taking backup of databases by
> using xp_cmdshell. Can any one tell where this procedure stores the
> data. I am not able to find the path for this.
>

No comments:

Post a Comment