General Partitioning In SQL Server 2005

Jan 8, 2007

Ananth writes "A new feature is established in SQL Server 2005. That is Partitioned Table. I went through several articles in net regarding partioned table. But I did not get any generalized version of Partitioning.
For example I partitioned a table into 4 Filegroups based on Transaction Date. So I used range function to give ranges for 4 quarters of one year. It works fine. But I would like to generalize this scenario. It will work for one year. If new year comes ,I have to write new script and execute the same.
The Partitioned function should work for 12 months in a given year. So here year is the paramter and then that function should be construct based on the year automatically.
Can anybody give me answer asap."

View 1 Replies


ADVERTISEMENT

Sql Server 2005 Partitioning Problem

Jul 19, 2006

i'm using sql server 2005 partitioning feature, when i update a record in 100 record partition it takes the same time as 1000000 records partition why, could any one help

View 1 Replies View Related

General Issues Concerning Data Mining With SQL Server 2005

Nov 18, 2006

Hi

I am just starting to learn how to use data mining with SQL server 2005. I have some general questions which I hope someone out there can help me with.

Each month I have approx. 100.000 customers who buy a product.

I want to contact 10.000 of these with a letter for cross-selling some additional products.

Currently I choose these 10.000 randomly from the 100.000 customers. I now want to use SQL server 2005 data mining to choose these 10.000 better, to receive a better response rate. How do I transfer this knowledge to the 100.000 (potential cross-selling customers)

I understand that it could be set up in SQL server like the following:

case table: customer_id, gender, age, city, etc.

nested table: customer_id, product

Is this the way it should be approached and is there a special model/algorithm for this purpose?

Regards,

Dennis

View 5 Replies View Related

SQL Server 2005 Express Edition - General Availability

Apr 5, 2006

Hello,

I want to know the following:

- When will SQL 2005 Express Management tool be out of CTP and be in production?

- When will SQL 2005 Express SP1 be out of CTP and be in production?

Thank you,

Harry

View 1 Replies View Related

SQL 2005 Automatically Partitioning?

Mar 26, 2007

Once I've added Files for a database across mulitple SAN drives willSQL 2005 automatically partition data across the Files automatically?Will it atleast grow across files automatically? Or do I have to doScheme Functions, Partitions, and assign the Scheme Partition to eachtable in the database?ThanksErik

View 1 Replies View Related

SQL 2005 - Partitioning Tables

Oct 29, 2005

I want to know how to partition a table using two columns (Example: Salesman, OrderDate).

View 8 Replies View Related

Partitioning And Replication To Non-enterprise SQL 2005 Edition

Aug 24, 2007

We currently want to move towards partitioning tables on a master server which is running SQL 2005 Enterprise Edition. However, we have transactional replication as well as log-shipping set-up against that server. The log-ship destination is also running Enterprise Edition, but the subscription server(s) are all Standard Edition only. Will there be any problems or special steps required in creating data partitions on some of these replicated tables if we don't upgrade our license?

View 1 Replies View Related

SQL Server 2005 DTS Problem: Error 21776: General Error

Mar 5, 2007

I've recently migrated all databases to SQL Server 2005. I couldn'tfigure out how to create an SSIS package in the time I had, so I juststuck with the DTS packages. They all worked fine during testing, butonce we renamed the server we had problems. The DTS packages stillwork, but whenever I click into the Copy SQL Server Object and try toSelect Objects (on the Copy tab) I get this error:Microsoft SQL-DMOError 21776: General ErrorI click OK and get the error again and again for a total of 12 times(regardless of which database I'm connecting to in the packages, soit's not related to the number of objects in the database). Then theSelect Objects screen appears and it's business as usual.Has anyone else come across this problem and found a solution? I'verenamed the server using sp_dropserver and sp_addserver and select@@servername returns the correct valueJohn Hunter

View 1 Replies View Related

SQL 2005 Index Issue – General Network Error

