Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Friday, March 30, 2012

Please help me SQL 2005 and Access Databases

I have a restaurant POS application that is written in VB 6 and the data is being written to a access database. I need to access this database over the internet. I need to get certain tables (current sales) in this database to automatically send the updated data to a Web Server. My questions are: What is the best way to do this? Do I need to have sql express loaded on site and let it do the interactions with the Access server and then connect to SQL express over the internet? I am new to this and not sure of the best way to design it. Do I use Report services or analysis services to design?

Thanks

What about using a WebService which exposes the data grabbing functionality. The WebService can be additionally secured via various methods. I would not use SQL Server as a gateway to get the data in that case.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thank you. I will look into this. I don't really understand the background process to get the data but will learn.

Bob

|||

Web Service is the only way to go if you're going to use SQL Express. You can not connect directly to SQL Express through the internet as it does not support HTTP Endpoints.

Mike

Please help me on Script

we are using a data loading tool that periodically changes a database option for several databases in several of the database instances. One of these options is the database Auto-Close option. When this option is enabled, the database will close and generate a very large error log. We already using stored procedure script to monitor all the activity happening. I need to track all the activity happens after this Auto-Close option enables, for this i will have to add some script in my script which monitors daily activity.I am new to Scripts. Please help me, what to write in script.

Regards,
SumitWhy you're using AUTO_CLOSE option on that database?
In order to monitor the activity you can schedule server side trace and refer to http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm link fyi.|||Why you're using AUTO_CLOSE option on that database?
In order to monitor the activity you can schedule server side trace and refer to http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm link fyi.

Hi,
Thanks for your responce, I donot have option to use Auto_close option or not, I just have to find out how can I add this option to our daily report email script. There are lots of changes occur when this option enable mainly it increase the log file size that i need to include my mail report, I am not very much aware of the scrips. pls find some way so that i can add it in scripts running.

Regards,
sumit

Monday, March 26, 2012

Please Help

Help needed to keep 2 SQL Server 2000 databases in sync.

I am developing an application in .NET which uses an SQL Server 2000 backend. I am developing at home on a workstation at night and during the day when possible on my notebook. Both these machines have SQL Server 2000 installed, if I change anything in the database on one machine or the other, I currently have to replicate the changes to the other machine, is there a really simple way to keep these two databases in sync with a batch job or anything?

TIA

Nicklook into sqlcompare|||Originally posted by ms_sql_dba
look into sqlcompare
Where? 'cause I am interested too.

I usually use Visual SourceSafe for the structure comparison, then jobs for the data update. If there is something simpler than this, I am interested!

Best regards!|||Originally posted by ms_sql_dba
look into sqlcompare
Where? 'cause I am interested too.

I usually use Visual SourceSafe for the structure comparison, then jobs for the data update. If there is something simpler than this, I am interested!

Best regards!|||Originally posted by ms_sql_dba
look into sqlcompare
Where? 'cause I am interested too.

I usually use Visual SourceSafe for the structure comparison, then jobs for the data update. If there is something simpler than this, I am interested!

Best regards!

Wednesday, March 21, 2012

please - limit on # of databases - large number of databases - man

I hear the limit of databases is over 37,000 but all over
Microsofts site they dont recommend going over 1500 databases per artical
316749.
This artical is close to our problem and we will be testing the -g option
and then sp4 very soon but i wanted to post some of our log file and see if
anyone has other ideas. we have sql2000 sp3.
after the server is running for hours this error will appear:
2006-01-11 15:31:48.68 serverSQL Server could not spawn process_loginread
thread.
then another hour or so goes by and we get this:
2006-01-11 15:54:32.20 spid941WARNING: Failed to reserve contiguous
memory of Size= 65536.
2006-01-11 15:54:32.21 spid941Query Memory Manager: Grants=4 Waiting=0
Maximum=126079 Available=125843
2006-01-11 15:54:32.21 spid941Global Memory Objects: Resource=8522
Locks=145 ...
2006-01-11 15:54:32.21 spid941Dynamic Memory Manager: Stolen=84484 OS
Reserved=3760 ...
2006-01-11 15:54:32.21 spid941Procedure Cache: TotalProcs=31346
TotalPages=70067 InUsePages=26148
2006-01-11 15:54:32.21 spid941Buffer Counts: Commited=208680
Target=208680 Hashed=123893...
2006-01-11 15:54:32.21 spid941Buffer Distribution: Stolen=14421 Free=299
Procedures=70067...
2006-01-11 15:55:05.93 spid941Query Memory Manager: Grants=0 Waiting=0
Maximum=127118 Available=127118
eventualy after getting these errors in the log for a hour or so we are
forced to reboot because our applications start giving connection error
messages.
Thank you in advance for the help
Changing the -g startup option can increase the MemToLeave area of memory
allocation and potentially alleviate that problem. But you might want to
seriously think about moving to a 64 bit platform to better utilize memory
allocations. Also rethink why you have 1500 db's<g>.
Andrew J. Kelly SQL MVP
"out of office" <outofoffice@.discussions.microsoft.com> wrote in message
news:A657C55D-ED97-49D3-B185-575D60F401A8@.microsoft.com...
> I hear the limit of databases is over 37,000 but all over
> Microsofts site they dont recommend going over 1500 databases per artical
> 316749.
> This artical is close to our problem and we will be testing the -g option
> and then sp4 very soon but i wanted to post some of our log file and see
> if
> anyone has other ideas. we have sql2000 sp3.
> after the server is running for hours this error will appear:
> 2006-01-11 15:31:48.68 server SQL Server could not spawn process_loginread
> thread.
> then another hour or so goes by and we get this:
> 2006-01-11 15:54:32.20 spid941 WARNING: Failed to reserve contiguous
> memory of Size= 65536.
> 2006-01-11 15:54:32.21 spid941 Query Memory Manager: Grants=4 Waiting=0
> Maximum=126079 Available=125843
> 2006-01-11 15:54:32.21 spid941 Global Memory Objects: Resource=8522
> Locks=145 ...
> 2006-01-11 15:54:32.21 spid941 Dynamic Memory Manager: Stolen=84484 OS
> Reserved=3760 ...
> 2006-01-11 15:54:32.21 spid941 Procedure Cache: TotalProcs=31346
> TotalPages=70067 InUsePages=26148
> 2006-01-11 15:54:32.21 spid941 Buffer Counts: Commited=208680
> Target=208680 Hashed=123893...
> 2006-01-11 15:54:32.21 spid941 Buffer Distribution: Stolen=14421 Free=299
> Procedures=70067...
> 2006-01-11 15:55:05.93 spid941 Query Memory Manager: Grants=0 Waiting=0
> Maximum=127118 Available=127118
> eventualy after getting these errors in the log for a hour or so we are
> forced to reboot because our applications start giving connection error
> messages.
> Thank you in advance for the help
>

please - limit on # of databases - large number of databases - man

I hear the limit of databases is over 37,000 but all over
Microsofts site they dont recommend going over 1500 databases per artical
316749.
This artical is close to our problem and we will be testing the -g option
and then sp4 very soon but i wanted to post some of our log file and see if
anyone has other ideas. we have sql2000 sp3.
after the server is running for hours this error will appear:
2006-01-11 15:31:48.68 server SQL Server could not spawn process_loginread
thread.
then another hour or so goes by and we get this:
2006-01-11 15:54:32.20 spid941 WARNING: Failed to reserve contiguous
memory of Size= 65536.
2006-01-11 15:54:32.21 spid941 Query Memory Manager: Grants=4 Waiting=0
Maximum=126079 Available=125843
2006-01-11 15:54:32.21 spid941 Global Memory Objects: Resource=8522
Locks=145 ...
2006-01-11 15:54:32.21 spid941 Dynamic Memory Manager: Stolen=84484 OS
Reserved=3760 ...
2006-01-11 15:54:32.21 spid941 Procedure Cache: TotalProcs=31346
TotalPages=70067 InUsePages=26148
2006-01-11 15:54:32.21 spid941 Buffer Counts: Commited=208680
Target=208680 Hashed=123893...
2006-01-11 15:54:32.21 spid941 Buffer Distribution: Stolen=14421 Free=299
Procedures=70067...
2006-01-11 15:55:05.93 spid941 Query Memory Manager: Grants=0 Waiting=0
Maximum=127118 Available=127118
eventualy after getting these errors in the log for a hour or so we are
forced to reboot because our applications start giving connection error
messages.
Thank you in advance for the helpChanging the -g startup option can increase the MemToLeave area of memory
allocation and potentially alleviate that problem. But you might want to
seriously think about moving to a 64 bit platform to better utilize memory
allocations. Also rethink why you have 1500 db's<g>.
Andrew J. Kelly SQL MVP
"out of office" <outofoffice@.discussions.microsoft.com> wrote in message
news:A657C55D-ED97-49D3-B185-575D60F401A8@.microsoft.com...
> I hear the limit of databases is over 37,000 but all over
> Microsofts site they dont recommend going over 1500 databases per artical
> 316749.
> This artical is close to our problem and we will be testing the -g option
> and then sp4 very soon but i wanted to post some of our log file and see
> if
> anyone has other ideas. we have sql2000 sp3.
> after the server is running for hours this error will appear:
> 2006-01-11 15:31:48.68 server SQL Server could not spawn process_loginread
> thread.
> then another hour or so goes by and we get this:
> 2006-01-11 15:54:32.20 spid941 WARNING: Failed to reserve contiguous
> memory of Size= 65536.
> 2006-01-11 15:54:32.21 spid941 Query Memory Manager: Grants=4 Waiting=0
> Maximum=126079 Available=125843
> 2006-01-11 15:54:32.21 spid941 Global Memory Objects: Resource=8522
> Locks=145 ...
> 2006-01-11 15:54:32.21 spid941 Dynamic Memory Manager: Stolen=84484 OS
> Reserved=3760 ...
> 2006-01-11 15:54:32.21 spid941 Procedure Cache: TotalProcs=31346
> TotalPages=70067 InUsePages=26148
> 2006-01-11 15:54:32.21 spid941 Buffer Counts: Commited=208680
> Target=208680 Hashed=123893...
> 2006-01-11 15:54:32.21 spid941 Buffer Distribution: Stolen=14421 Free=299
> Procedures=70067...
> 2006-01-11 15:55:05.93 spid941 Query Memory Manager: Grants=0 Waiting=0
> Maximum=127118 Available=127118
> eventualy after getting these errors in the log for a hour or so we are
> forced to reboot because our applications start giving connection error
> messages.
> Thank you in advance for the help
>

please - limit on # of databases - large number of databases - man

