Tag: database

Efficient Ad-hoc SQL OLAP Structure

Over the years I have read a lot of people’s opinions on how to get better performance out of their SQL (Microsoft SQL Server, just so we are all on the same page…) queries. However, they all seem to be tightly tied to either a high-performance OLTP setup or a data warehouse OLAP setup (cubes-galore…). […]

How to copy from a database to a text file using VBScript?

I have an example in C# code, but it is using streamWriter. It must be involving with FileSystemObject rite. If yes, what are methods should I use? I want to code using VBScript WSH, and my database is MS SQL Server 2005. Any solution, references, or guide are helpful. using (StreamWriter tw = File.AppendText(“c:\\INMS.txt”)) { […]

Can an Excel Data Connection lock a DB table?

If I add a simple Sql Server table data connection to an Excel worksheet, can it lock that table if the connection is never closed?

Most approprieted index for short-lived columns

In my current project, some tables have a column named “changed”, which indicates if the the current line had been changed since the last check. All the insert and update statements includes this column. Every hour, I run a schedulated task that queries all changed rows, do some stuff with those rows and then sets […]

Easy database userface

I have a simple SQL Server database that we use for conversions. Basically a table with two mor more columns where one value maps to another. We then have processes that use these tables to find matching values and select other values on that row. These values change a lot and we now need a […]

Populate an SQL Server 2k8 with Oracle Loader files

Here’s the problem: I have a project that needs to be migrated to Microsoft SQL Server 2008. We have data in text files for the Oracle SQL Loader and now we need to get that data into the SQL Server DB. I could write a program that converts everything into INSERT statements but there has […]

“Lost” SQL server database

This is a really strange one. I am using SQL Server Express 2005, and have the following connection string (in a DotNetNuke web.config): Data Source=ELECTROMORPH\S15304561;Integrated Security=True;User Instance=True Note that there is no AttachDbFilename parameter – so I’m not sure how SQL server even knows what to connect to. But it is connecting to something because […]

DBMS Performance-Tuning Book Recommendations

Anyone have any recommendations for books about performance tuning on either frontend or backend? I’m looking specifically for asp.net or sql (MS-SQL) performance tuning, but anything is good to go. Thanks!

Question about database

I have problem with two parts of database diagram and I need your guidance:) database has a lot of tables that one of them is about Employee ,the other is about Customer and … ! I have problem with two tables (Product and OrderDetail) my Product table has 3 columns (ProductID,Name,Cost) and the Other table […]

Create a join that can (include some) or (include all except some) records

Consider the following two tables: User – UserID – UserName Group – GroupID – GroupName The obvious association is that Users will be in Groups. This by itself is a simple many-to-many join situation, so lets add a 3rd table: UserGroup – UserID – GroupID Under this textbook schema, I can easily include a specific […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.