Browsing articles in "Scripting"
Feb
11
2016

List of Free Database and PowerShell Tools

This Article covers the list of Free database and PowerShell tools I come across time to time, this list will keep growing as I discover them, leave comments if you like any one tool better than other.   SQL Server   Database Health – dashboard overview for quick database health checks (http://databasehealth.com) Idera Free tools for SQL server: https://www.idera.com/productssolutions/freetools, below are some of best which I like, they are not totally free but works for […]

Oct
14
2015

SQL Server to Oracle Linked server error 7303: ORA-12504 listener was not given the service_name in connect_data

While configuring Linked server to oracle database from SQL server, faced following error,   Error: “ORA-12504: TNS: listener was not given the SERVICE_NAME in CONNECT_DATA” (Microsoft SQL Server Error: 7303)     I did following validation checks to ensure things are in place: Tnsnames.ora – validated that SID is present in tnsnames.ora file which is generally located in C:\Oracle\product\11.2.0\client_1\network\admin\ folder Validate syntax of connection string, it should be in below format, ORA123 = (DESCRIPTION = […]

Sep
4
2014

How: Take SQL Server Full Memory Dump from within SQL Server and via Automated way

Sometimes there is need to take full dump for various kind of SQL Server issues and most of the time a DBA don’t know when issue going to occur hence becomes difficult to capture the dump, now to do same we need to have a standard approach, this post is compiled to work as procedure to take required dump file or automate it via trigger to ensure dump is taken even when no one is […]

Jan
1
2014

Database Backup Compression using SQL Server 2008 R2

Database backup compression is a feature provided by Microsoft which reduces the native backup size by up to 66% depending upon the type of data stored in a database and similar other factors. By default backup compression is disabled as it has some limitations which needs to be looked as per environment setup and if suites one’s need then it can be enabled as default or a parameter can be added to backup script to […]

Jul
12
2013

How to use NET USE and fix related errors

NET USE command syntax:   net use [{devicename | *}] [\\computername\sharename[\volume] [{password | *}]] [/user:[domainname\]username] [/user:[dotteddomainname\]username] [/user:[[email protected]] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]   Refer for more details: http://pcsupport.about.com/od/commandlinereference/p/net-use-command.htm   Examples of NET USE: Net Use Command Examples: net use * “\\server\my media” /persistent:no In this example, net use command is used to connect to the my media shared folder on a computer named server. The […]

Jun
4
2013

Working in Excel with IP Range – Tip

  While working in excel for IP addresses, got a task to generate new IP address based on an existing one in order to configure a device, after doing some Googling find few articles on this topic, there are two good approaches to it,   1. Using excel formula like REPLACE, MIN, LEN, MID, CONCATENATE, calculate new IP range, for e.g. Suppose your IP address is 10.76.192.0 and you like to generate new IP address […]

Apr
30
2013

Write a Batch (.bat) file error handler for SQL instance down when fetching details from several SQL Servers

I have written several batch files to automate activities in SQL Server environment and send HTML reports over email on completion; but whenever SQL Server is down or server is unavailable then the HTML output get disturbed as no error handling is being done. When tried to write error handling to fix the issue, faced trouble as was using following code as part of an error handling,   FOR /F “tokens=1,2 delims=,” %%G in (%CD%\SQLServerList_SQLReport.txt) […]

Dec
24
2012

Get-WmiObject: The RPC server is unavailable (Exception from HRESULT: 0x80070721)

While I tried to use PowerShell to find disk space of a remote server using WMI query, Get-WmiObject -computer <myservername> win32_volume   …faced following error/s, ——- Error 1: Get-WmiObject : The RPC server is unavailable   Error 2: Get-WmiObject : A security package specific error occurred. (Exception from HRESULT: 0x80070721)   —— After some Googling and search found some useful tips to troubleshoot the issue, please find below the consolidated troubleshooting steps,   1) Check […]

Dec
17
2012

How to Echo text in HTML file using batch script

Today while writing script I need to echo output to an html file using batch file, so requirement is, I need to insert a break and then text in center of email, text as “—————–Database Report———————-“, now to do this you need to use carrot, see below, My batch script looks like, SET currentdirectory=%CD% echo ^<BR^> > “%CD%\output.htm” echo ^<center^>^———–Database Report————–^</center^> >> “%CD%\output.htm”     Hope it helps!   Reference: http://forums.devshed.com/other-programming-languages-139/echo-html-in-a-batch-file-339368.html

Dec
4
2012

How to execute VBScript through a PowerShell Script

I was eagerly searching for a solution to call a VBScript through PowerShell script, after going through several articles and collecting information in bits and pieces from various sources written a very small and useful code, you can use it at your wish, My requirement: Call vbscript along with passing two arguments to it, one is server name and other one is a folder name.   Command: 1. Declare $args to collect arguments (in this […]

Pages:12»

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 34 other subscribers

Translate this blog!

EnglishFrenchGermanItalianPortugueseRussianSpanish

Calender

December 2017
M T W T F S S
« Nov    
 123
45678910
11121314151617
18192021222324
25262728293031

View Post by Categories

%d bloggers like this: