افزودن اکانت مدیریتی فراموش شده به SQL Server

فرض کنید
– تمام اکانت‌های مدیریتی توکار SQL Server را حذف کرده‌اید (یا برایتان حذف کرده‌اند).
– بجز کاربر SA، تمام کاربران را از نقش SYSADMIN حذف کرده‌اید؛ شامل تمام اکانت‌های ویندوزی و همچنین خود SQL Server.
– پسورد SA را هم فراموش کرده‌اید یا ندارید.

خوب، الان چکار می‌خواهید بکنید؟!
احتمالا نصب مجدد سرور را پیشنهاد دهید یا بانک اطلاعاتی Master را بازسازی کنید که در هر دو حالت تمام تنظیمات سرور را از دست خواهید داد. روش دیگری هم بدون از دست دادن تنظیمات سرور وجود دارد که در ادامه آن‌را بررسی خواهیم کرد.

افزودن یک اکانت مدیریتی جدید به SQL Server

اگر دسترسی کامل مدیریتی خود را به SQL Server از دست داده‌اید باید ابتدا به آن سرور لاگین کنید؛ با این فرض که کاربر وارد شده به سیستم، جزو local administrators group است.

1
2
3
4
5
6
7
8
9
10
11
C:\>sqlcmd -S .
1> create login [MachineName\TestUser] from windows;
2> go
1> exec sp_addsrvrolemember 'MachineName\TestUser','sysadmin'
2> go
1> select is_srvrolemember('sysadmin', 'MachineName\TestUser')
2> go
-----------
1
(1 rows affected)
1>

سپس خلاصه مواردی را که ملاحظه می‌کنید، اجرای سه دستور است:
الف) اجرای sqlcmd با پارامتر S و مشخص سازی وهله‌ی مورد نظر
البته حالت کامل آن در صورتیکه از وهله‌ی پیش فرض استفاده نمی‌کنید SQLCMD –S Server_Name\Instance_Name است. S نیز در اینجا باید با حروف بزرگ نوشته شود.
ب) create login را بر روی یکی از اکانت‌های محلی سیستم اجرا کنید. مثلا MachineName\administrator یا هر اکانت موجود دیگری که لازم است. نام آن نیز باید حتما به شکل server_name\user_name باشد.
در حین استفاده از sqlcmd، هر فرمان زمانی اجرا می‌شود که در سطر پس از آن، یک go نوشته شده و enter شود.
ج) سپس توسط sp_addsrvrolemember به این اکانت اضافه شده، دسترسی sysadmin بدهید.

برای آزمایش آن فقط کافی است از متد is_srvrolemember برای کوئری گرفتن استفاده کنید و یا سعی کنید توسط اکانت اضافه شده، به SQL Server لاگین کنید. این اکانت اکنون در قسمت Security/logins قابل مشاهده است.

اگر نمی‌خواهید از اکانت‌های ویندوزی استفاده کنید، create login را به نحو ذیل مقدار دهی کنید:

1
2
3
4
5
6
7
8
9
C:\>sqlcmd -S .
1> use master
2> go
Changed database context to 'master'.
1> create login test_user with password='123#123'
2> go
1> exec sp_addsrvrolemember 'test_user','sysadmin'
2> go
1>

سپس به این کاربر اضافه شده با کلمه‌ی عبور مشخص، توسط sp_addsrvrolemember دسترسی sysadmin بدهید.

Developers Advice on Building Apps that will Sell

If you think that developing an app is just a simple task, well its definitely not as you have to work on it deeply.

Meanwhile, if you are one of those aspiring app developer, you should focus first on your vision and goals before you go through in the complex world of developing an app and also consider the demand of your boss as well as the users expectations.

Regarding to this, famous developers including president of Pfeiffer Consulting Andreas Pfeiffer, president of Joe Zeff Design Joe Zeff and the co-founder of App Orchard Kevin Kim, impart their knowledge and give their various opinions which will help developers build apps that will sell during the recent TabletBiz Conference and Expo.

