Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I dont have a sql server installed in my server. I am designing a powershell script that can execute sql scripts remotely in a db. I have powershellv1.0 in my server and dont have Microsoft.SqlServer.SMO.dll.When I searched for the same in the whole server I couldnt find any and the code is not accepting the dll evenif I copy that dll to some other loaction and referred that path.

Can anyone please tell me how to solve this??Anything possible like referring that dll from any remote machine??

Or some other solution?? Any help would be really appreciated..

share|improve this question
What version of SQL Server are you using? Are the SQL Server tools installed on the server? – darin strait Jun 20 '13 at 12:30
2005..Not in this server.Actually I am trying to connnect remotely to the SQL server – Vysakh Jun 20 '13 at 12:33
You have a workstation with only ODBC/OLEDB client connectivity? Does your workstation have the admin tools loaded on it? – darin strait Jun 20 '13 at 17:16
up vote 0 down vote accepted

Is there any reason why you don't want to upgrade to PowerShell v2.0 or above? I don't have PowerShell v1.0 to test, but the other way I could think of is to map the SQL PS Drive to your server remotely, and try to do the modifications. This is a little tricky than working with SMO objects.

share|improve this answer
How can I map the drive remotely??Could you please elaborate so that I can think of that feasibility..?? – Vysakh Jun 21 '13 at 4:36
You can use the command below to map the SQL drive: New-PSDrive -Name {NAME} -PSProvider SqlServer -root SQLSERVER:\SQL\{ServerName} You can navigate using the basic commands: Get-ChildItem | select PSChildName / get-item {Instance\DB} | Get-Member -Type {Method/Property} to see all the methods and properties you can execute on the items. You should have the basic SMO commands available. You can't create databases through this though. – user2480011 Jun 21 '13 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .