Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Thursday, February 16, 2012

Cant Keep Primary Key Columns when moving db to SQL 2005 from 2000

there are some primary key columns which are autoincrement in some tables.
for exampl page_id, now we have deleted many pages in old server so there
are many gaps between the page_id
even the it doest start with 1 because during the testing many initial pages
were deleted.

but when we move it to the new server with sql2005 it gives them numbers from 1,2,3 and
so on.

I need to keep existing 2000 keys. How can I acomplish this?

it would have worked if it also updates this number in other tables which
refer to this column
for example page_id is autoincreement in tbl_category_pages ( this table
contains the page information)
and it also appears in tbl_page_content ( this table contains the page's
content)

because it changes this number at one place and not the other place it makes
the database incorrect.

i tried many things ( there is even an option to keep the values of such
columns but doesnt seem to work)

Thanks,

WessTo maintain existing relationships, simply select all tables and copy them to a notepad. From there you just copy and paste them in the query anlyzer.|||If you want tables with relationships and data, take a complete back up of the database. Use that backup file and restore in sql 2005.|||ramasp,

Thanks, I appreciate your help.

I have given this information to the developer I have working on this. He tells me he tried this and that it can not work because the two versions are different.

Please let me know if this should work and the proccess to do so.

Thanks,

Wess

Friday, February 10, 2012

Can't get SQL Server 2000 to use more than 2GB of RAM

Hi,

I have configured my SQL Server to use AWE and the /3GB switch in the boot.ini. Also the SQLService account has the "lock pages in memory" user rights. Yet SQL Server and Windows together do not want to utilize more than 2GB of memory, while 4GB is available. Some details below:

4 GB memory (2 GB available)
Windows 2000 Server Enterprise (SP3)
SQL Server 2000 Enterprise (SP4)

In the SQL Server log I can read "Address Windowing Extensions enabled" and "Warning: unable to allocate 'min server memory' of 2560MB"

Does anyone know what I am missing here? Thanks in advance.

Erik.

Hi Erik,

To my knowledge if you only have 4GB of memory or less you should only put in the /3GB switch and not turn AWE on. Maybe try turning AWE off.

Also, what is are the minimum and maximum memory settings on your server? You can view this in Enterprise Manager by right clicking on the server, selecting "Properties" and then viewing the "Memory" tab in the window that appears (sorry if you already knew that).

Also, is the server configured to dynamically manage memory or did you set it so that a fixed memory size is used?

Hope that helps a little bit or sheds a little light on things for future investigation, but sorry if it didn't.
|||Could you post the results of DBCC MEMORYSTATUS ?|||

Eric C. wrote:

Could you post the results of DBCC MEMORYSTATUS ?

Buffer Distribution Buffers
--
Stolen 8500
Free 1353
Procedures 13625
Inram 32521
Dirty 1085
Kept 0
I/O 1
Latched 376
Other 141211

Buffer Counts Buffers
--
Commited 198672
Target 198672
Hashed 175197
InternalReservation 448
ExternalReservation 14006
Min Free 1016
Visible 198672

Procedure Cache Value
--
TotalProcs 1638
TotalPages 13625
InUsePages 8525

Dynamic Memory Manager Buffers
--
Stolen 16978
OS Reserved 1096
OS Committed 1074
OS In Use 1054
General 3094
QueryPlan 13983
Optimizer 0
Utilities 18
Connection 686

Global Memory Objects Buffers
--
Resource 1307
Locks 147
XDES 64
SQLCache 172
Replication 2
LockBytes 2
ServerGlobal 24

Query Memory Objects Value
--
Grants 9
Waiting 0
Available (Buffers) 74325
Maximum (Buffers) 93475

Optimization Queue Value
--
Optimizing 0
Waiting 0
Available 32
Maximum 32

|||I don't think you need AWE unless you're accessing over 4GB of memory. Also you may want to check your virtual memory settings in Windows 2000 Server. If it is dynamically allocating Virtual Memory, do a defrag to see if more than one block of Unmovable bytes exists. If you have fragmented Virtual Memory space, it can cause strange memory errors. If you see fragmentation, try changing the setting to a fixed amount so that it will recreate the VM space in a single block.|||

This was a bug in SP4. Go to http://www.microsoft.com/downloads/details.aspx?FamilyID=7C407047-3F1F-48B8-9E4C-DC32875E1961&displaylang=en

|||

You can use AWE if the amount of physical memory on the machine exceeds the amount of virtual memory. On 32 bit systems there is 2GB of private address space. Since 4GB > 2GB you can enable AWE and set max server memory up to 3.5 GB, depending on the other applications and requirements on the system.

Eric is correct, you need to download the update to sql sp4 at the link provided.