I hear the limit of databases is over 37,000 but all over
Microsofts site they dont recommend going over 1500 databases per artical
316749.
This artical is close to our problem and we will be testing the -g option
and then sp4 very soon but i wanted to post some of our log file and see if
anyone has other ideas. we have sql2000 sp3.
after the server is running for hours this error will appear:
2006-01-11 15:31:48.68 server SQL Server could not spawn process_loginread
thread.
then another hour or so goes by and we get this:
2006-01-11 15:54:32.20 spid941 WARNING: Failed to reserve contiguous
memory of Size= 65536.
2006-01-11 15:54:32.21 spid941 Query Memory Manager: Grants=4 Waiting=0
Maximum=126079 Available=125843
2006-01-11 15:54:32.21 spid941 Global Memory Objects: Resource=8522
Locks=145 ...
2006-01-11 15:54:32.21 spid941 Dynamic Memory Manager: Stolen=84484 OS
Reserved=3760 ...
2006-01-11 15:54:32.21 spid941 Procedure Cache: TotalProcs=31346
TotalPages=70067 InUsePages=26148
2006-01-11 15:54:32.21 spid941 Buffer Counts: Commited=208680
Target=208680 Hashed=123893...
2006-01-11 15:54:32.21 spid941 Buffer Distribution: Stolen=14421 Free=299
Procedures=70067...
2006-01-11 15:55:05.93 spid941 Query Memory Manager: Grants=0 Waiting=0
Maximum=127118 Available=127118
eventualy after getting these errors in the log for a hour or so we are
forced to reboot because our applications start giving connection error
messages.
Thank you in advance for the helpChanging the -g startup option can increase the MemToLeave area of memory
allocation and potentially alleviate that problem. But you might want to
seriously think about moving to a 64 bit platform to better utilize memory
allocations. Also rethink why you have 1500 db's<g>.
--
Andrew J. Kelly SQL MVP
"out of office" <outofoffice@.discussions.microsoft.com> wrote in message
news:A657C55D-ED97-49D3-B185-575D60F401A8@.microsoft.com...
> I hear the limit of databases is over 37,000 but all over
> Microsofts site they dont recommend going over 1500 databases per artical
> 316749.
> This artical is close to our problem and we will be testing the -g option
> and then sp4 very soon but i wanted to post some of our log file and see
> if
> anyone has other ideas. we have sql2000 sp3.
> after the server is running for hours this error will appear:
> 2006-01-11 15:31:48.68 server SQL Server could not spawn process_loginread
> thread.
> then another hour or so goes by and we get this:
> 2006-01-11 15:54:32.20 spid941 WARNING: Failed to reserve contiguous
> memory of Size= 65536.
> 2006-01-11 15:54:32.21 spid941 Query Memory Manager: Grants=4 Waiting=0
> Maximum=126079 Available=125843
> 2006-01-11 15:54:32.21 spid941 Global Memory Objects: Resource=8522
> Locks=145 ...
> 2006-01-11 15:54:32.21 spid941 Dynamic Memory Manager: Stolen=84484 OS
> Reserved=3760 ...
> 2006-01-11 15:54:32.21 spid941 Procedure Cache: TotalProcs=31346
> TotalPages=70067 InUsePages=26148
> 2006-01-11 15:54:32.21 spid941 Buffer Counts: Commited=208680
> Target=208680 Hashed=123893...
> 2006-01-11 15:54:32.21 spid941 Buffer Distribution: Stolen=14421 Free=299
> Procedures=70067...
> 2006-01-11 15:55:05.93 spid941 Query Memory Manager: Grants=0 Waiting=0
> Maximum=127118 Available=127118
> eventualy after getting these errors in the log for a hour or so we are
> forced to reboot because our applications start giving connection error
> messages.
> Thank you in advance for the help
>sql

Tuesday, March 20, 2012

Plagued by corruption

Since we have migrated our 2000 databases to SQL 2005 on new hardware (described below), we have experienced re-occurring corruption on the same tables and indexes even after the corruption had been resolved by dropping/re-creating the indexes manually. Typical events include:

1. Clients receiving errors, such as 8646
2. We see the errors in the event logs, run DBCC's to confirm the errors which then creates a dump file
3. We resolve by dropping/creating the index(es) affected
4. Re-run the DBCC checks and they come up clean.

A day or two later, the entire cycle will repeat against the same object/index. This problem exists on multiple different databases on multiple different servers, all with the same structure and hardware. Our SAN engineers say there are no issues they can see with the disks.

I would be very appreciative for any suggestions to better troubleshoot the issue, or, of course, a resolution would be magnificent!!

Here is as much information about our setup and errors experienced as I can think of to provide. Of course, if I am missing something just shout and I will include it. TIA.

We are running SQL 2005 enterprise x64 sp1 on Windows 2003 enterprise x64 sp1 as a 2-node active/passive cluster (native windows clustering). The hardware is HP Proliant DL585, 4 dual-core processors @. 2.8 GHz, 48 GB of RAM.

When clustering the servers, we pay special attention to ensure the NIC settings are as specified by published MS white papers both at the NIC level and as cluster configurations. I can provide those settings if necessary.

