Saturday, February 25, 2012

creating a database

Hi;
If I have a schema for creating a database, is there a command line
application I can run and pass it the filename of the schema and it will then
create that database? If so, can someone point me to a url showing the
command line syntax for it?
And, what registry entry can I use to determine where this program is - as
some people do not install in C:\Program Files\...
thanks - dave
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
Maybe this helps. http://support.microsoft.com/kb/325003
Use the variable %programfiles%
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| Hi;
|
| If I have a schema for creating a database, is there a command line
| application I can run and pass it the filename of the schema and it will
then
| create that database? If so, can someone point me to a url showing the
| command line syntax for it?
|
| And, what registry entry can I use to determine where this program is - as
| some people do not install in C:\Program Files\...
|
| thanks - dave
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm
|
|
|||osql is the tool I need.
I am retecient to use %programfiles% because we used to put Sql Server on d:
while programfiles was on c: - so on those systems at least, that would not
find it.
Is there anything Sql Server writes to the registry with it's location? I
think there was and I used it in a program where I used to work - but I don't
have access to that code.
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Dave Patrick" wrote:

> Maybe this helps. http://support.microsoft.com/kb/325003
> Use the variable %programfiles%
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "David Thielen" wrote:
> | Hi;
> |
> | If I have a schema for creating a database, is there a command line
> | application I can run and pass it the filename of the schema and it will
> then
> | create that database? If so, can someone point me to a url showing the
> | command line syntax for it?
> |
> | And, what registry entry can I use to determine where this program is - as
> | some people do not install in C:\Program Files\...
> |
> | thanks - dave
> |
> | --
> | thanks - dave
> | david_at_windward_dot_net
> | http://www.windwardreports.com
> |
> | Cubicle Wars - http://www.windwardreports.com/film.htm
> |
> |
>
>
|||You could look at 'Path' and or 'SQLPath' found below but you really
shouldn't need the fully qualified path;
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup
since the installation of client tools appends to the system path variable.
C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program
Files\Microsoft SQL Server\80\Tools\Binn\

Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| osql is the tool I need.
|
| I am retecient to use %programfiles% because we used to put Sql Server on
d:
| while programfiles was on c: - so on those systems at least, that would
not
| find it.
|
| Is there anything Sql Server writes to the registry with it's location? I
| think there was and I used it in a program where I used to work - but I
don't
| have access to that code.
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm
|||thank you - that looks perfect.
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Dave Patrick" wrote:

> You could look at 'Path' and or 'SQLPath' found below but you really
> shouldn't need the fully qualified path;
> HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup
> HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup
> since the installation of client tools appends to the system path variable.
> C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program
> Files\Microsoft SQL Server\80\Tools\Binn\
>
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "David Thielen" wrote:
> | osql is the tool I need.
> |
> | I am retecient to use %programfiles% because we used to put Sql Server on
> d:
> | while programfiles was on c: - so on those systems at least, that would
> not
> | find it.
> |
> | Is there anything Sql Server writes to the registry with it's location? I
> | think there was and I used it in a program where I used to work - but I
> don't
> | have access to that code.
> |
> | --
> | thanks - dave
> | david_at_windward_dot_net
> | http://www.windwardreports.com
> |
> | Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
|||You can use sp_helpfile to return the file locations.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"David Thielen" <thielen@.nospam.nospam> wrote in message
news:FC83AF0A-B244-4B64-A83F-36A21A6ADECA@.microsoft.com...[vbcol=seagreen]
> osql is the tool I need.
> I am retecient to use %programfiles% because we used to put Sql Server on
> d:
> while programfiles was on c: - so on those systems at least, that would
> not
> find it.
> Is there anything Sql Server writes to the registry with it's location? I
> think there was and I used it in a program where I used to work - but I
> don't
> have access to that code.
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
> Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
> "Dave Patrick" wrote:
|||You're welcome.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| thank you - that looks perfect.
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm

No comments:

Post a Comment