How to make MSSQL Offline

Open up MSSQL Management Studio

Then Select Database -> your Database -> right click -> Task -> Take Offline.

If the database does not make offline then you can do the following

ALTER DATABASE <dbname> SET OFFLINE WITH ROLLBACK IMMEDIATE

If this is not working then use the following to find spid

USE master SELECT * FROM sys.sysprocesses WHERE dbid = DB_ID('MyDB')

or

EXEC sp_who2

then use

kill spidNumber

To force disconnections, use

ROLLBACK IMMEDIATE USE master ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Advertisements

How to fix [DBNETLIB]ConnectionOpen (SECDoClientHandshake()) SSL Security error CODE 80004005

I have recently have this issue on SQL Server 2012 with Windows Server 2012 R2.

The error was displayed one using OLE DP Provider in the VB script connection strings.
After looking at various google post explaining this issue nothing has worked.

To confirm the server is PCI DSS compliant and TLS 1.0 < and SSL are disabled.

I have changed the connection string from

‘connstring = “Provider=SQLOLEDB.1;

to

connstring = “Provider=SQLNCLI11;

this is to use native SQL Client Drivers to connect.

This has worked and no more issues the script complained.

Some background:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50131

Connection Strings for SQL Server 2012

https://www.connectionstrings.com/sql-server-2012/

https://www.connectionstrings.com/sql-server-native-client-11-0-oledb-provider/

How to Install Django

Install Setuptools first

Mac OS

> wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O – | python

Linux/Unix

Note that you will may need to invoke the command with superuser privileges to install to the system Python.

Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:

> wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
> python ez_setup.py –user

Install Pip

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py

$ python get-pip.py

or

Using Package Managers

On Linux, pip will generally be available for the system install of python using the system package manager, although often the latest version lags behind. Installing python-pip will also install python-setuptools.

On Debian and Ubuntu:

$ sudo apt-get install python-pip

On Fedora:

$ sudo yum install python-pip

Then Install Django: ( You can check the latest version on https://www.djangoproject.com/download/)

pip install Django==1.5.5

Now you are ready to rock!

SQLite GUI Program

http://sqliteman.com/

What’s Sqliteman? The best developer’s and/or admin’s GUI tool for Sqlite3 in the world. No joking here (or just a bit only) – it contains the most complete feature set of all tools available. Get more informations in the About section.