Other pertinent settings:
- We set the SQL Server's min/max setting to both be 40960 MB (40GB)
- MAXDOP to 2
- System DB's share two drives, one for data, one for log (all drives are RAID or 10)
- TempDB has 1 drive for data, one for log, and we modify TempDB to have as many data files as processors
- User DBs share multiple pairs of drives, each pair has a dedicated data drive and dedicated log drive
- Backups (litespeed) go to a dedicated drive
- Full-text catalogs go to a dedicated drive
- Maintenance jobs run every night and include: Reindex, update stats, backups and other miscellaneous jobs specific to our environment
- We set physical database files to grow by 200MB increments when over 2GB in size and we proactively grow each file overnight if the file's free space is < 10%Additional error and dump file info...

The typical app log entry for error 8646:

Unable to find index entry in index ID 1, of table 894626230, in database 'dbname'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.

Contents of the dump file:

This file is generated by Microsoft SQL Server
version 9.00.3042.00
upon detection of fatal unexpected error. Please return this file,
the query or program that produced the bugcheck, the database and
the error log, and any other pertinent information with a Service Request.


Computer type is AT/AT COMPATIBLE.
Current time is 07:32:39 11/07/07
8 Unknown CPU 9., 2813 Mhz processor (s).
Windows NT 5.2 Build 3790 CSD Service Pack 1.

Memory
MemoryLoad = 92%
Total Physical = 49149 MB
Available Physical = 3913 MB
Total Page File = 60149 MB
Available Page File = 15932 MB
Total Virtual = 8388607 MB
Available Virtual = 8338218 MB

DBCC RESULTS
-------
<DbccResults>
<Dbcc ID="0" Error="2511" Severity="16" State="1">Table error: Object ID 894626230, index ID 1, partition ID 7205
7596565782528, alloc unit ID 72057596808986624 (type In-row data). Keys out of order on page (1:487717), slots 3
and 4.</Dbcc>
<Dbcc ID="1" Error="2511" Severity="16" State="1">Table error: Object ID 894626230, index ID 1, partition ID 7205
7596565782528, alloc unit ID 72057596808986624 (type In-row data). Keys out of order on page (1:487717), slots 79
and 80.</Dbcc>

...and so on...|||and last but not least...

* Short Stack Dump

PSS @.0x000000045399FA80
--------

CSession @.0x000000045399E410
---------
m_spid = 54 m_cRef = 14 m_rgcRefType[0] = 1
m_rgcRefType[1] = 1 m_rgcRefType[2] = 11 m_rgcRefType[3] = 1
m_rgcRefType[4] = 0 m_rgcRefType[5] = 0 m_pmo = 0x000000045399E080
m_pstackBhfPool = 0x0000000000000000 m_dwLoginFlags = 0x83e0 m_fBackground = 0
m_fClientRequestConnReset = 0 m_fUserProc = -1 m_fConnReset = 0
m_fIsConnReset = 0 m_fInLogin = 0 m_fAuditLoginSent = 1
m_fAuditLoginFailedSent = 0 m_fReplRelease = 0 m_fKill = 0
m_ulLoginStamp = 54267395 m_eclClient = 5 m_protType = 5
m_hHttpToken = FFFFFFFFFFFFFFFF

m_pV7LoginRec
-------
0000000000000000: d60b0000 02000972 00100000 00000007 08190000 ......r.........

0000000000000014: 00000000 e0830000 2c010000 09040000 5e000c00 ......,......^...

0000000000000028: 00000000 00000000 76000700 84000000 00000000 ......v.........

000000000000003C: 84000400 8c000000 8c000000 00163582 4ea48c00 ...........5.N...

0000000000000050: 4a0b8c00 00000000 00000000 0000J..........

