I need to change the file name of a database. The name I need to change is shown when you right click on a database and select properties then select the Data File tab. I need to change the filename associated with the database. Is this possible and how JeffJeff, The filename you mentioned is the "logical filename".Why I clarified is because, normally the xxxx.mdf is referred as filename of data file.As Kalen mentioned, you can change the logical filename only in SQL2000 and the command is: ALTER DATABASE <databasename> MODIFY FILE (NAME= '<oldlogicalfilename>', NEWNAME = '<newlogicalfilename>')
, How can I see the network drives (for backup or else) in SQL Server? I mean by else, executing xp_cmdshell using the network. joujHi, No, You can not see the network drives other than using XP_CMDSHELL. The solution is to provide the drive letter or UNC path while performing Backup or Restore. Eg:- Backup Database <dbname> to disk='\\remote_server\share\folder\dbname
Hi How do I change the log shipping monitor to another server without setting up log shipping again? HThese steps are probably worth a shot. I'd however carefully test it in a test environment first: The information about the monitoring of the log shipping is stored to the following locations the primary db name @maintenance_plan_id = 'C354D59F-FACF-43FA-8D52-CEE8DC62FCC2', -- ID of the maintenance plan that backs up the transaction log @backup_threshold = 45, -- the length of time, in minutes, after the last backup before a threshold_alert error is raised @threshold_alert = 14420, -- the error raised when the backup threshold
a huge physical log file (14Gb). I tried: 1-Backup Log 2-DBCC SHRINKDATABASE (,10) 3-Backup Log .(again) The file has not decreased.(from the 14Gb I have 13.3Gb Available Space) MyDb file size = 305 Mb. How do I reduce the physical size of the file the big controls whereas the fifth is simply a fine tuning control. Switch to the database we are attempting to shrink the logs for. Uncomment this to automatically switch to a database, otherwise it uses the current db. */ --USE [MyDatabase]; -- Define the DBCC SHRINKFILE (@LogicalFileName, @NewSize) SET @TruncLog = 'BACKUP LOG [' + db_name() + '] WITH sysfiles WHERE name = @LogicalFileName)) AND ) BEGIN --Outer loop. --pad out the logfile a page at a time
executed by a domain/user account. Our help desk said to change the owner of the job to 'sa' for the time being. I've changed the job owner to 'sa' but it still executes the job as the domain/user account. How do I change who executes the job ? What gives? Thanks in advance!!The job owner is the context that the job is run as. I suggest creating a domain
I have a file name in a variable with full path set @f = 'C:\DIRECTORY1\DIRECTORY2\DIRECTORY3\FILENAME.MDF'. How do I extract the file name, discarding the path. In the above example I want to get FILENAME.MDF TIATry, declare @f varchar(255) set @f = 'C:\DIRECTORY1\DIRECTORY2\DIRECTORY3\FILENAME , charindex('\', reverse(@f)) - 1) AMBI don't think the above one gives me the result I want, but anyhow you gave me the idea. This one works set @datafile = substring(@filename, (len(@filename) - charindex('
Hello, I have forgotten the user id and password that I provided while installing the Sql express on my PC. I have two questions now. 1).How do I connect to SQL Express using windows authentication? 2).How do I change the User ID and pass word in my SQL Express / SQL server 2005? -LDo you remember a password for 'SA' ? If you don't , take a look at sp_password in the BOL
a MS SQL 7.0 server. The LDB portion is about 6GB! the MDB is only 350MB. Any suggestions on how to shrink this? The database is for a MS MOM server. thanks! BJBJ It is possible that you database was set to FULL recovery mode. Take a disabled then you may need to do a transaction log backup using BACKUPLOG command. This will make sure that the LDF will not grow high as well as log backups can be used for recovery. To shrink the log file please go thru the URL Uri posted Hari
OK newbie here I installed SQLServer2000 but want to change the name I gave it .where do I find a "how to" or how do I do it?Hi Ray, Do you mean you want to rename the computer? Or did you install a named instance that you want to rename? You won't be able to rename a named instance, but you can rename the computer. Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;Q257716.darn .hoped to change the instance thanks for the reference, Dan, Ray *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET get rewarded for it!