Re: Cannot get OSQL line to work for SharePoint
- From: "Steve Foster [SBS MVP]" <steve.foster@xxxxxxxxxxxxx>
- Date: Fri, 21 Apr 2006 06:14:31 -0700
Tony Girgenti wrote:
Hello Steve.
I'm sure other people have moved their SharePoint files from one drive to
another in SBS2003 Premium.
I expect you're right.
How did they accomplish it ? Did they use these instructions or some other
procedure ?
That's all i want to do. If other people have done it, how did they do it ?
I assume these are rhetorical questions, since there's no way to sensibly answer them.
I'm not entirely sure how this post relates to your original question, and my response thereto. You might want to go back and take another look at the thread.
And do you need the OSQL command to execute automatically and quit? Because you can use it as an interactive query tool too, which might be easier for you to work with.
eg (in a CMD window):
C:\> OSQL -S (local)\Sharepoint -E
should start a query session and connect to the sharepoint instance on the local machine (ie you'd have to run OSQL on the server itself). The prompt should change to "1>".
You could then enter the sp_attach_db command directly (no need for the quotation marks necessary to submit the query via the -q or -Q switch):
1> sp_attach_db 'STS_Config','<path to MDF>','<path to LDF>'
then you enter a "go" statement to submit the query to SQL Server (you need this because OSQL "batches" SQL statements):
2> go
OSQL would then output the results of executing the batch.
You can keep on writing SQL statements and submitting them to SQL ad infinitum, or until you've had enough, and to quit OSQL, use either of these:
1> exit
or
1> quit
both of which will end OSQL and return you to the CMD prompt.
--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.
.
- References:
- Re: Cannot get OSQL line to work for SharePoint
- From: Steve Foster [SBS MVP]
- Re: Cannot get OSQL line to work for SharePoint
- Prev by Date: Re: What Benefits does Exchange have over POP?
- Next by Date: Re: RWW DC Logic
- Previous by thread: Re: Cannot get OSQL line to work for SharePoint
- Next by thread: One user can't use Outlook Client but OWA works fine
- Index(es):
Relevant Pages
|