0
votes
1answer
364 views

Backing up database fully from remote server, and restoring to another remote server

I currently have three copies of my website (Live, Staging, and Development), with the database for each on three separate servers. More often not, a bug will appear that requires an up-to-date ...
0
votes
1answer
609 views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
3
votes
1answer
613 views

SQL Server PowerShell cannot find path error

I cannot use Set-Location to change to a database. I have loaded the SQL Server snapins. I can use Set-Location to get to SQL\Localhost\SQLEXPRESS\, and I can show the paths under the server node with ...
1
vote
2answers
951 views

SQL Server Agent Access Denied on remote Powershell registry command

I am having trouble executing a Powershell script during a SQL Server Agent Job step. My powershell command(s) basically connect to a remote machine (within the same domain) to write a single value to ...
4
votes
2answers
2k views

Why does the .NET Folder.CopyHere Method not allow dialog suppression for .ZIP files when run within a SQL Server Agent PowerShell job step?

I am using PowerShell in a SQL Server Agent job step to automate the extraction of .ZIP file contents to a directory. Based upon highest-voted answer on this question: How to zip/unzip files in ...
0
votes
1answer
2k views

Connect to local SQL Server database via PowerShell failed with error: Named Pipes Provider, error:40

Please tell me why I failed with this connection...how should I do then? local machine name = MYPC local instance name = MSSQLSERVER my own database named mydatabase I use Windows authentication to ...
0
votes
2answers
237 views

how to Automate the SQL Server 2008 Database and OLAP backup?

I have SQL Server 2008 Enterprise SP2 x64 database in my Windows Server 2008 Enterprise, my question is how to perform automated backup for both database content ? eg. the MDF and the LDF as well as ...
1
vote
1answer
1k views

Getting SQL server 2008 to use Powershell 2

I have a server running Windows Server 2008 (not R2) and SQL Server 2008. I installed Powershell 2 and it works fine when running Powershell scripts. However when trying to run a Powershell script in ...
1
vote
2answers
447 views

Powershell command to confirm SQL Server Smo.Server object is valid

I had the following code in a PowerShell script: $sql_instance = "SQLEXPRESS" [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') $server = New-Object ...
1
vote
3answers
539 views

Trigger Powershell Command to Copy SQL Backups to Network Drive

I've got two servers on a workgroup and I need to transfer my SQL Server 2008 Backups from the local drive of one to a network drive on another. Ideally, I'd like to have SQL call the Powershell ...
2
votes
3answers
456 views

SQL Server without Powershell

I'm trying to install SQL Server 2008 Express Edition, and it's demanding Windows Powershell and refusing to proceed with the installation. Is there any way to get it to install without Powershell? ...
0
votes
2answers
2k views

Run Powershell script within Maintenance plan

I have a SQL 2008 database, run on 64 bit Win2008 Server. I created a pretty simple powershell script that automates a bunch of tasks. I would like this script to run as part of our maintenance ...
0
votes
3answers
788 views

Cannot start SQL Server PowerShell

Have you guys had this problem where, when you start PowerShell from SQL Server, it throws an exception like the following? Cannot resolve alias 'cd' because it refers to term ...
3
votes
2answers
2k views

How to login with SQL Authentication using PowerShell

I'm trying to connect via SQL Server Powershell Cmdlet (read not ADO.NET) using SQL-based Authentication, not Windows Integrated security. Anyone know the format to use for this? Server: foo ...