How to List All Permissions for SQL Server Fixed Database and Server Roles

I am trying to list all current permissions for db_owner and sysadmin for SQL Server 2012. I found these SPs:

EXEC sp_srvrolepermission 'securityadmin' EXEC sp_dbfixedrolepermission 'db_owner' 

However, these are deprecated and only accurate as of SQL Server 2000. Is there an equivalent mechanism to accomplish the same thing today?

SQL Database stuck In Recovery state after restart

SQL Server was restarted by mistake, when it came online, database came back in "In Recovery" mode.

Check from error it says "Recovery of database ‘DB1’ (5) is 8% complete (approximately 27146 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.

It says it will 8 hours to bring this 2tb database online.

Any quick way to fix this, as we didnt had anything open in LOG files, so even if they r ignored, its no impact.

We want to bring this database ONLINE quickly

User database and a personal questionnaire for each user

I run a WordPress based website for a sports club. Due to current COVID-19 restrictions every member must fill out a form answering Covid related questions before they come to every training session. This is currently done using paper.

I would like to move this process online however, I’m not sure how to achieve this.

I was thinking of getting every user to register for an account on the website and then have them complete the form electronically.

Every member has a membership number. Is there a way they could register by putting in the membership number and making a password? This way I wouldn’t have to make all the accounts myself and not everyone can register, only people with an membership number.

I also do not know how to make a form for each user. I would have to be able to keep track of who has completed the form and who hasn’t.

If anyone can help I’d really appreciate it.

How can I properly loop through an array gotten from my wordpress database and display it to my site

I am trying to display some posts information from my database on my live site. I have done the query correctly because I can view the items on the live site. But I need to take three items to display. The post title, the post content which houses the images, and the post id which links to the posts. I seem to have written it correctly but it does not do anything.

This is the code

<?php      global $  wpdb;                    $  results = $  wpdb->get_results( "SELECT * FROM $  wpdb->posts WHERE `post_type`='post' AND `post_status` = 'publish' LIMIT    20" );    foreach ($  results) {       echo "<div class="card">             <div class="img">              <img src="{post_content}" alt="">             </div>             <div class="info">                <h5>{post_title}</h5>             </div>           </div>";   }    //echo "<pre>";print_r($  results);echo"</pre>";                      ?>  

I am quite new to wordpress and PHP in general.

Schema design of a document-oriented database

I’m designing the database schema for a e-learning website and I’m working with a document-based database (Firestore), so I ran into a problem of design the way of structure the data in order to not make a lot of reads.

So I design the schema based on these primaries features.

  • There are three types of courses
    • Lifetime: Once you bought it you can take the course as many times as you want.
    • Generational: Once you bought the course, you can only take it between certain dates, if you wanna take it again, you need to buy the next generation.
    • Lesson: You bought a pack with 3 tickets, these tickets can be used to watch a lesson, once you use all you need to buy more if you still want you to take another lesson.


  • The ? after a column name means that the field is optional.

My mindset when I design the schema was the following

  • A unique source of truth about courses, his prices, commercial name, maybe more metadata about it, so I created the collection Course.

  • Do not complicate the design differentiating between course types, for that reason I created the Batch collection, where I save all types of courses and generations. For example, If I have a lifetime course I only have I document on Batch, with the flag lifetime and the course data embedded. If I have a generational course, I have as many documents as generations, with the number of the generation, the initial and the final date, the course could be the current generation or a scheduled one. The behavior of the lessons is similar to that of the courses by generation.

  • I have the subcollection courses on the User that stores the purchased courses, if the course is a generation that is scheduled, instead of saving an embed document I save the reference to the Batch, as scheduled dates may change.

  • I save the number of tickets available to use on the user document.

So, I know there is a lot of info, but I’ll be glad if anyone could tell me if I’m on the right path, I mean I know that there may be a better solution, but if anyone could give me feedback, it will be great.

options.php does not save option value to database

seems it is duplicate question but i tried the existing solution and still not solved my problem. i creating the test plugin and i have problem in submitting value to options.php which is not store the value to corresponding option and still is null.

this is how i registered my option settings.

public function registerCustomFields(){          register_setting( 'opt_grp', 'last_name',array($  this->callBacks,'pluginOptionsGroup'));         add_settings_section( 'section_index', 'section title', array($  this->callBacks,'pluginSectionCB'), 'adm_menu' );         add_settings_field( 'last_name', 'test text', array( $  this->callBacks, 'pluginTextExample' ), 'adm_menu', 'section_index');     } add_action('admin_init',array($  this,'registerCustomFields')); 

and here is above callbacks

public function pluginOptionsGroup($  input){         return $  input;     }      public function pluginSectionCB(){         echo "Feachures Management";     }      public function pluginTextExample(){         $  value = get_option('last_name');                  echo '<input type="text" class="ui-toggle" id="last_name" name="last_name" value="'.$  value.'" >';     } 

and this is the form in myadmin.php page

<div>         <?php settings_errors(); ?>      <form type="POST" action="options.php">         <?php              settings_fields( 'opt_grp' );                          do_settings_sections( 'adm_menu' );                          submit_button();                          ?>               </form>  </div> 

i can find the option in option table but its always null,and when i change value in database itself its ok and by refreshing page it comes to textbox

The Ins And Outs Of Database Marketing For more information visit buy phone database

One of the strategies that has gotten well known with organizations searching for new customers is the strategy of information base advertising. Organizations purchase¬†buy phone database information bases of either email locations or contact numbers from organizations who gathered this information with the aim of selling at a later stage.¬†For more information visit buy phone database We will investigate the intricate details of really getting the information bases and how information base advertising functions. The principal thing that happens is the gathering of information from clueless individuals. This happens when you tick one of those little boxes that show up on endless structures. They regularly state something like “Would you be keen on being told about new turns of events and items like this one?” Those of us that carelessly tick yes wind up added to an information base of expected customers.For more information visit buy phone database

PCI Compliance for developers accessing a production database for support

As a developer, when an Incident comes in and reaches Tier 3 support (The development team), how can the developers get access to query the Production Database, while remaining PCI Compliant? I’m admittedly a newbie when it comes to PCI Compliance. Is this just a case of Read-Only accounts? Is this a case of data masking? Is this a case of having a Production copy within Production so devs can’t hit a "Live" db? What’s the easiest, and compliant way for developers to be able to perform application incident support in production?

Is a relational database with a dynamic number of tables a good design?

I have a use case where I wish to create a table for each entity to which the underlying application that owns this entity will publish records.

This table has a fixed structure, so if there are 5 such entities in my system, there will be 5 different tables with the same schema.

The schema is generic with one of the columns in the schema as JSON for flexibility. I do not expect queries based on the fields in the JSON. I expect the following queries on each entity:

  1. On the auto-increment id primary key column with LIMIT and OFFSET where I need to read X rows from the record with id Y.
  2. On the creation date column with LIMIT X.

I expect thousands of such entities to be created on the fly so in turn there will be thousands of tables in the database.

In future when one of these entities have fulfilled their purpose, the table would be simply deleted.

I expect most of these tables to have not more than 100 rows while there will be a few with at least 1M rows as time goes by. This design makes data easy to query as my application can determine the table name from the entity name.

Is this a bad design?

Is there a limit to the number of tables in a database in RDBMS (the above design is with Postgresql 11 in mind) keeping performance in mind?

Should I use any different datastore to achieve this other than RDBMS? Any suggestions?