Jan 2, 2007

Info: CE.Net 4.2
CF 2
SQL Server 2005

First of all, sorry for the cross post but i need a quick answer on this.

I am executing a CLR Stored Procedure from a Windows Mobile device and regularly get a general network error.

The stored procedure cycles through up to 70 tables, checking for any records between two dates. The LastUpdate field is in each one of the 70 tables and is indexed.

The mobile device regularly reports general network error, which is due to a timeout. Command timeout is now set to 10 minutes but the timeout still occurs.

The stored procedure appears to get stuck on a particular table. If I rebuild the index on this table, it will get past it but then get stuck on the next table.

I set up a maintenance plan to run every 5 minutes (extreme, I know!) but the indices would appear to corrupt (without any activity on the table) in less than this interval.

However, running the exact same query from SQL Server Management Studio works correctly every time and usually within 10 seconds.

I€™m sure that it has something to do with the indices but cannot seem to resolve the issue. It€™s even more confusing how only the mobile device is affected!

Any help or advice would be greatly appreciated.

View 3 Replies View Related

SQL Server 2008 :: Partitioning - Left Or Right?

Jul 1, 2015

Normally it is recommended to leave an empty partition on both the front and back ends of a table to avoid data movement when merging/splitting. But I have some questions based on my scenario, which is a table partitioned by a load date, so all records in a partition contain the same date, not a range of dates.

If I use range left, once I switch out the first partition it would become empty, so would there be data movement when I merge it into the next partition? The real issue though is that we will not just be removing the first partition, but "random" partitions throughout the table. Will this work?

If I use range right, when I split the last partition to create a new one it doesn't seem there would be any data movement there either. Am I missing something?

Basically I'm wondering if I should use range left or right. Most recommend using right, but then the boundary value is not the value in the partition. This could potentially result in someone deleting the wrong data if they are not careful. So is there any reason not to use left in my scenario?

I did a test of removing a partition in the middle and it worked just fine; this was using range right. I have about 6 million rows per partition. I also tested splitting at the end and it worked fine. I'll rebuild it with range left and test.

View 0 Replies View Related

Table Partitioning On A RAID 5 Server

Dec 2, 2006

Is there any benefit in creating seperate file groups for a partitionedtable on a multi-processor server with RAID5 and 1 Logical Drive?

View 8 Replies View Related

Does Microsoft SQL Server Support Any Partitioning Method?

Jan 23, 2004

I was wondering if Microsoft SQL Server support any partitioning method (like range, list, hash or composite partitioning in Oracle) or you have to partition all tables manually?

Thanks in advance,

Bracia

View 1 Replies View Related

SQL 2012 :: Dynamic Partitioning Of Table Server

Dec 3, 2014

I need Dynamic Partition of SQL Table.

1. What is the best practice for partitioning (on date column)

2. The project on which i am working correctly have a case where in i get the update of my status flag after few days (Say 15 - 30) in that case if my data got into partition table how to update and how to search which partition has my data

3. Is creating partition occupies more disk space?

4. Is every partition would need index?

View 7 Replies View Related

SQL Server 2008 :: Index Alignment In Partitioning?

Apr 1, 2015

I've yet to use partitioning in a production environment, and pretty much last ran any partitioning related code a few years back when looking at certification; so I'm definitely not an expert on the matter and only loosely clued up on the concepts.

I've recently started with a new employer, and they have just implemented a new system for sms messaging. The database tables tracking the sms messages being sent are going to get big and so they have created decided to implement partitioning on some of the tables using a partition scheme on the CreatedDate column; the DBA involved in designing the partitioning has left and I'm picking this up.

The relevant DDL for the table is below:-

