SQL Server

Moving large table to another file group

I have a large errorlog table in my database, with 2M records and 1GB data. I'd like to create a standalone file group for the error log. I tried to use management studio to modify the table, but it's timeout. So I have to do it manually. I'm sure there's better way to do this, but here's my note which works:

SQL Server 2005 using more than 2GB memory

You can configure SQL Server to use more than 2GB by enabling the "Use AWE to allocate memory" option

sqlserver_memory

Extract date from getdate(): the easier version

select convert(varchar(10), getdate(), 101)

You'll get mm/dd/yyyy

Learn more from http://msdn2.microsoft.com/en-us/library/ms187928.aspx

ADOdb connection to MSSQL

I'm using PHP 5.2.3+ADOdb to connect SQL Server on the SQL Server on same machine. My OS is Vista Home Basic.
The SQL Server version is 9.0.3042 (2005 SP2 I guess).

The working dsn is $dsn="mssql://username:password@192.168.0.107,1433/database";

I tried
$dsn="mssql://username:password@192.168.0.107:1433/database";
and
$dsn="mssql://username:password@192.168.0.107/database";
both won't connect.

The ntwdblib.dll in c:php information:
File version: 2000.80.2039.0
Product version: 8.00.2039

Install PDO, PDO_SQLITE, PDO_DBLIB, PDO_MYSQL

Recently I'm using PRADO framework for some web application development. It comes to deploy to the server side.
The server is running Debian 3.1r3

  • apt-get install php5-dev php5-mysql php5-sybase php5-sqlite libmysqlclient-dev freetds-dev
  • apt-get install make
  • pecl install PDO
  • pecl install PDO_SQLITE
  • pecl install PDO_MYSQL
  • pecl install PDO_DBLIB
At the last step, it report:
pear/PDO_DBLIB requires PHP extension "pdo" (version >= 1.0)
No valid packages found
install failed

transaction log is full

Sometimes the transaction log is full. here's the commands to clean it.
BACKUP LOG db_name WITH TRUNCATE_ONLY
Change "db_name" to your account userID.
To verify the percentage of SQL transaction log space being used, run the following command from the same location:

DBCC SQLPERF(LOGSPACE)

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer