Monthly Archives: November 2005

Import external data into SQL server: from MS Access file

2. MS access file2.1 Use OPENROWSETSELECT * FROM OPENROWSET(‘Microsoft.Jet.OLEDB.4.0’,‘C:\Program Files\Microsoft Office\Visio11\1033\DBSAMPLE.MDB’;’Admin’;”,     [Sample – Chips]) AS a Since OPENROWSET does not support variable in parameters, if the file name is dynamically determined in run time, use dynamic query like this:DECLARE … Continue reading

Posted in SQL server | 5 Comments

Import external data into SQL server: from excel file

Three programtical ways to load data into SQL server: OPENROWSET: It is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data using OLE DB. The OPENROWSET function … Continue reading

Posted in SQL server | Leave a comment

SQL server 2005: DDL triggers

DDL trigger is a new feature in SQL 2005. It’s fired when variaty of DDL statements, e.g. DROP TABLE, ALTER PROCEDURFE etc, are executed. DDL trigger can be used mainly for two purpose: 1) Prevent the change to database schema … Continue reading

Posted in SQL server 2005 | Leave a comment

SQL server 2005 GUI tools

SQL server management studio (SSMS):It combines the features of Enterprise Manager, Query Analyzer, and Analysis Manager in SQL Server 2000 into a single environment. It works with all components of SQL Server such as Reporting Services, Integration Services, SQL Server … Continue reading

Posted in SQL server 2005 | Leave a comment

SQL server 2005 utilities

SQL server 2005 utilities: Suppose the SQL server installation folder: InstallationFolder\Microsoft SQL Server\   Utility  Description Subfolder bcp Utility  Used to copy data between an instance of Microsoft SQL Server and a data file in a user-specified format.  90\Tools\Binn dta … Continue reading

Posted in SQL server 2005 | Leave a comment

Suspect database

I got several suspect database this morning after my machine was reboot. I checked the sql server error log, found following entries:2005-11-09 09:51:36.75 spid11    Starting up database ‘DBName’.2005-11-09 09:51:36.75 spid11    udopen: Operating system error 5(Access is denied.) during the creation/opening … Continue reading

Posted in SQL server | Leave a comment