cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gknierim
Level 6

Remote Folder Access

Hi,

I was wondering if there was a way to browse the folders on a remote server? I am installing a SQL Server database from a script on the remote server but I am just manually specifying the path on the remote server instead of browsing to it. How or is it possible to do this from the installation? The project is an InstallScript MSI project.

Thanks,
Greg
Labels (1)
0 Kudos
(2) Replies
ch_eng
Level 7

I don't know about browsing remote server folders, but if you run these SQL scripts they will give you the default Data and Log folders for the SQL database engine you are connected to:

.mdf files:
SELECT REPLACE(filename, 'master.mdf', '') AS Value FROM master.dbo.sysdatabases WHERE name='master'


.ldf files:
SELECT RTRIM((SELECT REPLACE(filename, 'mastlog.ldf','') FROM master.dbo.sysfiles WHERE (status & 0x40) <>0)) AS Value


Should work for SQL 2000, 2005, & 2008

HTH
0 Kudos
gknierim
Level 6

Yea, the problem that I am trying to work around is letting the user installing the databases to be able to pick folders other than the default data directories. I've read in some posts that you can't browse remote folders due to the restriction of the windows installer so maybe I will just have to have the user run an installation on the database server so that they can pick their own data directories and not the default. Then I can have the installer create the folders if they don't exist because it is running locally.

Unless anyone else has another idea?

Thanks,
Greg
0 Kudos