> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/ar/installation-setup/installation/alwajhh-alkhlfyh-lqaadh-albyanat/microsoft-sql-server.md).

# Microsoft SQL Server

تثبيت قاعدة بيانات ngSurvey

يمكنك نشر حزمة DACPAC الخاصة بـ ngSurvey الموجودة في مجلد databases/ داخل ملف zip الخاص بك باستخدام سطر أوامر sqlpackage أو عبر SQL Server Management Studio.&#x20;

يرجى ملاحظة أن كل هذه الخطوات تتطلب وجود قاعدة بيانات حالية، يمكن أن تكون فارغة أو تحتوي على إصدار سابق من ngSurvey. إذا تم العثور على أي قاعدة بيانات ngSurvey موجودة مسبقًا فسيتم ترقية جميع بياناتها وبنيتها تلقائيًا لتتوافق مع إصدار التثبيت الحالي.

{% hint style="warning" %}
هذا التثبيت لقاعدة البيانات غير مطلوب افتراضيًا حيث سيقوم ngSurvey تلقائيًا بتكوين قاعدة البيانات المحددة في Connectionstring.
{% endhint %}

## المتطلبات

1. SQL Server 2016 أو أحدث / Express.
2. SQL Server على Azure / AWS. **يعمل فقط باستخدام SQLPackage.exe.**
3. يجب أن يكون لمستخدم قاعدة البيانات صلاحية DBO على القاعدة.

### سطر الأوامر

1. تنزيل [SQLPackage.exe](https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-2017) من موقع Microsoft على الويب.&#x20;
2. شغّل الأمر التالي من Powershell أو سطر الأوامر في Windows لنشر كود قاعدة بيانات ngSurvey إلى خادم SQL الخاص بك. تأكد من وضع المسار الصحيح لـ sqlpackage.exe واستبدال TargetConnectionString بسلسلة اتصال قاعدة البيانات الخاصة بك. `sqlpackage.exe /Action:Publish /Sourcefile:ngsurveydb.dacpac /TargetConnectionString:"Server=tcp:yourdatabaseserver,1433;Initial Catalog=yourdatabase;Persist Security Info=False;User ID=youruser;Password=yourpassword;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/ar/installation-setup/installation/alwajhh-alkhlfyh-lqaadh-albyanat/microsoft-sql-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
