User Tools

Site Tools


software:microsoft:sqlserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:microsoft:sqlserver [2018/06/20 05:16] – [Backup Overview (SQL Server)] superwizardsoftware:microsoft:sqlserver [2018/09/13 20:28] (current) superwizard
Line 1: Line 1:
 +====== I can't connect to my servers SQL database via an IP Address ======
 +
 +From: https://dba.stackexchange.com/questions/62165/i-cant-connect-to-my-servers-sql-database-via-an-ip-address
 +
 +<code>
 +open SQL Server Configuration Manager;
 +switch to the SQL Server Network Configuration | Protocols for SQLEXPRESS;
 +double-click the TCP/IP protocol;
 +select the Yes value in the Enabled field;
 +switch to the IP Addresses tab; 
 +</code>
 +
 +====== Backup with powershell ======
 +<code>
 +ps1 script
 +Backup-SqlDatabase -ServerInstance Machine096\SSERVICES -Database IServices -BackupAction Database -BackupFile "F:\MSSQL14.SSERVICES\MSSQL\Backup\Backup_Machine\InspectionServices.bak"
 +Exit
 +
 +
 +Cmd file
 +powershell.exe -executionpolicy bypass 
 +               -file "C:\Users\Public\Downloads\SQLInspectionServicesBackup Script\BackupInspectionServices.ps1"
 +</code>
 +
 +
 +
 +From: https://dba.stackexchange.com/questions/154642/sql-server-backup-powershell-vs-python
 +
 +<code>
 +I am not familiar with Python, but for your current requirement (i.e. backup). I'd strongly 
 +recommend you to use PowerShell for two reasons:
 +
 +MS in its SQLPS module (since SQL Server 2012), has a native cmdlet called
 +
 +Backup-SQLDatabase
 +
 +You may run this cmdlet on one central server to do the backup against multiple sql instances 
 +at once because this Backup-SQLDatabase can accept multiple sql instances, like the following example
 +
 +Backup-SQLDatabase -Database master -Server "my_server1", "my_server2" ...
 +This 2nd point may help you to centralize all those backup scripts to one administration 
 +server (dedicated for DBA use) instead of sparsely stored on each sql server instance.
 +
 +Also with MS providing Backup-SQLDatabase, you can be assured that it will be supported for 
 +all future new features. (For example, using this cmdlet to support Azure SQL Database etc.)
 +</code>
 +
 ====== restoring SQL backup files to new filepaths ====== ====== restoring SQL backup files to new filepaths ======
  
Line 42: Line 89:
  
 <code> <code>
-powershell -File "c:\abc def\something.ps1"+powershell.exe -executionpolicy bypass -file "Set-PowerShellScript.ps1"
  
 On the system that the task will be run from, open the Windows Task Scheduler. This can be found  On the system that the task will be run from, open the Windows Task Scheduler. This can be found 
software/microsoft/sqlserver.1529471763.txt.gz · Last modified: 2018/06/20 05:16 by superwizard