יום חמישי, 30 באפריל 2009

שחרור טרזנצקיות של משתמש

שאלה:
יש לי בסיס נתונים שאני רוצה למחוק אותו אבל קיים יוזר שמשתמש בו כרגע.
אני לא רוצה למחוק את ההרשאות של היוזר אבל אני רוצה להעיף אתו כרגע. מה לעשות ?

תשובה:
תריץ את הפקודה sp_who2 , ולאחר מכן תבצע kill ל- spid של היוזר הרלוונטי.

בהצלחה.

יום שני, 13 באפריל 2009

SQL Server 2008 Service Pack 1

SQL Server 2008 Service Pack 1 (SP1) is now available.
You can use these packages to upgrade any SQL Server 2008 edition.
Note:
We remain committed to our plans to keep service packs contained, focusing on essential updates only, primarily a Roll-up of Cumulative Update 1 to 3, Quick Fix Engineering (QFE) updates, as well as fixes to issues reported through the SQL Server community. While keeping product changes contained, we have made significant investments to ease deployment and management of Service Packs:

Slipstream – You are now able to integrate the base installation with service packs (or Hotfixes) and install in a single step.
Service Pack Uninstall – You are now able to uninstall only the Service Pack (without removing the whole instance)
Report Builder 2.0
Click Once capability For more information about SQL Server 2008 Service Pack 1, please review the Release Notes.

יום ראשון, 29 במרץ 2009

מחיקת מספר אובייקטים במשפט אחד

כידוע ישנם מספר חידושים ושיפורים בפלטפורמת sql server 2005 ו- 2008 . החידושים הינם ברמת ה- agent , t-sql , management studio ועוד.. , בטיפים הקרובים veracity תסקור מספר חידושים שימושיים ומעניינים.

והפעם – מחיקת מספר אובייקטים במשפט אחד
בעזרת היכולת ניתן לייעל את פקודת ה- drop לאובייקטים.

לדוגמא, לאחר שיצרנו את האובייקטים הבאים :

USE AdventureWorks
GO
CREATE PROCEDURE SP1 AS
BEGIN
SELECT TOP 10 * FROM Person.Address
END
GO

CREATE PROCEDURE SP2 AS
BEGIN
SELECT TOP 10 * FROM Person.Address
END
GO

CREATE PROCEDURE SP3 AS
BEGIN
SELECT TOP 10 * FROM Person.Address
END
GO

CREATE PROCEDURE SP4 AS
BEGIN
SELECT TOP 10 * FROM Person.Address
END
GO

על מנת למחוק אותם, ניתן להריץ מספר פעמים את פקודת ה- drop:

USE AdventureWorks
GO
DROP PROCEDURE SP1
DROP PROCEDURE SP2
GO

אך ניתן לייעל את הקוד ולכתוב מעכשיו כך:

USE AdventureWorks
GO
DROP PROCEDURE SP3,SP4
GO

שימו לב שמהיום ניתן לשפר את העבודה ולמחוק אובייקטים בצורה מהירה ויעילה יותר!

בהצלחה !!

יום רביעי, 18 במרץ 2009

The product level is insufficient

שאלה:

בעת ייבוא Flat File או Excel File בSQL 2005 SP1
אני מקבלת הודעת שגיאה בשלב האימות:
Validating (Error)
Error 0xc00470fe: Data Flow Task: The product level is insufficient for
component "
(SQL Server Import and Export Wizard)

בדקתי האם יש חיבור לSSIS ואכן הוא לא מותקן..
אני עומדת לבצע את ההתקנה של SSIS.
האם ידוע למישהו אם הבעיה באמת נפתרה בSP1 או שיש איזשהו הוטפיקס שמטפל בבעיה?
תודה!

תשובה:
הבעיה קוראת כאשר יש הבדלי service pack בין שרת בסיס הנתונים לבין כלי הניהול איתו את עובדת.