One of the EventClass options you can monitor with SQL Profiler is 'Execution Plan'. What you can look for in each of the plans shown are things like INDEX SEEK, INDEX SCAN, CLUSTERED INDEX SEEK, what you will see further along that line is the INDEX being used. Therefore you can get an idea of...
It is in the sysfiles of each database. See this description of sysfiles from BOL.
growth int Growth size of the database. A value of 0 indicates no growth. Can be either the number of pages or the percentage of file size, depending on value of status. If status contains 0x100000, then growth...
Try this bit of code. Collects info about each user table in the database and sorts the output into largest table first.
declare @id int
declare @type character(2)
declare @pages int
declare @dbname sysname
declare @dbsize dec(15,0)
declare...
Is this SQL7 or 2K?
There are several internal tables used by log shipping, if you have moved the tran log dump sites then you will probably have to change the values in the tables.
Don't forget these values are for directory shares so you may have to remove the old share and create a new share...
The info you are looking for should be in the registry. the following SQL code reads the registry and returns the value for the SQL Code path and SQL data path. This is on SQL7, the same principal works on SQL2K but you may have to change the keys.
Declare @Instpath varchar(50), @Datapath...
I've not actually done this myself but !
The DTSRUN command allows you to specify a value for a global variable using the /A parameter. You should be able to see this value in the DTS package at run time.
Check BOL for more info.
Looks like you are trying to restore a transaction log dump taken before the db dump you are trying to apply it to.
You have to make sure you apply the tran log dumps in the correct order starting with the first one after the db dump you are restoring.
The RESTORE command has a parameter called...
When you restore the DATABASE make sure you use the NORECOVERY option as part of the RESTORE statement. This should then allow you to RESTORE the transaction log dump.
The default for RESTORE is RECOVERY which means no more transaction log dumps can be applied (which I guess you did with the db...
That is restoring from a transaction log file, you can't do a database restore up to a certain time !.
In your first post you said the backups were screwed, does this mean you cannot go back to a DB dump to then apply the tran log dumps?
The RESTORE command has a STOP_AT parameter
STOPAT = date_time | @date_time_var
Specifies that the database be restored to the state it was in as of the specified date and time. If a variable is used for STOPAT, the variable must be varchar, char, smalldatetime, or datetime data type. Only...
Yes this can be done. A database dump can be restored to a database with a different name. You need to be careful of the filenames of the restored database files so that you don't overwrite the original database files. You do this by using the WITH MOVE option.
EG
If you have backed up you...
sp_resetstatus does not recover your database, it just updates a system table in the master database removing the suspect flag. If your database is in a suspect state you should recover it from your latest db & tran log backups.
The use of square brackets allows you to use reserved words or identifiers with invalid characters in as names for columns, databases, views etc.
Eg hyphen (-) is invalid in a name
create table fred-1 (int fred) fails but
create table [fred-1] (int fred) works.
Eg2 CASE is a reserved word...
You can also use xp_regread as below
Declare @Instpath varchar(50), @Datapath varchar(50)
exec master.dbo.xp_regread @rootkey='HKEY_LOCAL_MACHINE', @key='SOFTWARE\Microsoft\MSSQLServer\Setup',
@value_name='SQLPath',@value=@Instpath output
print @Instpath
exec master.dbo.xp_regread...
The path and Data path are stored in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\MSSQLServer\Setup\SQLPath & SQLDataRoot.
You can get hold of these inside SQL by using The SQL_DMO registry object properties SQLRootPath and SQLDataRoot.
When you install SQL you define which character set to use, which sort order to use and whether case sensitivity is important.
When you backup a database it has to be restored to a server running the same settings. In your case I would say your XP machine happens to have the same settings as...
You can change the audit level of SQL server to log details of login times etc. In SQL Enterprise Manager, right click your server and select PROPERTIES. On the security tab you will see Audit Level, if you select All you will get tthe following info (taken from books online)
All
Audit on both...
I think using the FILE=1 parameter the way you want is only available if you are doing a partial restore (ie specify the PARTIAL keyword). If you don't specify PARTIAL then FILE=1 means restore the first backup set on the backup device you are using.
The best solution here is to specify MOVE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.