Tuesday, October 22, 2013

I was installing a software on windows 2008R2 64 bit edition and ran into this error."The program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem"After doing some online research I figured the Microsoft Visual C++ Redistributable package requires installed prior installing my desired installation.This Redistribution package is available on microsoft website. Here's the link for both x86 or x64 edition.
32 bit: http://www.microsoft.com/download/en/details.aspx?id=5555
64 bit: http://www.microsoft.com/download/en/details.aspx?id=14632

Friday, August 23, 2013

Today I was importing a
MySQL database and ran into this Error “Error 1153 - Got a packet bigger than
'max_allowed_packet' bytes”.

Basically , When
you dump table data from MySQL, you may end up pulling a large chunk of data
and it may exceed the MySQL client’s max_allowed_packet variable. If that happens,
you might catch an error like this:

The default max_allowed_packet size is 25M, and you can adjust it for
good within your my.cnf by setting the variable in a section for mysqldump:

OR

The fix is to increase the MySQL daemon’s max_allowed_packet. You can do
this to a running daemon by logging in as Super and running the following
commands. Keeping the session open create a 2nd session in which to run the
import.

Wednesday, July 31, 2013

You can run the mysql command "show processlist" to see what queries are being processed at any given time, but that probably won't achieve what you're hoping for as this won’t show the whole SQL text.

Friday, July 26, 2013

If you are restoring a database using multiple backup files, you
would use the WITH NORECOVERY option for each restore except the last. If your database is still in the restoring state and you want to
recover it without restoring additional backups you can issue a RESTORE
DATABASE .. WITH RECOVERY to bring the database online for users to use.Here is the syntax.

Msg 7411, Level 16, State 1, Line 2Server 'TEST_LINK' is not configured for RPC.

This is a configuration thing with the Linked Server option called "RPC OUT". This is necessary to execute a procedure calls to go out to the linked Server. Where as, "RPC" option allows stored procedure call from the linked Server.

For this case, I had to enable "RPC Out". I ran sp_helpserver and it reported RPC OUT isn’t enabled.

In order to create LINKED Server the user needs to have SYSADMIN privileges. Here in this demonstration I’m going to show the preferred LINKED SERVER option called “Be made using the login’s current security context”. Condition is, LOGIN needs to stay on both the servers. This is the preferred and recommended method in terms of security as other users can’t use this link except for the Login I’ll be using.

Here are the steps:

1. I’m going to use a user called TEST for this demonstration, and going to provide SYSADMIN privilege to this user. Once the link created and tested, I’ll revoke SYSADMIN privilege from the TEST user.2. Login as TEST user3. Open SSMS, Go to Server Objects-->Right Click Linked Servers--> New Linked Server. The below form pops up4. Give a name for “Linked Server” , choose the provider as shown on form. Product name here I mentioned ‘*’ to specify any SQL Server product. On the Data source I’m mentioning the instance name from where I’d be pulling data. It’s “MSSQLTEST” for my case.

5. On the security tab select “Be made using the login’s current security context”. This would use my used Loging ie, “TEST” for this case.

6. Click OK, now you can browse through the objects using SSMS-->Linked Servers--> TEST_LINK-->Catalogs or you could use below syntax to fetch any table data

Thursday, July 18, 2013

After tracing i found the maintenance plan executes sp_configure 'USER
OPTIONS',xxxx followed by RECONFIGURE. The reconfigure statement then generates an error causing the plan to fail.
This was because the server configuration option "Allow Updates" was
set to 1. Changed the setting back to 0 and the reconfigure statement started
to work again!

Tuesday, June 11, 2013

The
table sys.user$ contains the field ptime, which keeps the time when the
password was changed the last time over. Do not confound it with ctime, which
is the "creation time", nor with ltime, which is the time the account
has been locked (if any).

Tuesday, June 04, 2013

The following script takes the input for SOURCE user and for the user I want to create. This script can go through many customization to suit your needs.This can extract existing user hash password, tablespace quota, object/system/role privileges. Infact everything associated with the source user.