CREATE TABLE [Message].[Sms](
[SmsId] [bigint] IDENTITY(250000001,1) NOT NULL,
[CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_Sms:CreatedDate] DEFAULT (getdate()),
CONSTRAINT [PK_Sms:SmsId] PRIMARY KEY NONCLUSTERED

[code]....

There are some issues with the above that I will be addressing seperately (e.g. the clustered index should be unique as it contians the unique key, and the fillfactors are daft), but my concerns for this post are below.

1) How to define the Primary Key and enforce it's uniqueness whilst trying to ensure it's aligned with the partition in order to be able to switch out old data once an as yet undefined retention period has passed. In books online it states:- "If it is not possible for the partitioning column to be included in the unique key, you must use a DML trigger instead to enforce uniqueness. " Books online - Special Guidelines for Partitioned Indexes. However, I'm not sure what this means, nor how I create the primary key to use the partition function seeing as it doesn't have the CreatedDate in the unique key?

2) The original partition function was envisaged as the following:-

CREATE PARTITION FUNCTION [DateFunction](datetime) AS RANGE
LEFT FOR VALUES (N'2014-01-01T00:00:00.000'
, N'2014-04-01T00:00:00.000'
, N'2014-07-01T00:00:00.000'
, N'2014-10-01T00:00:00.000'
, N'2015-01-01T00:00:00.000'
, N'2015-04-01T00:00:00.000'
, N'2015-04-02T00:00:00.000'
, N'2015-04-03T00:00:00.000'
, N'2015-04-04T00:00:00.000'
, N'2015-04-05T00:00:00.000')
GO

There is a procedure that has been created and scheduled daily that will create a new partition for each day, and then merge these together at the end of the quarter. My understanding of partitioning is that this is a bad idea, as it will result in merging several populated partitions together. Is my understanding correct? If so, I'm planning on removing the day partitions at the end of the function, and simply adding quarterly partitions, maintaining a spare empty partition at the end of the table. Would this make more sense?

View 9 Replies View Related

SQL Server 2012 :: Table Partitioning For 500gb In Size

Feb 25, 2014

Script to do the table partitioning for a 500gb in sliding window technique?

View 9 Replies View Related

SQL Server 2008 :: Automate New Partition Creation In Table Partitioning?

May 8, 2013

we planning to create partitioning on existing tables. The partitioning is on date column, there should be one partition for each year.

Creating of new partitions should be automated, and also we dont have any plans of archiving old data, all we want is that new partition creation should be automated.

View 6 Replies View Related

SQL Server Admin 2014 :: Partitioning Master And 4 Child Tables

Jul 5, 2014

I have 6 tables which are very huge in row count and need to be partitioned for better manageability.

Little info: Every day, 300 Million records are inserted and 300 million records are deleted in below 7 tables. we maintain only 8 days worth of data in below tables which is the reason records which are older than 8 days are continuously deleted.

Master table which has [ID],[Timestamp]
Table Name: Sample - 2,578,106

Child tables: Foreign key [ID] is common for all the tables. There is no timestamp column in child table.
dbo.ConnectionDB - 1,147,578,048
dbo.ConnectionSS - 876,458,321
dbo.ConnectionRT - 118,133,857
dbo.ConnectionSample - 100,038,535
dbo.Command - 100,032,235

I would like to partition the above child tables based on the IDs that are inserted every 4 hours. Meaning, All IDs that are inserted in 4 hours window should be in a partition.

View 1 Replies View Related

SQL Server 2012 :: Table Partitioning Based On Date Column

Aug 25, 2014

We have a database and have 6-7 growing tables. All the tables have Primary and foreign key relation. I want to do partition based on the date column.

I need 3 partitions

First partition has to hold present data
second partition need to hold the previous year data (SAS storage)
Third partition need to hold all the old data and need to be in the archive database

I understand that first we need to disable the constraints (Indexes PK & FK)
Then create partition function and partition schema
Then Create the Constraints again

View 9 Replies View Related

SQL Server 2008 :: Retrofitting Partitioning To Existing (large) Tables

Feb 9, 2015

