Skip to content

Instantly share code, notes, and snippets.

@geokal
Forked from armanhakimsagar/xampp sql server & all
Created September 20, 2024 11:58
Show Gist options
  • Save geokal/b19f335f5b8f4e6a5de2e30802dde30b to your computer and use it in GitHub Desktop.
Save geokal/b19f335f5b8f4e6a5de2e30802dde30b to your computer and use it in GitHub Desktop.
Pipe error solve:
https://www.youtube.com/watch?v=9F9AcMYh8yQ
PHP XAMPP SETUP:
one in all : https://www.youtube.com/watch?v=28dc3edU2Uc
https://www.youtube.com/watch?v=HKuoc1KrOKs
password set : https://www.youtube.com/watch?v=G-5mFC-o6m0&t=50s
restore database :
import export : https://www.youtube.com/watch?v=mQ0Mrcg9u5E
1. download from:
https://github.com/Microsoft/msphpsql/releases
2. add php.ini
extension=php_pdo_sqlsrv_72_ts.dll
extension=php_sqlsrv_72_ts.dll
3. now restart.
* Download sql server management system:
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017
* Find server name if already created:
cmd > sqlcmd -L
or
open administrator cmd > mofcomp "C:\Program Files (x86)\Microsoft SQL Server\140\Shared\sqlmgmproviderxpsp2up.mof"
* download SQLServer2017-SSEI-Expr & run it.
make sure sqlserverexpress running
* then run sql server configuration manager from search panel.
* now cmd > sqlcmd -L for get server name
* https://www.youtube.com/watch?v=G-5mFC-o6m0&t=50s
https://www.youtube.com/watch?v=mP_Ajbp_DSU
* set servver name :
DESKTOP-S4KI5LT\SQLEXPRESS
____________________________
sql server 2008:
https://www.youtube.com/watch?v=8WAdeP5YREo
https://www.youtube.com/watch?v=DLrxFXXeLFk
____________________________
My pc setup :
1. download xampp 7.1 version
2. download 2008 sql server from bit torrent https://www.bittorrent.com/btweb-index?utm_expid=.1ihW_UcvQQWxj9vRdKsD-w.1&utm_referrer=https%3A%2F%2Fwww.google.co.za%2F
3. download & install OBDC driver https://www.microsoft.com/en-us/download/details.aspx?id=56567
4. download database from : stagingback from remote connection
_____________________________________________________
SQL SERVER ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
* sql server management studio is a client tool for connect with database server.
* server type database engine for connect with database.
* server name can connect remote ip or local ip 127.0.0.1 or (local)
* after create database it save in mssql10msqqlserver\mssql\data folder
.mdf file (master database file)
.ldf is log data file
* for delete a database:
must log out from all other connection on same database
must de select from database
* create database :
click on master database
then write query & execute
* create table :
first select database then
write query on right panel
set primary key from left arrow
set auto increment from bottom panel
nvarchar as varchar
timestamp is datetime
* foreign key:
ALTER TABLE Orders
ADD CONSTRAINT FK_PersonOrder
FOREIGN KEY (PersonID) REFERENCES Persons(PersonID);
* default value:
ALTER TABLE Orders
ADD CONSTRAINT FK_tableName_columnName
DEFALUT 3 for coumnName
* insert update specification:
no action : no action (if foreign key have value delete action will not work)
set null : set null (foreign key will be null)
set cascade : forign key will be deleted
*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment