RE: Locate T-SQL Referenced by Job Step?



Hi Gerry,
For those T-SQL statements like "BACKUP LOG", "BACKUP DATABASE", and DBCC
commands like "DBCC SHRINKFILE", they are not database objects residing in
any database. You can just regard them as server side T-SQL statements for
maintenance, monitor or administrative purposes. Since they are server side
T-SQL commands not database objects (users, stored procedures, tables,
views, and user defined functions etc), you can run them under any database
execution context if you have permissions.

Regarding the command in your job step, 'backup log myDB to myDBBackup', it
was a T-SQL command and used to back up your database myDB's transaction
log to your backup device named myDBBackup. You can find the detail
information of the backup device by running the following T-SQL commands on
your SQL Server:
/* If SQL Server 2000 */
select * from master.dbo.sysdevices
/* Else if SQL Server 2005 or 2008 */
select * from sys.backup_devices

The backup device is registered to your SQL Server by using
sp_addumpdevice. You can refer to:
sp_addumpdevice (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms188409(SQL.90).aspx

Hope this helps. Please do not hesitate to let us know if you have any
other questions or concerns.


Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================




.



Relevant Pages

  • RE: copy permissions from one user to another?
    ... THIS STORED PROCEDURE GENERATES COMMANDS ... -- ADD USER TO SERVER ... -- CREATE TABLE TO HOLD LIST OF USERS IN CURRENT DATABASE ... -- SET COMMAND TO FIND USER PERMISSIONS HAS IN CURRENT DATABASE ...
    (microsoft.public.sqlserver.security)
  • Re: copy permissions from one user to another?
    ... THIS STORED PROCEDURE GENERATES COMMANDS ... -- ADD USER TO SERVER ... -- CREATE TABLE TO HOLD LIST OF USERS IN CURRENT DATABASE ... -- GRANT USER ACCESS TO SERVER ROLES ...
    (microsoft.public.sqlserver.security)
  • Dynamically select database problem
    ... The following set of commands do not seem to work. ... dynamically set the current database in T-SQL? ...
    (microsoft.public.sqlserver.programming)
  • Re: Find current database name from db handle
    ... Can I retrieve the current database name ... it's impossible to monitor the commands. ... maybe the server would notify the client on such changes, ... need one connection per database per apache process, ...
    (perl.dbi.users)
  • Re: setting up a server with no screen or keyboard: use X or just ssh?
    ... home for operations as a database and www server. ... OK - LAN verses Internet is a function of the firewall on your router ... will allow you to do everything needed without knowing the commands? ...
    (comp.os.linux.setup)

Loading