We have an existing BI/DW process that adds large chunks of data daily (~10M rows) to an existing table, as well as using Deletes to remove stale data. This scenario seems to beg for partitioning to support switching in/out data.

After lots of reading on this, I have figured out the mechanics of the switching, bit I still have some unknowns about the indexes needed to support this.

The table currently has several non-clustered indexes, including one on the partitioning column - let's call that column snapshotdate. Fortunately there are no FKs involved, and no constraints.

Most of the partitioning material I see focuses on creating a clustered PK to assist with switching. Not sure if this is actually necessary, but assume I create one using an Identity column (currently missing) plus snapshotdate.

For the other non-clustered, non-unique indexes, can I just add the snapshotdate to the end of the index? i.e. will that satisfy the switching requirement?

View 1 Replies View Related

General Questions About Sql Server

Sep 24, 2006

I asked my tutor those questions and I want to ask you too


Hi
Sir


I hope you doing fine

I
have some questions please;



What is the diffrent between For Attach in Create Database
Command and Sp_Attach_DBWhat is the diffrent between store db file in folder and store
it raw partition e.g. C:What is the useful from TextImage_On in Create Table Command; it
is order Sql Server to stor the photo in diffrent table's fileCan you give us a basic steps to insert *.JPG photo in Sql
ServerIf I have this statement:



Create Table xTable



(
UserId
Int ,

UserName
VarChar ( 3 ) ,



Email
VarChar ( 10 ) Default ( UserId + '_' + UserName )
)



Why This Code not works and how can
I do this without using Triggers.



Can you tell us the different between Media Set and Media Family
and the useful of them. Can we do Backup and Restore Commands on Virtual Tape and How?When I write this code









Create Trigger xTrig on xTable
For Insert
AS

When this trigger will fire Before
Insert, during or after.



What is the useful from EDURE in Create ProcedureWhat is the useful from Recompile in Create Procedure In Sp_AddRole how can I create this role and make the owner
anther person e.g. sa What is the different between User and LogIn in Sql ServerWhat is the different between Role and Group in Sql ServerWhy can I add user to group in Sp_AddUser and I could not add
one in Sp_AddLogin






These lies work good



-- Add
New LogIn to ProgramManagerRole





Exec Sp_AddLogIn 'zProgramManagerUser' , '' ,
'C8_Ahmad_13430_NewSIS' , 'English'
Go

Exec Sp_GrantdbAccess 'zProgramManagerUser'



Go

Exec Sp_AddRoleMember 'ProgramManagerRole' ,
'zProgramManagerUser'

Go



But Why these lines not work good and give me a
msg with an error the Role name or User Name not in the db



-- Add
New LogIn to ProgramManagerRole

Exec Sp_AddLogIn 'zProgramManagerUser' , '' ,
'C8_Ahmad_13430_NewSIS' , 'English'



Go

Exec Sp_AddRoleMember 'ProgramManagerRole' ,
'zProgramManagerUser'



Go

Exec Sp_GrantdbAccess 'zProgramManagerUser'

Go
Thank you

View 3 Replies View Related

Who Shut Down This Server? (was General Question (I Think))

Jan 26, 2005

Is there a way to tell who the guilty person is:

The process winlogon.exe has initiated the shutdown of computer DOCSITE01FDK on behalf of user NT AUTHORITYSYSTEM for the following reason: Application: Maintenance (Planned)
Reason Code: 0x84040001
Shutdown Type: shutdown
Comment:

It tell you that the source is user23. Is there a way to determine who shut down this server?

Thanks

View 4 Replies View Related

SQL Server Sp4 And IPv6 General Question

Oct 3, 2006

Does SQL Server 2000 sp4 work with IPv6?

View 1 Replies View Related

General Network Error: Is It My Code Or Our Server?

Mar 10, 2007

