|
Guys, I am actually scripting the database from the scratch and I tried it on my local machine. and it was fine.
But I have to create a script on the development server and the server is a vitual server and the only information I have is the I.P of the machine. I have admin privileges to the machine. The server on which the sql server is installed does not have any physical name as such that I am aware of. I am actually not sure as to how to show the path of the server.. any ideas as to how to handle this issue. thanks!
(comments are locked)
|
|
Do you mean you want to run this script from one server and create a database on another server (the one without a physical name)? Why wouldn't you just connect a query window onto the target server, and run this script? Also once you have connected via IP address, and opened a query window, you could run
or
or
to get the server name Kev: I was trying to answer but the connection keep timing out. whats happening? did u change the website to singe user mode: :-)
Apr 21 '10 at 01:02 PM
DaniSQL
I have no such powers!
Apr 21 '10 at 01:03 PM
Kev Riley ♦♦
I know u dont:-) Any way I still cant post answers and I dont know why but here was what I was trying to post:
Apr 21 '10 at 01:09 PM
DaniSQL
SELECT HOST_NAME() AS HostName, SUSER_NAME() LoggedInUser
Apr 21 '10 at 01:10 PM
DaniSQL
Kev.. i tried doing that .. as per your suggestion as to run it on the target server. and got this error message. Msg 5133, Level 16, State 1, Line 3 Directory lookup for the file "c:Program FilesMicrosoft SQL ServerMSSQL10.EXPRESSMSSQLDATAISO_DB.mdf" failed with the operating system error 3(The system cannot find the path specified.). Msg 1802, Level 16, State 1, Line 3 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Apr 21 '10 at 01:12 PM
Katie 1
(comments are locked)
|
|
Once you connect to the server, and you have to be able to connect to the server, you can look at the server properties and see where it's been set up to store it's files. It's highly likely that the paths you have are not the same as what it has, so you'll need to edit those, but even though it's a virtual machine, it's still running the Windows Operating system and it's still running SQL SErver. So you'll see drive letters and paths that look like what you expect.
(comments are locked)
|
|
For what it's worth, my schema comparison tool generates filegroup DDL like this:
So it just places files with relevant names in the same place as the PRIMARY filegroup is placed by default on the server. Not sure if that's what you're after? Might help...
(comments are locked)
|

