Monday, March 28, 2011

Oracle Client

Oracle client is a facility where you can use to query oracle databases. If you are only interested to just install the ODBC part of the client, then you don't need to install the whole package. Just download the basic package and the odbc package from Oracle.

Create a new folder and unzip the two packages into the directory. You will need two extra file from Microsoft to be present in the same directory also. They are mfc71.dll and msvcr71.dll. Somehow the two files are required but never available in the packages.

Run odbc_install in the directory in dos prompt. It is important to run it in dos prompt as you can see the run result of the installation.

Go to system environment and add ORACLE_HOME and TNS_ADMIN variable. The value of the variables are the directory of the installed packages.

Don't forget to create/copy the sqlnet.ora and tnsnames.ora into the same directory also.

Now you can create an ODBC for the database.

I will not go into detail of the ODBC DSN setup as some users like DSNLESS way to query databases.

Wednesday, March 16, 2011

Make db offline for SQL Server.

Have trouble take some db offline. According to some blogger, they say it is some other sql manager connection to the db. However, I manage to take two of bd off line on the same server. There could be some one else connected to the db but I cannot be sure.

One blogger suggests the following command

Another blogger says do this to kick out other users.
Yet to try it but both looks promising. Will update this if successful over the weekend.

Wednesday, March 09, 2011

Not a trusted SQL Connection

When you set up a sqlserver, there is an option that you must always set before any remote administrator can access to the sqlserver using "Sql Server Management Studio".

At the server where you install the sql server. Start "Sql Server Management Studio". (Assuming you have already setup sql server).

Goto menu bar View>Registered Server

Choose the local instance that you have setup previously and double click on it.

You can skip the above two steps if you can see the local instance in the object explorer already.

Right click on the instance in the object explorer and choose properties.

Select Security.

Under "Server Authentication", check "Sql Server and Windows Authentication mode".

Click "OK"

You should now be able to connect to the sql server from remote sql server management tool.

Sending to a group of external email in Outlook

Normally if you want to send to external email, you would add the email directly to your new mail. However, if you need to send a mass mail of more than a thousand, like send mail to all your clients, it will be a headache.

Fortunately, there is a facility call "distribution list". However, you will still have to add the recipients one by one. Here is a way where you can send to a distribution list without having to add recipients one by one.

1. Start Outlook.
2. File>New>Folder
3. Type the name you want to use
4. Select “contact items”
5. Choose “Contacts” from the list.
6. Click “OK”.
7. From the main Outlook window choose File> Import and Export…
8. Choose “Import from another program or file
9. Click Next
10. Choose “Comma separated Value (windows)”
11. Click Next
12. Use the “Browse” button to select the email list.
13. Click “Do not import duplicate items”.
14. Click Next
15. Select the newly created folder from contacts.
16. Click “ok”
17. Click “Finish” when import completes.

When you want to send the mail, you can just go to contacts and choose the name of the distribution list. Should you need to keep the recipients from seeing other emails in the list then just add the list to BCC. Click the "TO" then select the list name (don't double click) and click "BCC".

Editing the list is easy. On the menu bar click "Go" then choose "Folder list" and you can find the list name in the contacts folder.