Hello everyone, this post will be a bit lengthy, so please bear with me.  I've been programming asp.net for abou 2 years.  I'm not a master by any means, and I do things like I learn from books.  Here is my standard way of connection to my mssql database (which is on the same server as my site, so I just use "localhost")  Dim objConnection As New SqlConnection(Application("dbstring"))
Dim strSQL As String = "SELECT * FROM myTable WHERE this='that'"
Dim objCommand As New SqlCommand(strSQL, objConnection)
Dim objDataReader As SqlDataReader

objConnection.Open()
objDataReader = objCommand.ExecuteReader()

Do While objDataReader.Read() = True
'Do what I need to do with the data
Loop

objDataReader.Close()
objConnection.Close()

objConnection.Dispose()Here's my issue. Our website gets this error 2-4 and as many as 6 or 7 times a day: General network error. Check your network documentation.Line ###: objConnection.Open()I use the method I wrote above for getting data on almost every page in the site. Its a HUGE site, but I've made sure that I close all my connections. This is my global connection string:  Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)        Application("dbstring") = "Server=WWW1;database=###;uid=#####;password=#####;Connect Timeout=300;Connection Reset=False;Pooling=False;Max Pool Size=75000;" End Sub Here's my web.config file:<configuration>    <system.web>        <customErrors mode="Off"/>    </system.web></configuration>... This server has only one website running on it, its a dedicated server. Is there something in my code causing this error to happen so much? We have to restart the sql server everytime this error happens for it to go away. Its very disruptive to the website.

View 8 Replies View Related

General Syntax To Pull Xml Data From A Web Server

Apr 16, 2008



Could someone give me the general syntax to pull xml data from a web server that I have access to? I do know that I can not use an ip address, I have to use the hostname, etc.

I was using something like

FROM OPENROWSET(BULK '\SERVERNAMESHAREPATHDATAFILE.XML', SINGLE_BLOB) as x

instead of using SERVERNAME I am user http:\www.mycompanyname.commycompanynamestoredata.xml

I do not understand why this does not work. I hope I gave enough information for this.

Please help.

Thank you
LadyDee

View 10 Replies View Related

ASP.Net 1.1 With SQL 2005 : General Network Error. Check Your Network Documentation

Oct 4, 2007

Hi Every one,

I am using .Net 1.1 for my web application.

And my database server is SQL Server 2005.

My application is running fine, as i can login to it and also able to view pages. But when i open Order management(having 3K records) its give me error,

General Network Error. Check your network documentation


I have also searched many articles and tried following solutions but nothing working

- connectiontimeout = 0, max pool size = 7500/100, pooling = false

- SSL disabling enforce security false as mentioned in microsoft kb article.

And there's nothing any issue with hardware/firewall as my application's login and other forms are working fine(which use same database with same connection string)

Can any one please help me to solve this error?

With Regards,

View 3 Replies View Related

SQL Server Agent &> General Tab &> Mail Session Is Greyed Out ??

Feb 22, 2004

Hi All,

Great forum y'all have going here.

Just wondering if anyone else has experienced this?

Enterprise Manager:
I have setup and 'sucessfully tested a MAPI session' with a mail profile via support services > sql mail. That works fine, however in sql server agent properties the mail session section on the first general tab appears to be greyed out.

scenario is:
Windows Server 2003 SBS edition
SQL Server 2000 SP3
Exchange Server 2003 is also running on the server, with Outlook 2003 client (so i suspect side chaining issue).

Any help appreciated! did not have any luck googling or using microsoft KB.

View 12 Replies View Related

Can't Edit Linked Server General Properties After Saving

Dec 19, 2005

Hi,When I click on the properties of a linked server, all the Generalproperties are read - only, which means that if I want to edit anygeneral properties I have to delete the linked server and recreate it.Needless to say this is a pain. Is this by design or some kind of bug?Is there a workaround?Thanks

View 8 Replies View Related

General Connection To SQL Server... Done... Grids And Data Retrival ...ugghhh

Dec 13, 2005