As Joe Zeff found that Apple’s tablet would be perfectly suited for publishing industry dubbed as “The tablet is the ultimate storytelling device,” he advice “It comes down to that core capability of that tablet device to present content. Take content that people already like and make it more likeable. Make it something that people want to spend more time with and present opportunities for them to interact with it.”

With Joe Zeff’s determination developing his app, he absolutely caught the attention of JP Morgan and Notre Dame Football as his clients in the world of publishing industry.

On the other hand, as part of Kevin Kim’s advice while discussing about developing an app, he said “Some of the best, most innovative developers aren’t working in the trenches of corporate America, Instead, the best ideas are mostly coming from independent developers and they are the ones who are pushing the envelope when it comes to technology.”

Moreover, Andreas Pfeiffer also give his statement regarding with the Apple’s App store, which developers should be aware of, saying “There are 1,000 to 2,000 app submissions a day. The real problem isn’t the distribution, but the promotion. You cannot count on Apple.”

Since developing an app is not that easy, your patience, hard work, and self-motivation will be the main keys for you to be able to achieve your goals while developing an app that will sell.

15 Tips as Successful Independent Software Developer

The main advantage on this career as an independent software developer is having yourself as a boss, no corporate policies should be followed but considering limitations.

As an independent software developer there are at least 15 steps to be followed according to infoworld.com in order to attain accuracy and to maximize the free source job:

1. If your working in a corporate company and opted to resign, list down the things you must consider in becoming an independent software developer.

2. Before putting oneself as independent software developer or programmer as a chosen job, plan first in order to assure success in the chosen career which involved consultations and training.

3. After you resign in the previous job, find yourself a time to adjust.

4. Expand attributes on technical knowledge and software programming.

5. Maximize time working efficiently as if becoming a software developer offers convenient time.

6. Attest on small things considering its effect if not given attention.

7. As an independent software developer marketing and advertising is an essential part in order to obtain progress.

8. Organize your work and set up priorities.

9. Identify difference between promotion and being independent,to become independent signifies that a certain individual must also take managerial concerns while being promoted is just transferring into another job but with specifications.

10. As a programmer do not limit yourself for investing as long as you can manage your work in which defines to accept technical inputs and apply it into work for an expected outcome.

11. Know when your going to expand or lessen your business.

12. Set up product quality as an element for considerations in your business.

13. Work out for your product to be recognized such as linking your business into informative sites, merging and post educational drive about your product through social media.

14. Dividing responsibilities may be an assurance of success or failure but before you are going to establish a work for a certain person make sure his/her working capacities.

15. Take care of yourself as an asset in your business and be reminded to make use of your time not only in working on the entire week but also to exercise rest, relax and recreation.

Top Five Best Programming Languages for First-Time Learners

A programming site has listed its top five best programming languages for first-time learners following its recently conducted poll survey.

According to Lifehacker, the following are the top five best programming languages for the firs-timers whose gearing up to learn on how to code:

  1. Python
  2. C/C++
  3. Java
  4. JavaScript
  5. Ruby

Based on the survey, Python leads as the most popular particularly for first-timers.

Python, an open source programming was first introduced by Guido van Rossum which is currently used for commercial applications.

Python which is defined as flexible and dynamic programming language enables the programmer to formulate functional codes in a given time.

Following on the second spot is the C/C++ programming language.
The C programming language is closely related with general programming language.

On the other hand, C++ is widely used in software productivity but it is more complex than C language when it comes to development.

C/C++ is dubbed as “Most Foundational Programming Languages” which dealt with learning the science of computer programming.

Java landed on the third spot as the best programming language for first-time learners.

Java which plays a vital role in all platforms, other devices and operating systems is considered as one of the influential language of programming developed by Oracle.

JavaScript on the other hand is commonly used regardless of the presence of browsers as long as the context of connection is applied. The scripting language is commonly used for professional codes.

Ruby, among the top five best programming language for first-time learners is easy to learn and not seeking complex knowledge in the field of programming. Ruby is also commonly known for specialization of commands and codes.

Photo Credit: lifehacker.com