Create database

Last Post 17 Jan 2006 09:25 AM by sahrisoror. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
sahrisoror
New Member
New Member

--
13 Jan 2006 09:47 AM
how can i specify the sql server on wich i want to create my db?
i am on the server1 sql server, and i want to create a db on the linked srever server2.
sahrisoror
New Member
New Member

--
16 Jan 2006 04:21 AM
is there a command to connect to a linked server. I mean i use a SP on server1 and i wand in this SP create a DB on server2. Can i connect directly on server2 in this SP and create my DB there?
sahrisoror
New Member
New Member

--
17 Jan 2006 12:14 AM
tell me please rm, if i use the sp as u told me, i should have a db which contain this sp, but in my work there is no db on the linked server. So, i have used this command which calls an sql script on the linked server.
EXEC master..xp_cmdshell 'osql /U sa /P /d db_1 < \\Dell11\My Documents\query.sql'

-----------
but the pb is this error:
--------
The network path was not found.
NULL
--------
the same command function when it calls an sql script on the local server.
sahrisoror
New Member
New Member

--
17 Jan 2006 09:25 AM
rm please, heere are the details :
my local server is dell1 and the linked server is dell11. how can i write this command, i always have an error!!
sahrisoror
New Member
New Member

--
17 Jan 2006 10:00 AM
i have this error, and the command seem correct!!
-----------
usage: osql [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w columnwidth]
[-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]
[-L list servers] [-c cmdend] [-D ODBC DSN name]
[-q "cmdline query"] [-Q "cmdline query" and exit]
[-n remove numbering] [-m errorlevel]
[-r msgs to stderr] [-V severitylevel]
[-i inputfile] [-o outputfile]
[-p print statistics] [-b On error batch abort]
[-X[1] disable commands [and exit with warning]]
[-O use Old ISQL behavior disables the following]
<EOF> batch processing
Auto console width scaling
Wide messages
default errorlevel is -1 vs 1
[-? show syntax summary]
NULL
------------
You are not authorized to post a reply.

Acceptable Use Policy