Help!!! please!!!... I'm pulling my hair off... Having an external hosting for sql server is terrible for .net. Too many restrictions and they are not willing to help at all... I cannot connect directly, I have to do everything using strings. Honestly and it's a shame to admit it I never learned how to connect using strings, only using the wizard (upsizing DBs from Access to SQL Server)finally, after a month of trying I was able to connect to the database using a string like this:Dim CS As String        Dim db_name, db_username, db_userpassword As String        Dim db_server As String
        db_server = "blah,blah,secureserver.net" /yes, with them >:(        db_name = "DB##"        db_username = "***"        db_userpassword = "***"
        Me.SqlConnection1.ConnectionString = "SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
I am probably not using it right but it's working to capture info using stored procedures but I've been trying to get my datagrids to connect and they are impossible... Any ideas? what would be the coding part of the datagrid/dataset/etc... connection? That probably means that I can't use the property builder or the dataset generator, right?  Any ideas ? Thanks
(using 1.1 Framework)

View 1 Replies View Related

General Advice Needed Regarding MS Access, MS SQL Server, MySQL/PostgreSQL

Nov 15, 2006

I am working on two versions of an application, one of which will be awindows forms application (which will need to be redistributable) andthe other will be a web application.I have MS Visual Studio 2005 (along with the developer's edition of MSSQL Server), but not MS Access. I also have MySQL, PostgreSQL, Sun'sapplication server, Tomcat and Apache web server. I am working onWindows XP Pro, and have installed the .NET 3 SDK and all relevantrelated products I could find (e.g. 2 extensions packages for VisualStudio).I have one MS Access database, to which my users should have read onlyaccess. I have, and have used, a tool for importing MS Accessdatabases into MySQL. I expect that SQL Server has a similar utilityhidden somewhere (where I haven't yet looked, though I HAVE beenlooking - obviously in the wrong places). I have located a similarutility for importing MS Access databases into PostgreSQL. I have notyet decided which servers to use for the web version, but that isanother story, for which I may raise another thread in due course (butI welcome suggestions which may reduce the effort required givenrequired effort for the windows forms app).My problem is for the windows form aplication (intended for use by asingle family). I expect to use ADO.NET. The question is, should Iimport the Access database into MS SQL, and redistribute it, along withMS SQL Server Express (or is that necessary), or distribute it just asan Access database and use the jet engine to access it. A relatedquestion is, "Does ADO.NET support creating new databases for a givenengine?" Imagine a recipe database. It is easy enough to create a SQLscript that creates all the required tables, indices, foreign keys,&c., but can I submit that SQL script to an ADO.NET object, along witha file name, and have it create, e.g., an Access database with thesupplied name. Or do I have to create a database file with nothing init other than the schema?I have more questions, but they'll have to wait.ThanksTed

View 5 Replies View Related

[DBNETLIB][ConnectionWrite (send()).] General Network Error. Occurs When SQL Times Out On New Windows 2003 Sp2 Server

Jul 12, 2007

We just replaced an older Windows 2000 sp4 server with a new Window 2003 Standard Edition sp2 server to run our batch processing. We noticed that when the SQL command times out we now get the following error in the ADO command object error collection.



[DBNETLIB][ConnectionWrite (send()).] General network error. Check you network documentation.

Native Error: 11

SQL State: HY018



msado15.dll version 2.82.3959 is on this server.



On other servers running Windows 2003 Enterprise Edition sp1 the error on the ADO command object is normal with.



Timeout expired

Native Error: 0

SQL State: HYT00



msado15.dll version 2.82.1830 is on this server.



The SQL server they are talking to is on the other side of a firewall. It is SQL 2005 sp2 running on Windows 2000 sp4.



I have also tested this on a Windows 2003 sp2 server that doesn't have to cross a firewall and get the correct Timeout error. It also has the same version of msado15.dll as problem server.



The application is a collection of VB6 Components that are running in COM+ applications. I have isolated the test application to our one SQL interface component and have build a test vbs that can reproduce this on demand. The VB6 Components were not modified in any way for this change and have been working fine for many years prior to this.



All other aspects of our batch processing works as expected. Transactions are working fine. As long as the SQL doesn't timeout everything is normal. DTCPing was used to ensure both servers have correct ports open to allow DTC traffic. Checked the SynAttackProtect setting on SQL and this is not an issue since other clients have no problems.



One point I would like to add is that this new server was initially setup with a temporary server name and then was changed to use the name of the original server on move day. Don't know if this has any impact or not.

View 31 Replies View Related

Urgent : DB-Library Error 10007: General SQL Server Error: Check Messages From The SQL

Jul 20, 2005

DB-Library Error 10007: General SQL Server error: Check messages fromthe SQLServer.CREATE PROCEDURE [dbo].[spu_Import_Export_Image](@srvr varchar(50),@db varchar(50),@usr varchar(15),@pwd varchar(50),@tbl varchar(50),@col varchar(50),@mod varchar(1),@imgpath1 varchar(1000),@pk varchar(50))ASBEGINdeclare @path varchar(50)declare @whr varchar(200)declare @fil varchar(100)declare @cmd varchar(1000)declare @imgpath varchar(800)declare @ext varchar(5)--declare @pk varchar(50)declare @KeyValue varchar(8000)declare @image varchar(50)--declare @imgpath1 varchar(1000)declare @imgpath2 varchar(1000)declare @sellist varchar(2000)set @path = 'c: extCopy.exe'select @sellist = 'DECLARE curKey CURSOR FOR SELECT ' + @pk +' FROM '+ @tbl + ' ORDER BY ' + @pkexec (@sellist)OPEN curKeyFETCH NEXT FROM curKey INTO @KeyValueWHILE (@@fetch_status = 0)BEGINset @whr = '"where '+ @pk +' = "' + @KeyValueset @fil = @imgpath1 + '' + @KeyValue --+ @extset @cmd = @path + ' /S ' + @srvr + ' /D ' + @db + ' /U ' + @usr+ ' /P ' + @pwd+ ' /T ' + @tbl + ' /C ' + @col + ' /W ' + @whr + '/F ' + @fil+ ' /' + @modexec Master..xp_cmdShell @cmdFETCH NEXT FROM curKey INTO @KeyValueENDCLOSE curKeyDEALLOCATE curKeyENDGOAbove srcipt runs fine with image data type in one table but when irun for some other table it gives me Error MessageTEXTCOPY Version 1.0DB-Library version 8.00.194SQL Server 'WSQL01' Message 170: Line 1: Incorrect syntax near '99'.(Concerning line 1)DB-Library Error 10007: General SQL Server error: Check messages fromthe SQLServer.ERROR: Could not use database 'test1'NULL-----------Aslo it only runs on server console if i run it from workstation uingsame files and tables it gives me an error again. Can anybody help meand reply me at Join Bytes! asap.thnx,dharmesh

View 1 Replies View Related

Partitioning

Sep 10, 2007

Hello
I have a table containing 100,000 record for each year, and every year a new 100,000 record are inserted,I need to know how to make partion this table by year
 I need to know the syntax
Thank you

View 5 Replies View Related

Help With Partitioning And Between

Jul 25, 2006

I have begun my quest to become familiar with SQL 2000 table partitioning and have had some success.
I've partitioned tables according to the "rules" and guidlines of other papers and the show plans look good for all cases.

But when I went to create another demo series, I got stuck.
I've created two tables, with the appropriate CHECK constraints, and with a "union all" view.
When inserting data, it goes to the right tables.
When reading data with a where clause like:
col1=10,
the show plan shows the query getting the data from the ONE correct table.
BUT
When the where clause looks like:
where col1 between 1 and 10:
the showplan shows the query getting data from both tables, instead of the table that 1 to 10 belongs to.
Help!

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved