Click here to Skip to main content
16,004,924 members
Home / Discussions / Database
   

Database

 
GeneralRe: New Copy of MSFT 2005 Server will not connect on Local Machine Pin
PDTUM7-Oct-09 16:22
PDTUM7-Oct-09 16:22 
AnswerRe: New Copy of MSFT 2005 Server will not connect on Local Machine Pin
εїзεїзεїз7-Oct-09 21:46
εїзεїзεїз7-Oct-09 21:46 
GeneralRe: New Copy of MSFT 2005 Server will not connect on Local Machine Pin
PDTUM8-Oct-09 5:38
PDTUM8-Oct-09 5:38 
GeneralRe: New Copy of MSFT 2005 Server will not connect on Local Machine Pin
εїзεїзεїз8-Oct-09 5:52
εїзεїзεїз8-Oct-09 5:52 
QuestionSimple Recovery Mode in SQL 2005 Pin
Abdul Rahman Hamidy3-Oct-09 21:41
Abdul Rahman Hamidy3-Oct-09 21:41 
Questionfinding database physical path Pin
reza assar3-Oct-09 1:19
reza assar3-Oct-09 1:19 
AnswerRe: finding database physical path Pin
dan!sh 3-Oct-09 1:53
professional dan!sh 3-Oct-09 1:53 
AnswerRe: finding database physical path Pin
Md. Marufuzzaman3-Oct-09 3:32
professionalMd. Marufuzzaman3-Oct-09 3:32 
Try the following....
USE master
GO

DECLARE @DB_Path nvarchar(256)
SET @DB_Path= (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)
FROM master.sys.master_files
WHERE database_id = 1 AND file_id = 1)

SELECT @DB_PathA S PhysicalPath

It uses the built-in “master” database, finds the physical path to it from the “master.sys.master_files” view, then takes a substring to get just the path portion.

Thanks
Md. Marufuzzaman


Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.

I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

QuestionRunning a query Pin
srikantha_nagaraj2-Oct-09 22:15
srikantha_nagaraj2-Oct-09 22:15 
AnswerRe: Running a query Pin
nagendrathecoder2-Oct-09 22:39
nagendrathecoder2-Oct-09 22:39 
Questiondeploy using backend Pin
sai2592-Oct-09 8:50
sai2592-Oct-09 8:50 
AnswerRe: deploy using backend Pin
Andy_L_J2-Oct-09 20:58
Andy_L_J2-Oct-09 20:58 
AnswerRe: deploy using backend Pin
Vijayaraya S2-Oct-09 23:22
Vijayaraya S2-Oct-09 23:22 
QuestionConverting MS SQL 2008 database to MS SQL 2005 database Pin
AprNgp2-Oct-09 8:47
AprNgp2-Oct-09 8:47 
AnswerRe: Converting MS SQL 2008 database to MS SQL 2005 database Pin
Luc Pattyn2-Oct-09 8:57
sitebuilderLuc Pattyn2-Oct-09 8:57 
AnswerRe: Converting MS SQL 2008 database to MS SQL 2005 database Pin
εїзεїзεїз3-Oct-09 10:59
εїзεїзεїз3-Oct-09 10:59 
QuestionSyntax error raised while insert a record into msaccess from VB.NET Pin
sivakumar.mariappan1-Oct-09 6:53
sivakumar.mariappan1-Oct-09 6:53 
AnswerRe: Syntax error raised while insert a record into msaccess from VB.NET Pin
Md. Marufuzzaman1-Oct-09 7:20
professionalMd. Marufuzzaman1-Oct-09 7:20 
AnswerRe: Syntax error raised while insert a record into msaccess from VB.NET Pin
Vimalsoft(Pty) Ltd1-Oct-09 21:16
professionalVimalsoft(Pty) Ltd1-Oct-09 21:16 
AnswerRe: Syntax error raised while insert a record into msaccess from VB.NET Pin
David Skelly1-Oct-09 22:42
David Skelly1-Oct-09 22:42 
QuestionSQL SERVER TRIGGERS Pin
sris 42630-Sep-09 20:13
sris 42630-Sep-09 20:13 
AnswerRe: SQL SERVER TRIGGERS Pin
εїзεїзεїз30-Sep-09 21:16
εїзεїзεїз30-Sep-09 21:16 
GeneralRe: SQL SERVER TRIGGERS Pin
sris 42630-Sep-09 22:39
sris 42630-Sep-09 22:39 
GeneralRe: SQL SERVER TRIGGERS Pin
Mycroft Holmes30-Sep-09 23:22
professionalMycroft Holmes30-Sep-09 23:22 
GeneralRe: SQL SERVER TRIGGERS Pin
sris 42630-Sep-09 23:35
sris 42630-Sep-09 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.