Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.