We will check the physical database file names by running the below T-SQL code to validate the database creation. USE Manvendra GO SELECT file_id, name as [logical_file_name], physical_name FROM sys.database_files 2. Our next step is to rename the physical database file names. The physical database file names cannot be changed or renamed while the correspondingWięcej oRenaming Physical Database File Names for a SQL Server Database[…]
Tag: #bazydanych
https://www.mssqltips.com/
SQL Server follows client server architecture. When ever user performs any action on client machine, it converts in the form of query. This query moves from client to server in the form of network packets using protocols for connection and communication between source and destination servers. SQL server is mainly divided into two Engines, RelationalWięcej oMSSQL Server architecture[…]
Creating a simple stored procedure We will create a simple stored procedure that joins two tables and returns the result set as shown in the following example. CREATE PROCEDURE GetProductDescASBEGINSET NOCOUNT ON SELECT P.ProductID,P.ProductName,PD.ProductDescription FROM Product PINNER JOIN ProductDescription PD ON P.ProductID=PD.ProductID END We can use ‘EXEC ProcedureName’ to execute stored procedures. Creating a stored procedure with parametersWięcej oMSSQL Server – stored procedures[…]
1. list of table indexes:SELECTtablename,indexname,indexdefFROMpg_indexesWHEREschemaname = 'public’ \d table_name 2. DB & tables related \q: Quit/Exit \c __database__: Connect to a database \d __table__: Show table definition including triggers \d+ __table__: More detailed table definition including description and physical disk size \l: List databases \dy: List events \df: List functions \di: List indexes \dn: ListWięcej oPostgreSQL – informacje o bazie[…]
ORA-00001: unique constraint violated The ORA-00001 message is triggered when a unique constraint has been violated. Essentially the user causes the error when trying to execute an INSERT or UPDATE statement that has generated a duplicate value in a restricted field. The error can commonly be found when a program attempts to insert a duplicateWięcej oOracle – errors[…]
1) Connect to PostgreSQL database The following command connects to a database under a specific user. After pressing Enter PostgreSQL will ask for the password of the user. 1 psql -d database -U user -W For example, to connect to dvdrental database under postgres user, you use the following command: 1 2 3 C:\Program Files\PostgreSQL\9.5\bin>psql -d dvdrental -U postgres -W Password for user postgres:Więcej oPostgresql – tips and tricks[…]
SQL Server Backup Types DB migration Restore DB from backup Clone/Copy DB https://blog.codeinside.eu/2018/07/31/easy-way-to-copy-a-sql-database-with-ssms/ ODBC – how to set up it https://www.techwalla.com/articles/how-to-create-and-setup-an-odbc-database-connection