0

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..

3
  • What version of SQL Server are you using? Are the SQL Server tools installed on the server? Jun 20, 2013 at 12:30
  • 2005..Not in this server.Actually I am trying to connnect remotely to the SQL server
    – Vysakh
    Jun 20, 2013 at 12:33
  • You have a workstation with only ODBC/OLEDB client connectivity? Does your workstation have the admin tools loaded on it? Jun 20, 2013 at 17:16

1 Answer 1

0

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.

2
  • How can I map the drive remotely??Could you please elaborate so that I can think of that feasibility..??
    – Vysakh
    Jun 21, 2013 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. Jun 21, 2013 at 13:51

You must log in to answer this question.

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