אינדקס אתרים - HH4

hh4

sql server-performance tunning_aavr_TA_and server analyst.docx

 

COMPATIBILITY__
 
ALTER DATABASE db999 SET COMPATIBILITY_LEVEL = 100
 
these are:
60 = SQL Server 6.0
65 = SQL Server 6.5
70 = SQL Server 7.0
80 = SQL Server 2000
90 = SQL Server 2005
100 = SQL Server 2008 & 2008 R2
110 = SQL Server 2012
120 = SQL Server 2014
130 = SQL Server 2016

 

 

 

---permissions__ for login__   permission__
 
 
DECLARE @DB_USers TABLE
(DBName sysname, UserName sysname, LoginType sysname, AssociatedRole varchar(max),create_date datetime,modify_date datetime)
 
INSERT @DB_USers
EXEC sp_MSforeachdb
 
'
use [?]
SELECT ''?'' AS DB_Name,
case prin.name when ''dbo'' then prin.name + '' (''+ (select SUSER_SNAME(owner_sid) from master.sys.databases where name =''?'') + '')'' else prin.name end AS UserName,
prin.type_desc AS LoginType,
isnull(USER_NAME(mem.role_principal_id),'''') AS AssociatedRole ,create_date,modify_date
FROM sys.database_principals prin
LEFT OUTER JOIN sys.database_role_members mem ON prin.principal_id=mem.member_principal_id
WHERE prin.sid IS NOT NULL and prin.sid NOT IN (0x00) and
prin.is_fixed_role <> 1 AND prin.name NOT LIKE ''##%'''
 
SELECT
 
dbname,username ,logintype 
--,create_date 
--,modify_date 
,
 
STUFF(
 
(
 
SELECT ',' + CONVERT(VARCHAR(500),associatedrole)
 
FROM @DB_USers user2
 
WHERE
 
user1.DBName=user2.DBName AND user1.UserName=user2.UserName
 
FOR XML PATH('')
 
)
 
,1,1,'') AS Permissions_user
 
FROM @DB_USers user1
--where UserName='dbo (DOM001\x5870268)' 
GROUP BY
 
dbname,username ,logintype ,create_date ,modify_date
 
ORDER BY username, DBName
 
 
 

הי,

 

זה  לא  תמונה  מלאה.   מכוון  שיש  יוזרים  שאין  להם  Roles  אבל  יש  הרשאות לאובייקטים  נקודתיים  (  כמו  db104_p -  אין לו    Roles  אבל  יש  הרשאה  SELECT עבור טבלה 

mpi_tt_maakav_shinuy_tavlaot  )  או  db215_p  -  אין  הרשאות  כלליות  אבל  יש  גישה  לכמה  טבלאות  ו  SPs

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

SELECT pm.permission_name COLLATE Hebrew_CI_AS ,  object_name([major_id]) ,  pr.name 
FROM sys.database_permissions AS pm
INNER JOIN sys.database_principals AS pr
ON pm.grantee_principal_id = pr.principal_id
WHERE class > 0 
AND pr.name = 'DB215_P'
 AND object_name([major_id]) IS NOT NULL
ORDER BY  object_name([major_id])
 
 

 

 

 

 

 

lock__  block__  deadlock__  performance__  who is connected__? connect__

http://blog.wsol.com/sql-server-locks-blocked-processes-and-two-easy-ways-to-find-them

1. activity monitor 

https://www.mssqltips.com/sqlservertip/1917/performance-analysis-using-sql-server-2008-activity-monitor-tool/

U:\>net session
 
Computer               User name            Client Type       Opens Idle time
 
-------------------------------------------------------------------------------
\\185.10.2.19          hagit                                      2 00:07:36
 
The command completed successfully.
 
 
U:\>
 

 

2. 

USE Master 
GO
EXEC sp_who2
GO
----------------------------
DECLARE @Table TABLE(
        SPID INT,
        Status VARCHAR(MAX),
        LOGIN VARCHAR(MAX),
        HostName VARCHAR(MAX),
        BlkBy VARCHAR(MAX),
        DBName VARCHAR(MAX),
        Command VARCHAR(MAX),
        CPUTime INT,
        DiskIO INT,
        LastBatch VARCHAR(MAX),
        ProgramName VARCHAR(MAX),
        SPID_1 INT,
        REQUESTID INT
)
 
INSERT INTO @Table EXEC sp_who2
 
SELECT  *
FROM    @Table
WHERE LOGIN not IN ('SA', 'DOM001\x5870268')
and status not IN ('sleeping')

 

 

** powershell__


				
query user /server:$SERVER
   powershell -ExecutionPolicy ByPass   query user /server:$SERVER

to loggoff user :

run as administrator powershell-than run the command to the user id number

logoff 2 

 

to run by cript :write it to a.ps1 file :

PS C:\> powershell -ExecutionPolicy ByPass -File a.ps1
Hello World
 
or:simly command 
PS C:\>powershell -ExecutionPolicy ByPass write "hellow"
hellow
 
the script location:
If the script is in the current directory, you can omit the path but must instead explicitly indicate the current directory using .\(or ./ will also work)
 
PS C:\> .\Myscript.ps1
 

 

 

 

: connect__ method from boaz microsoft - azure\\\  בועז

SSMS Query Editor in SQLCMD Mode

https://www.mssqltips.com/sqlservertip/2311/using-the-ssms-query-editor-in-sqlcmd-mode/
 
 
 
:connect int2-sql1node01 
select @@servername
backup database [test2] to disk=N'\\int2-sql1node01\GIBSQL\test2_FULL.bak'
GO
 
:connect int2-sql1node02
select @@servername
restore database [test2] from disk=N'\\int2-sql1node01\GIBSQL\test2_FULL.bak' with norecovery
GO
 
 
 
:connect int2-sql1node01 
select @@servername
backup log [test2] to disk=N'\\int2-sql1node01\GIBSQL\test2_LOG.trn'
GO
 
:connect int2-sql1node02
select @@servername
restore log [test2] from disk=N'\\int2-sql1node01\GIBSQL\test2_LOG.trn' with norecovery
GO
------------------------------------------------------------------
:ON ERROR EXIT
:CONNECT (local)
SET NOCOUNT ON;
SELECT           SERVERPROPERTY('ServerName') AS ServerName
                ,SERVERPROPERTY('ProductVersion') AS ProductVersion
                ,SERVERPROPERTY('ProductLevel') AS ProductLevel
                ,SERVERPROPERTY('Edition') AS Edition
                ,SERVERPROPERTY('EngineEdition') AS EngineEdition;
GO
 
:CONNECT SQL2
SET NOCOUNT ON;
SELECT           SERVERPROPERTY('ServerName') AS ServerName
                ,SERVERPROPERTY('ProductVersion') AS ProductVersion
                ,SERVERPROPERTY('ProductLevel') AS ProductLevel
                ,SERVERPROPERTY('Edition') AS Edition
                ,SERVERPROPERTY('EngineEdition') AS EngineEdition
GO

 

:connect SQLtst1601
select getdate(), @@servername
select name /*,**/ from sys.sysdatabases
where name in ('db022', 'db042','db934' )
 

 

lock__  locked__ locked user__ in active directory DIMA  דימה -- האירוע של נעילת שרתים

http://stackoverflow.com/questions/27042982/how-can-i-verify-if-an-ad-account-is-locked

 

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
 
U:\>net user /domain sqlserver | find "Account active"
Account active               Yes
 
U:\>

 

 

 

 

 

 

 
 
 
 
 
 
 
 
--Server properties__  property_
SELECT SERVERPROPERTY('MachineName') as MachineName
SELECT SERVERPROPERTY('InstanceName') as InstanceName
SELECT SERVERPROPERTY('ServerName') as ServerName
 
--MachineName : SQL05ID
--InstanceName : SQLID  (cluster-virt-nmae)
--ServerName: SQL05ID\SQLID
 
--Host – cpu :
--Processor            Intel(R) Xeon(R) CPU E7- 2870  @ 2.40GHz, 2400 Mhz, 10 Core(s), 20 Logical Processor(s)
--Processor            Intel(R) Xeon(R) CPU E7- 2870  @ 2.40GHz, 2400 Mhz, 10 Core(s), 20 Logical Processor(s)Host – mem :
 
--Host – vm 0r physical
--physical
--Host – os :
--OS Name             Microsoft Windows Server 2008 R2 Enterprise
 
 
--get list How many instances__ on the server  :
EXECUTE xp_regread
        @rootkey = 'HKEY_LOCAL_MACHINE',
        @key = 'SOFTWARE\Microsoft\Microsoft SQL Server',
        @value_name = 'InstalledInstances'
 
----results:
--InstalledInstances - Item #1        MSSQLSERVER  NULL
--InstalledInstances - Item #2        SQLID    NULL
 
 

 

ssrs__  report__

a lot of code to get list of report server 

ssrs_   ReportServer__ 

 

-- get list of all path__ location__ of reports link__ links__ count__

 

USE [ReportServer]
GO
SELECT
       @@SERVERNAME as instancename,
       Name,
       [Path],
       [Description]
FROM [dbo].[Catalog]
WHERE [Type] = 2
ORDER BY [Path]
 

 

 

 

 

 

 

 

--Cluster__  -2:azure-
--Is clustered  & Active Node:
--sql get active node of cluster
--sql get active node of cluster
SELECT SERVERPROPERTY('IsClustered')  AS iscluster
SELECT ServerProperty('ComputerNamePhysicalNetBIOS') as activeNode
SELECT * FROM sys.dm_os_cluster_nodes
 
 
 
--Find name of the Node on which SQL Server Instance is Currently running  --  CURRENT NODE   :: select @@servername
--If the server is not cluster, then the above query returns the Host Name of the Server.
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [CurrentNodeName]
 
 
--Find SQL Server Cluster Nodes a. Using Function
SELECT * FROM fn_virtualservernodes()
 
--b. Using DMV
SELECT * FROM sys.dm_os_cluster_nodes
 
--Find SQL Server Cluster Shared Drives  a. Using Function
SELECT * FROM fn_servershareddrives()
 
--b. Using DMV 
SELECT * FROM sys.dm_io_cluster_shared_drives
 
 
--OR BY SSMS
 
--Iscluster  
--activeNode:  SQL05NODE03
--NodeSName: SQL05NODE01  - SQL05NODE02  - SQL05NODE03
 
--Shared DriveNames: G  - F
 

-- compatibility_level

select name, compatibility_level , version_name = 
CASE compatibility_level
    WHEN 65  THEN 'SQL Server 6.5'
    WHEN 70  THEN 'SQL Server 7.0'
    WHEN 80  THEN 'SQL Server 2000'
    WHEN 90  THEN 'SQL Server 2005'
    WHEN 100 THEN 'SQL Server 2008/R2'
    WHEN 110 THEN 'SQL Server 2012'
    WHEN 120 THEN 'SQL Server 2014'
END
from sys.databases

 

 

 

 

 

 

 

--instance name - barzel   instance_name  get instance name

SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') [Machine Name]
   ,SERVERPROPERTY('InstanceName') AS [Instance Name]
   ,LOCAL_NET_ADDRESS AS [IP_of_instance]
   ,CLIENT_NET_ADDRESS AS [IP_active_NODE_BARZEL_in_cluster]  -- BARZEL
 FROM SYS.DM_EXEC_CONNECTIONS
 WHERE SESSION_ID = @@SPID
 
 
SELECT DISTINCT 
    local_tcp_port 
FROM sys.dm_exec_connections 
WHERE local_tcp_port IS NOT NULL 
 
 
 

 

 
 

-- will work also in :  INT1 + INT1 + IRGUN  -1:azure-   cluster__


				
--Edition __ זה הגדול=אדי (enterprise-standard)  version__ (like 2012-2014-2016) 
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
 
select @@version
 

 

 

 

 

 

-----------------------------------------------  IP__

-- it is working also in azure 

SELECT 

   CONNECTIONPROPERTY('net_transport') AS net_transport,

   CONNECTIONPROPERTY('protocol_type') AS protocol_type,

   CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,

   CONNECTIONPROPERTY('local_net_address') AS machine_ip,

   CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,

   CONNECTIONPROPERTY('client_net_address') AS client_net_address,

   (select @@servername ) as VNN_servername

 

--(SELECT LEFT(ltrim(rtrim(@@ServerName)), Charindex('\', ltrim(rtrim(@@ServerName))) -1))  as machine_name

  

----------------------

-- get  port__ + ip__ of instance   instance_ip  instance ip 

USE master

GO

xp_readerrorlog 0, 1, N'Server is listening on'

GO

-----------------------------

SELECT CONNECTIONPROPERTY('local_net_address') AS [IP_instance_i_connected_to]

-----------------------------

SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') [Machine Name]

   ,SERVERPROPERTY('InstanceName') AS [Instance Name]

   ,LOCAL_NET_ADDRESS AS [IP_of_instance]

   ,CLIENT_NET_ADDRESS AS [IP_active_NODE_BARZEL_in_cluster]  -- BARZEL

 FROM SYS.DM_EXEC_CONNECTIONS

 WHERE SESSION_ID = @@SPID

 

 

 

 

 

 

 

 

version__   sp__

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),

SERVERPROPERTY ('edition')

 

 

 

 

 

 

 

zise: total database:

 

Size__   DATABASE SIZE__  

 
 
create table #filelist(dbname varchar(255),dbsize int, remarks text)
 
insert into #filelist
exec master..sp_databases
 
 
select @@SERVERNAME as server,
       g.dbname,
       g.dbsize/1024 as dbsize_mb,
       g.dbsize as dbsize_kb,       
       g.dbsize/1024/1024 as dbsize_gb
      
from #filelist g
--/*
where g.dbname in(
                   --'test111'
                  select H.NAME
                  from sys.sysdatabases H            
                )
order by dbsize_mb desc
--*/
 
Drop Table #filelist
 
 
 

 

 
create table #filelist(dbname varchar(255),dbsize int, remarks text)
 
insert into #filelist
exec master..sp_databases
 
 
select @@SERVERNAME as server,
       g.dbname,
       g.dbsize/1024 as dbsize_mb--,
       --g.dbsize as dbsize_kb,       
       --g.dbsize/1024/1024 as dbsize_gb
      
from #filelist g
--/*
where g.dbname in(
                   --'test111'
                  select H.NAME
                  from sys.sysdatabases H            
                )
and g.dbname like '%404%'
order by dbsize_mb desc
--*/
 
Drop Table #filelist

 

 

 

 

 

 

 

 

select DB_NAME ( h.database_id ) as db_mames,

       h.physical_name as file_loaction

FROM master.sys.master_files h

order by database_id asc

 

 

db_mames

file_loaction

MSCRM_CONFIG

F:\MSSQL\Data\MSCRM_CONFIG.mdf

MSCRM_CONFIG

g:\MSSQL\LOG\MSCRM_CONFIG_log.LDF

db636

F:\MSSQL\DATA\db636.mdf

db636

G:\MSSQL\LOG\db636.ldf

db407_extra

F:\MSSQL\Data\db407_extra.mdf

db407_extra

G:\MSSQL\LOG\db407_extra_log.ldf

 

 

 

 

 

 

 

Get all instance users:

select h.name

from master..syslogins  h

 

 

Users with sysadmin :

USE master

GO

 

SELECT  p.name AS [loginname] ,

        p.type ,

        p.type_desc ,

        p.is_disabled,

        CONVERT(VARCHAR(10),p.create_date ,101) AS [created],

        CONVERT(VARCHAR(10),p.modify_date , 101) AS [update]

FROM    sys.server_principals p

        JOIN sys.syslogins s ON p.sid = s.sid

WHERE   p.type_desc IN ('SQL_LOGIN', 'WINDOWS_LOGIN', 'WINDOWS_GROUP')

        -- Logins that are not process logins

        AND p.name NOT LIKE '##%'

        -- Logins that are sysadmins

        AND s.sysadmin = 1

GO

 

 

 

 

 

 

 

 

 

 

 

Find specific stored procedure:

http://stackoverflow.com/questions/3574244/find-stored-procedure-by-name

 

use db636

go

 

 

select *

from

   sys.procedures

where

   name like '%sp_UpdateCrmDeltaLakoach%'

 

 

 

 

------------------------------------------

Host – perfmon__bhh

https://www.mssqltips.com/sqlservertutorial/283/performance-monitor/

 

Profiler = basically it runs a SQL Server trace

https://www.mssqltips.com/sqlservertutorial/272/profiler-and-server-side-traces/

Duration, number of reads, number of writes

 

 

 

 

 

Linked server : dependencies ( eun per database)

 

SELECT OBJECT_NAME (referencing_id) AS referencing_object, referenced_server_name,

       referenced_database_name, referenced_schema_name, referenced_entity_name

FROM sys.sql_expression_dependencies

WHERE referenced_server_name IS NOT NULL

      AND is_ambiguous = 0;

 

referencing_object

referenced_server_name

referenced_database_name

referenced_schema_name

referenced_entity_name

crm_sp_mkd_mifga

sql05

db100

dbo

mkd_mifga

crm_sp_mkd_tmuna

sql05

db100

dbo

mkd_tmuna

mkd_sp_biuv_hatraot

SQL05

db100

dbo

mkd_biuv_alerts

 

 

 

 

 

 

 

 

 

-- get  port__ of instance

USE master

GO

xp_readerrorlog 0, 1, N'Server is listening on'

GO

 

 

------------------------- IP port SQL server ----------------------------------------
SELECT DISTINCT 
local_tcp_port 
FROM sys.dm_exec_connections 
WHERE local_tcp_port IS NOT NULL 
 
local_tcp_port
--------------
1433
5022
51484
 
(3 row(s) affected)

 

 

 
red -- אדום

 

 

 

Server properties__  property_

SELECT SERVERPROPERTY('MachineName') as MachineName

, SERVERPROPERTY('InstanceName') as InstanceName

, SERVERPROPERTY('ServerName') as ServerName

 

MachineName

InstanceName

ServerName

SQL05ID

SQLID

SQL05ID\SQLID

 

 

 

Host – cpu :

Processor            Intel(R) Xeon(R) CPU E7- 2870  @ 2.40GHz, 2400 Mhz, 10 Core(s), 20 Logical Processor(s)

Processor            Intel(R) Xeon(R) CPU E7- 2870  @ 2.40GHz, 2400 Mhz, 10 Core(s), 20 Logical Processor(s)Host – mem :

 

Host – vm 0r physical

physical

Host – os :

OS Name             Microsoft Windows Server 2008 R2 Enterprise

How many instances__ :

EXECUTE xp_regread

        @rootkey = 'HKEY_LOCAL_MACHINE',

        @key = 'SOFTWARE\Microsoft\Microsoft SQL Server',

        @value_name = 'InstalledInstances'

 

Value

Value

Data

InstalledInstances - Item #1

MSSQLSERVER

NULL

InstalledInstances - Item #2

SQLID

NULL

 

 

 

 

 

 

 

 

Version and Sp's of all nodes;

 

zise: total database:

 

Size__

 

create table #filelist(dbname varchar(255),dbsize int, remarks text)

 

insert into #filelist

exec master..sp_databases

 

select @@SERVERNAME as server,

       g.dbname,

       g.dbsize as dbsize_kb,

       g.dbsize/1024 as dbsize_mb,

       g.dbsize/1024/1024 as dbsize_gb

      

from #FileList g

--/*

where g.dbname in(

                   --'test111'

                  select H.NAME

                  from sys.sysdatabases H            

                )

order by dbsize_mb desc

--*/

 

Drop Table #FileList

 

 

 

 

 

 

 

Location__    מיקום__   path__ 

 

select DB_NAME ( h.database_id ) as db_mames,

       h.physical_name as file_loaction

FROM master.sys.master_files h

order by database_id asc

 

 

db_mames

file_loaction

MSCRM_CONFIG

F:\MSSQL\Data\MSCRM_CONFIG.mdf

MSCRM_CONFIG

g:\MSSQL\LOG\MSCRM_CONFIG_log.LDF

db636

F:\MSSQL\DATA\db636.mdf

db636

G:\MSSQL\LOG\db636.ldf

db407_extra

F:\MSSQL\Data\db407_extra.mdf

db407_extra

G:\MSSQL\LOG\db407_extra_log.ldf

 

 

 

 

 

 

 

Get all instance users:

select h.name

from master..syslogins  h

 

 

Users with sysadmin :

USE master

GO

 

SELECT  p.name AS [loginname] ,

        p.type ,

        p.type_desc ,

        p.is_disabled,

        CONVERT(VARCHAR(10),p.create_date ,101) AS [created],

        CONVERT(VARCHAR(10),p.modify_date , 101) AS [update]

FROM    sys.server_principals p

        JOIN sys.syslogins s ON p.sid = s.sid

WHERE   p.type_desc IN ('SQL_LOGIN', 'WINDOWS_LOGIN', 'WINDOWS_GROUP')

        -- Logins that are not process logins

        AND p.name NOT LIKE '##%'

        -- Logins that are sysadmins

        AND s.sysadmin = 1

GO

 

 

 

 

 

 

 

 

 

 

 

Find specific stored procedure:

http://stackoverflow.com/questions/3574244/find-stored-procedure-by-name

 

use db636

go

 

 

select *

from

   sys.procedures

where

   name like '%sp_UpdateCrmDeltaLakoach%'

 

 

 

 

Linked server : dependencies ( eun per database)

 

SELECT OBJECT_NAME (referencing_id) AS referencing_object, referenced_server_name,

       referenced_database_name, referenced_schema_name, referenced_entity_name

FROM sys.sql_expression_dependencies

WHERE referenced_server_name IS NOT NULL

      AND is_ambiguous = 0;

 

referencing_object

referenced_server_name

referenced_database_name

referenced_schema_name

referenced_entity_name

crm_sp_mkd_mifga

sql05

db100

dbo

mkd_mifga

crm_sp_mkd_tmuna

sql05

db100

dbo

mkd_tmuna

mkd_sp_biuv_hatraot

SQL05

db100

dbo

mkd_biuv_alerts

 

 

 

 

 

 

 

 

 

-- get  port__ of instance

USE master

GO

xp_readerrorlog 0, 1, N'Server is listening on'

GO

 

 

 

 

 

 

 

--Location__  MDF –  LDF

 

SELECT name, physical_name AS current_file_location

FROM sys.master_files

--where name like '%db099%'

 

master

K:\Microsoft SQL Server\MSSQL.5\MSSQL\DATA\master.mdf

mastlog

K:\Microsoft SQL Server\MSSQL.5\MSSQL\DATA\mastlog.ldf

tempdev

M:\MSSQL\TEMPDB\tempdb.mdf

templog

M:\MSSQL\TEMPDB\templog.ldf

 

 

 

 

 

 

-- Backup__ all databases

 

--  https://www.mssqltips.com/sqlservertip/1070/simple-script-to-backup-all-sql-server-databases/

 

-- look: if the database is in offline mode then he will send an alert but will keep backup the others

 

DECLARE @name VARCHAR(50) -- database name 

DECLARE @path VARCHAR(256) -- path for backup files 

DECLARE @fileName VARCHAR(256) -- filename for backup 

DECLARE @fileDate VARCHAR(20) -- used for file name

 

 

-- specify database backup directory

SET @path = 'd:\Backup\'

 

 

-- specify filename format

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

 

 

DECLARE db_cursor CURSOR FOR 

SELECT name

FROM master.dbo.sysdatabases

WHERE name NOT IN ('master','model','msdb','tempdb')  -- exclude these databases

 

 

OPEN db_cursor  

FETCH NEXT FROM db_cursor INTO @name  

 

 

WHILE @@FETCH_STATUS = 0  

BEGIN  

       SET @fileName = @path + @name + '_' + @fileDate + '.BAK' 

       BACKUP DATABASE @name TO DISK = @fileName 

 

 

       FETCH NEXT FROM db_cursor INTO @name  

END  

 

 

CLOSE db_cursor  

DEALLOCATE db_cursor

 

 

hagit   חגית  ta_muni   time__ backup__  file name 

File Naming Format DBname_YYYYDDMM_HHMMSS.BAK

If you want to also include the time in the filename you can replace this line in the above script:

-- specify filename format
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

with this line:

-- specify filename format
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) + REPLACE(CONVERT(VARCHAR(20),GETDATE(),108),':','')

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

בניית אתר בחינם

במידה ואתה רוצה לבנות אתר בחינם, תוכל להתנסות באחת מהמערכות שלנו לבניית אתרים בחינם, בחר עיצוב והתחל לבנות אתר לעסק שלך
 
מצד שמאל תוכלו לראות מגוון עיצובים שתוכלו לבחור לאתר הסלולרי החדש שתבנו בזופ בדקות הקרובות
 
לאחר שתכנסו למערכת הניהול תחשפו לאפשרויות רבות לניהול התוכן באתר, תקבלו קוד QR ייחודי לאתר שלכם, תוכלו לנהל דפי תוכן, מפות, טפסים ועוד..
 
לחץ כאן לבניית אתר בחינם

החבילות של זופ

זופ מציעה שירותי פרימיום, לניהול אתר המובייל שלך.  שימוש בדומיין שלך, אחסון ברמה גבוהה , קידום באינדקס אתרים שלנו ועוד...

 

 
לחץ כאן לצפייה בחבילות של זופ