CPhysicalConnection @.0x000000045399E2E0
------------
m_pPhyConn->m_pmo = 0x000000045399E080
m_pPhyConn->m_pNetConn = 0x000000045399EB00
m_pPhyConn->m_pConnList = 0x000000045399E3E0
m_pPhyConn->m_pSess = 0x000000045399E410 m_pPhyConn->m_fTracked = -1
m_pPhyConn->m_cbPacketsize = 4096 m_pPhyConn->m_fMars = 0 m_pPhyConn->m_fKill = 0

CBatch @.0x000000045399EFD0
--------
m_pSess = 0x000000045399E410 m_pConn = 0x000000045399EEC0 m_cRef = 3
m_rgcRefType[0] = 1 m_rgcRefType[1] = 1 m_rgcRefType[2] = 1
m_rgcRefType[3] = 0 m_rgcRefType[4] = 0 m_pTask = 0x00000000038085C8

EXCEPT (null) @.0x00000000507BA138
----------
exc_number = 0 exc_severity = 0 exc_func = 0x0000000001873F50

Task @.0x00000000038085C8
--------
CPU Ticks used (ms) = 6134 Task State = 2
WAITINFO_INTERNAL: WaitResource = 0x0000000000000000 WAITINFO_INTERNAL: WaitType = 0x0
WAITINFO_INTERNAL: WaitSpinlock = 0x0000000000000000 SchedulerId = 0x2
ThreadId = 0x1cc0 m_state = 0 m_eAbortSev = 0

EC @.0x000000045399FA90
-------
spid = 54 ecid = 0 ec_stat = 0x0
ec_stat2 = 0x0 ec_atomic = 0x0 __fSubProc = 1
ec_dbccContext = 0x00000000507BEF50 __pSETLS = 0x000000045399EF30 __pSEParams = 0x000000045399F350
__pDbLocks = 0x000000045399FEE0

SEInternalTLS @.0x000000045399EF30
----------
m_flags = 0 m_TLSstatus = 3 m_owningTask = 0x00000000038085C8
m_activeHeapDatasetList = 0x000000045399EF30
m_activeIndexDatasetList = 0x000000045399EF40

SEParams @.0x000000045399F350
---------
m_lockTimeout = -1 m_isoLevel = 4096 m_logDontReplicate = 0
m_neverReplicate = 0 m_XactWorkspace = 0x0000000BA3DDB9D0
m_pSessionLocks = 0x0000000780BE6F10 m_pDbLocks = 0x000000045399FEE0
m_execStats = 0x0000000082256E40 m_pAllocFileLimit = 0x0000000000000000|||Do the machines have ECC RAM?|||Yes, all our servers have ECC RAM, which I believe is a req. for the HP servers.

Placing MSDE .mdf and .ldf files on seperate drives.

Hi,
I know that SQL Server (MSDE), databases run much faster when the data and log files are on seperate physical devices. I can do this explictly when I write a CREATE DATABASE SQL script, but would like to change the MODEL database so that all new databases use the sperate data/log file assignments by default. I haven't found a way to alter the sysfiles table in model - I can read the data, but it balks at trying to update it. (recordset is not updateable, or adhoc querries not allowed against a system database).

I didn't see any options on the MSDE install that implements seperate data/log paths.

I don't have the SQL Server tools (like Enterprise Manager) available, but I do have VS.NET 03 (Standard). And Web Data Administrator.

Any suggestions? Thanks in advance.When you install MSDE you can add settings to the setup.ini file that specify the TARGETDIR (where the binaries and log files go) and DATADIR (where the data goes).

If you need to move the locations of those after the fact,Books Online contains a topic called "Attaching and Detaching a Database" which explains how.

Terri|||Excellent, thanks for the information! I'll check out the Books online link.

I think part of the problem of finding the information that I'm sure must be in the documentation, is knowing the exact terminology used. "Attaching and Detaching" never made it into my search input box. Thanks again..|||If you haven't yet downloaded and installed Books Online you definitely should! I myself refer to it dozens of times each week. It's a terrific free SQL Server 2000 reference and really helps with synax as well as larger concepts.

And yes, it can certainly be a struggle to figure out which terms to look for!

Terri|||Hi,
Thanks again for the BOOKS ONLINE reference, I've used it a number of times already. Curiously, it hasn't been much help with my original problem. I did learn about detaching and reattaching databases, and that it one way to get the physical locations set for my user DB .mdf and .ldf files. I still haven't worked out how to get the model database to refelct these new assignments (thought there are a few more thngs to try).

While searching the BOOKS ONLINE, I did find the customizing MSDE install section. Unfortunatelly, it looks like there are no paramenters to the setup that will allow an installation with seperate drive locations for the data and log files. You can specify the location of the system data files, but the setup automatically adds the log file in the same location. I had considered reinstalling MSDE, or adding a new instance, but that doesn't seem to offer a solution.

I've run into a number of roadblocks when trying to relocate the assignments of the data or log files with the system BDs. Understandably, the system is quite restrictive about manipulating system files. If someone has established an instance of MSDE with sperate physical drive locations for the data and log files, I'd be interested in knowing how they did that.

Other than getting the model DB set up with the data files on one drive and log files on another (so that new USER DBs would follow that pattern), I'm not sure that there would be an advantage to this scheme anyway. I wouldn't think that the master DB data and log files get written to often enough to make a perfomance difference. If an application is creating SQL Server objects dynamically all the time, maybe; but not under normal use. I'd guess the same holds true for other system DBs.

Where it stands now, I can get all my user DBs set up the way I'd like; though I can't get the model DB to do this automattically for new user DBs. I can't get the system DB dat and log files on sperate drives, but that may not be important. I just wonder is MS set it up that way as a performance governor for MSDE?|||Brain,

You won't find much in Books Online about MSDE. MSDE, for all intents and purposes is just SQL Server without a number of the tools (Enterprise manager, etc), and 'hobbled' to certain database sizes etc.

You've got a few options to move your database files around:
1) detach and reattach with the files in the desired locations. This takes your DB offline for a few minutes while you make the change. Check out Books Online for sp_attach_db and sp_detach_db
(this one's a bit tricky/ugly).
2) ALTER the database to specify the creation of NEW files. Look into ALTER DATABASE (add and remove file options). This allows you do to everything while the db is up and running.. but can present some issues where you'll need to tidy things up.
3) Do a backup of your database, then restore it over itself with the files MOVED to where you want them. This might be the best option. And will look something like:

-- backup the db
BACKUP DATABASE myDatabaseName TO DISK = N'C:oink.bak'

-- create a device to 'wrap' your backup and details:
EXEC sp_addumpdevice 'disk', 'mydevice','C:\oink.BAK'

-- Now... just execute this:
RESTORE FILELISTONLY FROM mydevice

this shows you all of your logical file names as well as the actual paths to those files.

map those into something like the following:
RESTORE DATABASE
[myDatabase]
FROM
[mydevice]
WITH
RECOVERY, -- make it work when it comes back online
REPLACE, -- overwrite the existing database if it's there
STATS = 25,
MOVE 'logicalfilename' TO 'G:\SQLData\ProductCatalog_Data.MDF'
,MOVE 'logicalfilename' TO 'F:\SQLData\ProductCatalog_Log.LDF'

EXEC sp_dropdevice mydevice --,'delfile'

the logicalfilenames above correspond to the logical name returned in the resultset you get when you do RESTOREFILELISTONLY

hth

Saturday, February 25, 2012

Pivot Tables from Non-OLAP Databases?

Is it possible to create a Pivot Table while doing a webquery off of a Non-OLAP enabled MS SQL 2000 database? Here is the problem tho, I want the pivot tables to honor the Hierarchy (example, in the selection of the dimensions, if I pick USA I can expland USA and see all of the States, then pick PA and expland it and pick all of the Cities).

I have only been able to do this multi-level when a pivot table is created off of an OLAP piece.. PLEASE tell me there is a work around for this.I've embedded pivot tables in web pages that link directly to views in the database. The view must supply all the dimensions required, but then you get functionality similar to (but not exactly the same as) pivot tables in MS Excel.

blindman