Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c:Program FilesMicrosoft SQL ServerMSSQL.7MSSQL
- m:CustomInstanceMSSQL
- select filename from sysaltfiles
- where name = db_name()
- Server: Msg 208, Level 16, State 1, Line 1
- Invalid object name 'sysaltfiles'.
- select filename from master.dbo.sysaltfiles
- where name = db_name()
- filename
- ----------------
- (0 row(s) affected)
- declare @rc int, @dir nvarchar(4000)
- exec @rc = master.dbo.xp_instance_regread
- N'HKEY_LOCAL_MACHINE',
- N'SoftwareMicrosoftMSSQLServerSetup',
- N'SQLPath',
- @dir output, 'no_output'
- select @dir AS InstallationDirectory
- declare @rc int, @dir nvarchar(4000)
- exec @rc = master.dbo.xp_instance_regread
- N'HKEY_LOCAL_MACHINE',
- N'SoftwareMicrosoftMSSQLServerMSSQLServer',
- N'BackupDirectory',
- @dir output, 'no_output'
- select @dir AS BackupDirectory
- Declare @Path as varchar(100);
- Set @Path = NULL
- Exec master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWAREMicrosoftMicrosoft SQL Server70ToolsClientSetup', 'SQLPath', @Path OUTPUT
- Select @Path as [Sql Server 7.0 path]
- Set @Path = NULL
- Exec master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWAREMicrosoftMicrosoft SQL Server80ToolsClientSetup', 'SQLPath', @Path OUTPUT
- Select @Path as [Sql Server 2000 path]
- Set @Path = NULL
- Exec master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWAREMicrosoftMicrosoft SQL Server90ToolsClientSetup', 'SQLPath', @Path OUTPUT
- Select @Path as [Sql Server 2005 path]
- Set @Path = NULL
- Exec master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWAREMicrosoftMicrosoft SQL Server100ToolsClientSetup', 'SQLPath', @Path OUTPUT
- Select @Path as [Sql Server KATMAI path]
- select filename from sysaltfiles
- where name = db_name()
Add Comment
Please, Sign In to add comment