PDA

View Full Version : Cannot create a row of size 8102 ........



mehdi0020
شنبه 12 خرداد 1397, 13:49 عصر
سلام
موقعی که از فایل اکسل یک رکورد وارد دیتابیسم میکنم این خطا میده
Cannot create a row of size 8102 which is greater than the allowable maximum row size of 8060.
The statement has been terminated.
مشکل کجاست و چجوری برطرف کنم؟
تعداد ستون های جدولم بالا هستش

mehdi0020
یک شنبه 13 خرداد 1397, 07:09 صبح
داره میگه مقدار ماکزیمم ستون هایی که میتونی بذاری 8060 تاس
من این همه ستون ندارم نحایتا 50 تا

mehdi0020
یک شنبه 13 خرداد 1397, 08:41 صبح
کسی نیست کمک کنه؟؟

gerdioz2018
پنج شنبه 24 خرداد 1397, 10:40 صبح
من این همه ستون ندارم نحایتا 50 تا

به ستون ها ایراد نمی گیره
مقدار حجم داده است

You're hitting SQL's row size limit which is 8060 bytes (eg an 8K page). Using normal data types you cannot have a row which uses more than 8060 bytes, and while you can use a varchar to allow the smaller bits of data to offset the larger ones, with 468 columns of data you're looking at an average column width of 17.2 bytes.If some of those columns are going to be storing a lot of data then you could consider making them varchar(max) data type instead, but be aware that the data won't be stored in the main data page (those allowing you to exceed the limit) so from a performance perspective it's not always a good idea. Of course if you won't need the data very often then that won't matter too much, but if this is data which will be referenced regularly then you realistically need to look at either excluding some of the columns, or normalising the data and splitting it across multiple tables.