Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 115397

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

4 votes
1 answer
153 views

SQL Free space management

I have 1.8TB AX database. File Size : 1851427.75 MB Free Space : 502837.13 MB If free spaces will be used in the future, I don't want to shrink. Because it's taking a long time. (and index fragment …
Yunus UYANIK's user avatar
  • 1,109
2 votes
2 answers
4k views

Authority create table on custom schema

My default schema dbo. I not give my users permission to create table. User authority ; datareader,datawriter CREATE TABLE dbo.newtable ... CREATE TABLE permission denied in database 'DB' B …
Yunus UYANIK's user avatar
  • 1,109
3 votes
Accepted

Authority create table on custom schema

1- Create DB Role [db_support] 2- GRANT ALTER ON SCHEMA::support TO [db_support] DENY ALTER ON SCHEMA::dbo TO [db_support] 3- GRANT CREATE TABLE TO [db_support] 4- CREATE TABLE sup.asd (asd int) …
Yunus UYANIK's user avatar
  • 1,109
0 votes

Can I return my dynamic sql query into a temp table that can be selected after execution

I guess, you can add IF your own query. Like this: declare @sql varchar(max) IF OBJECT_ID('tempdb..##types') IS NULL BEGIN set @sql = N' select top 10 NameSurName,Mail,Phone INTO ##types …
Yunus UYANIK's user avatar
  • 1,109
1 vote
Accepted

To generate a script to drop or map the orphan users in a SQL Server Instance

Probably your editor has a problem or I do not know what exactly the problem is. But I cleared all blank in msforeachdb and run it, so the errors are disappeared. DECLARE @orphan_users TABLE ( Serve …
Yunus UYANIK's user avatar
  • 1,109
2 votes
2 answers
1k views

How to access user information via sys.fn_dump_dblog

I am reviewing sys.fn_dump_dblog and I can see the old states of the records, but I can not see which users are doing the operations. SPID, Transaction SID columns are always null, how to fix it, or a …
Yunus UYANIK's user avatar
  • 1,109
0 votes
1 answer
1k views

How can I insert without changing the identity seed? [duplicate]

I will add the records in table A to table B. The tables are the same. However, table B is an actively transactional table. When doing the operation, the record in the tableB will continue to be added …
Yunus UYANIK's user avatar
  • 1,109
2 votes
Accepted

How to access user information via sys.fn_dump_dblog

By reference to @Kin, I have come to the solve with the query. SELECT SUSER_SNAME([Transaction SID]) UserName ,[Current LSN] ,[operation] ,[Context] ,[Transaction ID] ,[Transactio …
Yunus UYANIK's user avatar
  • 1,109
0 votes
1 answer
88 views

Bidirectional data transfer

I have two nodes and one database. I want to transfer data between them. DML operations on server node-1 should transfer to node-2 and DML operations on node-2 should transfer to node-1 as well. Is t …
Yunus UYANIK's user avatar
  • 1,109
2 votes
Accepted

Can I just restore the .diff file over full backup to speed up restore?

Yes, it is possible. You should restore full backup first WITH NORECOVERY option, and after that, you can restore only DIFF backup. Just try without FULL backup; RESTORE DATABASE [MyDb] FROM DISK = …
Yunus UYANIK's user avatar
  • 1,109
2 votes
2 answers
667 views

Retrieve archived data [closed]

MSSQL database has previously been archived on another database. Approximately 70m rows (includes sales information.) Now, I am asked to move this archived data to live database. Because, customer ca …
Yunus UYANIK's user avatar
  • 1,109
1 vote

How to get job start time inside of a TSQL agent job step?

There is a lot of information about the jobs and SQL Server Agent in msdb. You can check it out below, I added a few columns that help you in your thoughts. Maybe you want to check If this job success …
Yunus UYANIK's user avatar
  • 1,109
1 vote
1 answer
316 views

Move mssql db Amazon RDS to EC2 [closed]

I have my 200 gb database. I want to move EC2 from RDS. I work on a research to prevent the problems that you may see,but it has not been done before. There may be problems; *Security weaknesses, …
Yunus UYANIK's user avatar
  • 1,109
1 vote

Keeping my database updated every 30 minutes using Log files

With log shipping you can do this. However, during the restore, the connection will be on hold. Query resulting is delay. Unfortunately, log shipping in there is no such solution.
Yunus UYANIK's user avatar
  • 1,109
1 vote

Why are those estimates way off?

You should update your statistics like below, not just indexes use for the whole table. These might take time. UPDATE STATISTICS tablename WITH FULLSCAN; I think you need a better index. Look at the …
Yunus UYANIK's user avatar
  • 1,109

15 30 50 per page